Re: [PATCH nf] netfilter: Update ip6_route_me_harder to consider L3 domain

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

 



On 4/12/22 1:46 AM, Martin Willi wrote:
> @@ -39,6 +38,13 @@ int ip6_route_me_harder(struct net *net, struct sock *sk_partial, struct sk_buff
>  	};
>  	int err;
>  
> +	if (sk && sk->sk_bound_dev_if)
> +		fl6.flowi6_oif = sk->sk_bound_dev_if;
> +	else if (strict)
> +		fl6.flowi6_oif = dev->ifindex;
> +	else
> +		fl6.flowi6_oif = l3mdev_master_ifindex(dev);

For top of tree, this is now fl6.flowi6_l3mdev and dev is only needed
here so make this:
	fl6.flowi6_l3mdev = l3mdev_master_ifindex(skb_dst(skb)->dev);

> +
>  	fib6_rules_early_flow_dissect(net, skb, &fl6, &flkeys);
>  	dst = ip6_route_output(net, sk, &fl6);
>  	err = dst->error;




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

  Powered by Linux