Re: [PATCH net v2 2/3] ipv6: ignore dst hint for multipath routes

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

 



On Fri, Aug 25, 2023 at 11:08:29AM +0200, Sriram Yagnaraman wrote:
> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index 56a55585eb79..4631e03c84b4 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -424,6 +424,8 @@ void fib6_select_path(const struct net *net, struct fib6_result *res,
>  	if (match->nh && have_oif_match && res->nh)
>  		return;
>  
> +	IP6CB(skb)->flags |= IP6SKB_MULTIPATH;

skb can be NULL here in case this is called as part of route query from
user space, so we need:

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 4631e03c84b4..a02328c93a53 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -424,7 +424,8 @@ void fib6_select_path(const struct net *net, struct fib6_result *res,
        if (match->nh && have_oif_match && res->nh)
                return;
 
-       IP6CB(skb)->flags |= IP6SKB_MULTIPATH;
+       if (skb)
+               IP6CB(skb)->flags |= IP6SKB_MULTIPATH;
 
        /* We might have already computed the hash for ICMPv6 errors. In such
         * case it will always be non-zero. Otherwise now is the time to do it.



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux