From 3059a81d56a67a1f3e512f9740b474f751c8698c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BChler?= Date: Mon, 11 Apr 2022 09:17:23 +0200 Subject: [PATCH] patch pyroute2 set_elem list elem attr type --- src/capport/utils/nft_socket.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/capport/utils/nft_socket.py b/src/capport/utils/nft_socket.py index 968bd0c..c517dd7 100644 --- a/src/capport/utils/nft_socket.py +++ b/src/capport/utils/nft_socket.py @@ -20,6 +20,8 @@ _NlMsgBase = typing.TypeVar('_NlMsgBase', bound=pr2modules.netlink.nlmsg_base) # nft uses NESTED for those.. lets do the same _nftsocket.nft_set_elem_list_msg.set_elem.data_attributes.nla_flags = pr2modules.netlink.NLA_F_NESTED _nftsocket.nft_set_elem_list_msg.set_elem.nla_flags = pr2modules.netlink.NLA_F_NESTED +# nftable lists always use `1` as list element attr type +_nftsocket.nft_set_elem_list_msg.set_elem.header_type = 1 # NFTA_LIST_ELEM def _monkey_patch_pyroute2():