On 09/27/2016 04:18 PM, Shmulik Ladkani wrote:
On Tue, 27 Sep 2016 09:44:41 -0400 (EDT), da...@davemloft.net wrote:
From: Daniel Borkmann <dan...@iogearbox.net>
Date: Tue, 27 Sep 2016 12:39:34 +0200
Any reason why dev_forward_skb() is not preferred over direct
netif_receive_skb() you're using? It would, for example, implicitly
assure that pkt_type is always PACKET_HOST, etc.
dev_forward_skb() will pull the ethernet header.
And since a direct call to netif_receive_skb() will not, one of these
two choices won't work properly.
In the patch, I'm issuing a skb_pull_rcsum() prior the netif_receive_skb,
snip:
[...]
Existing *egress* mir/red already supported pairing two non-eth devices.
Therefore I allow it for the new *ingress* mir/red as well.
[...]
Yeah, makes sense then. Should skb->pkt_type become an issue, you might
probably just use act_skbedit for such cases.