netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [nf PATCH] netfilter: egress: Report interface as outgoing
@ 2022-03-24 14:02 Phil Sutter
  2022-03-24 14:11 ` Florian Westphal
  0 siblings, 1 reply; 2+ messages in thread
From: Phil Sutter @ 2022-03-24 14:02 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: Lukas Wunner, netfilter-devel

Otherwise packets in egress chains seem like they are being received by
the interface, not sent out via it.

Fixes: 42df6e1d221dd ("netfilter: Introduce egress hook")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 include/linux/netfilter_netdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/netfilter_netdev.h b/include/linux/netfilter_netdev.h
index e6487a6911360..8676316547cc4 100644
--- a/include/linux/netfilter_netdev.h
+++ b/include/linux/netfilter_netdev.h
@@ -99,7 +99,7 @@ static inline struct sk_buff *nf_hook_egress(struct sk_buff *skb, int *rc,
 		return skb;
 
 	nf_hook_state_init(&state, NF_NETDEV_EGRESS,
-			   NFPROTO_NETDEV, dev, NULL, NULL,
+			   NFPROTO_NETDEV, NULL, dev, NULL,
 			   dev_net(dev), NULL);
 
 	/* nf assumes rcu_read_lock, not just read_lock_bh */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [nf PATCH] netfilter: egress: Report interface as outgoing
  2022-03-24 14:02 [nf PATCH] netfilter: egress: Report interface as outgoing Phil Sutter
@ 2022-03-24 14:11 ` Florian Westphal
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Westphal @ 2022-03-24 14:11 UTC (permalink / raw)
  To: Phil Sutter; +Cc: Pablo Neira Ayuso, Lukas Wunner, netfilter-devel

Phil Sutter <phil@nwl.cc> wrote:
> Otherwise packets in egress chains seem like they are being received by
> the interface, not sent out via it.

Good catch, applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-24 14:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-24 14:02 [nf PATCH] netfilter: egress: Report interface as outgoing Phil Sutter
2022-03-24 14:11 ` Florian Westphal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).