lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 18 Nov 2020 13:19:15 -0700
From:   David Ahern <dsahern@...il.com>
To:     Oliver Herms <oliver.peter.herms@...il.com>, netdev@...r.kernel.org
Cc:     davem@...emloft.net, kuznet@....inr.ac.ru, yoshfuji@...ux-ipv6.org,
        kuba@...nel.org
Subject: Re: [PATCH v3] IPv6: RTM_GETROUTE: Add RTA_ENCAP to result

On 11/18/20 8:14 AM, Oliver Herms wrote:
> This patch adds an IPv6 routes encapsulation attribute
> to the result of netlink RTM_GETROUTE requests
> (i.e. ip route get 2001:db8::).
> 
> Signed-off-by: Oliver Herms <oliver.peter.herms@...il.com>
> ---
>  net/ipv6/route.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index 7e0ce7af8234..64bda402357b 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -5558,6 +5558,10 @@ static int rt6_fill_node(struct net *net, struct sk_buff *skb,
>  
>  		if (dst->dev && nla_put_u32(skb, RTA_OIF, dst->dev->ifindex))
>  			goto nla_put_failure;
> +
> +		if (dst && dst->lwtstate &&
> +		    lwtunnel_fill_encap(skb, dst->lwtstate, RTA_ENCAP, RTA_ENCAP_TYPE) < 0)
> +			goto nla_put_failure;
>  	} else if (rt->fib6_nsiblings) {
>  		struct fib6_info *sibling, *next_sibling;
>  		struct nlattr *mp;
> 

You forgot to remove the dst part of that. rt6 == dst so to be in this
branch dst != NULL.

Besides that nit that maybe Jakub will fixup before applying:

Reviewed-by: David Ahern <dsahern@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ