Shmulik Ladkani d2f0c96114 ipv4: ip_do_fragment: Preserve skb_iif during fragmentation
Previously, during fragmentation after forwarding, skb->skb_iif isn't
preserved, i.e. 'ip_copy_metadata' does not copy skb_iif from given
'from' skb.

As a result, ip_do_fragment's creates fragments with zero skb_iif,
leading to inconsistent behavior.

Assume for example an eBPF program attached at tc egress (post
forwarding) that examines __sk_buff->ingress_ifindex:
 - the correct iif is observed if forwarding path does not involve
   fragmentation/refragmentation
 - a bogus iif is observed if forwarding path involves
   fragmentation/refragmentatiom

Fix, by preserving skb_iif during 'ip_copy_metadata'.

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-01 13:28:34 -04:00
..
2019-01-23 11:18:00 -08:00
2019-04-30 23:38:38 -04:00
2018-11-10 16:55:11 -08:00
2019-03-26 08:35:36 +01:00
2019-04-30 11:35:48 -04:00
2019-03-19 16:00:22 -07:00
2019-02-21 16:23:56 -08:00
2019-04-24 12:07:08 -07:00
2019-04-30 10:50:50 -04:00
2019-03-08 14:48:40 -08:00
2019-03-11 15:40:14 -07:00
2019-03-16 01:27:51 +01:00
2019-03-15 15:29:47 -07:00