[PATCH nft v2 4/5] src: add egress support for 'list hooks'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This was missing:  Also include the egress hooks when listing
the netdev family (or unspec).

Signed-off-by: Florian Westphal <fw@xxxxxxxxx>
---
 src/mnl.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/mnl.c b/src/mnl.c
index 1b424e427124..3cacb47e7242 100644
--- a/src/mnl.c
+++ b/src/mnl.c
@@ -2529,11 +2529,12 @@ static int mnl_nft_dump_nf_arp(struct netlink_ctx *ctx, int family,
 static int mnl_nft_dump_nf_netdev(struct netlink_ctx *ctx, int family,
 				  const char *devname, struct list_head *hook_list)
 {
-	int err;
+	int err1, err2;
 
-	err = __mnl_nft_dump_nf_hooks(ctx, family, NFPROTO_NETDEV, NF_NETDEV_INGRESS, devname, hook_list);
+	err1 = __mnl_nft_dump_nf_hooks(ctx, family, NFPROTO_NETDEV, NF_NETDEV_INGRESS, devname, hook_list);
+	err2 = __mnl_nft_dump_nf_hooks(ctx, family, NFPROTO_NETDEV, NF_NETDEV_EGRESS, devname, hook_list);
 
-	return err;
+	return err1 ? err2 : err1;
 }
 
 static void release_hook_list(struct list_head *hook_list)
-- 
2.44.2





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux