Hangbin Liu ce57adc222 ipvlan: fix bound dev checking for IPv6 l3s mode
The commit 59a0b022aa24 ("ipvlan: Make skb->skb_iif track skb->dev for l3s
mode") fixed ipvlan bonded dev checking by updating skb skb_iif. This fix
works for IPv4, as in raw_v4_input() the dif is from inet_iif(skb), which
is skb->skb_iif when there is no route.

But for IPv6, the fix is not enough, because in ipv6_raw_deliver() ->
raw_v6_match(), the dif is inet6_iif(skb), which is returns IP6CB(skb)->iif
instead of skb->skb_iif if it's not a l3_slave. To fix the IPv6 part
issue. Let's set IP6CB(skb)->iif to correct ifindex.

BTW, ipvlan handles NS/NA specifically. Since it works fine, I will not
reset IP6CB(skb)->iif when addr->atype is IPVL_ICMPV6.

Fixes: c675e06a98a4 ("ipvlan: decouple l3s mode dependencies from other modes")
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2196710
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-06-12 09:34:01 +01:00
..
2023-06-01 20:43:11 -04:00
2023-06-04 08:32:30 -04:00
2023-05-27 09:42:56 -07:00
2023-04-27 16:36:55 -07:00
2023-05-02 10:41:31 -07:00
2023-04-27 11:53:57 -07:00
2023-04-27 11:53:57 -07:00
2023-04-27 12:07:50 -07:00
2023-06-06 04:36:02 -07:00
2023-04-27 10:09:05 -07:00
2023-04-27 17:17:12 -07:00
2023-06-07 13:49:42 -07:00
2023-04-27 16:36:55 -07:00
2023-05-05 19:12:01 -07:00
2023-04-28 16:24:32 -07:00
2023-04-25 12:02:16 -07:00
2023-04-28 14:02:54 -07:00
2023-05-02 10:41:31 -07:00
2023-04-27 16:36:55 -07:00
2023-05-05 13:27:59 -07:00
2023-04-27 10:09:05 -07:00
2023-04-27 11:53:57 -07:00
2023-05-03 11:25:01 -07:00
2023-04-27 11:53:57 -07:00
2023-05-02 10:41:31 -07:00
2023-05-20 08:48:04 -07:00
2023-04-27 11:53:57 -07:00
2023-05-31 11:36:40 -04:00
2023-05-16 21:07:26 -04:00
2023-04-27 10:09:05 -07:00
2023-04-27 12:07:50 -07:00
2023-05-04 18:33:56 -07:00
2023-05-27 09:42:56 -07:00