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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c4b2e04e-295a-a8c4-138e-8b9dd5606cde@gmail.com>
Date:   Fri, 30 Aug 2019 19:48:03 -0600
From:   David Ahern <dsahern@...il.com>
To:     Donald Sharp <sharpd@...ulusnetworks.com>, netdev@...r.kernel.org,
        dsahern@...nel.org, sworley@...ulusnetworks.com
Subject: Re: [PATCH net] net: Properly update v4 routes with v6 nexthop

On 8/30/19 12:14 PM, Donald Sharp wrote:
> diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
> index 4c81846ccce8..c7e94edae482 100644
> --- a/include/net/ip_fib.h
> +++ b/include/net/ip_fib.h
> @@ -513,7 +513,7 @@ int ip_valid_fib_dump_req(struct net *net, const struct nlmsghdr *nlh,
>  			  struct netlink_callback *cb);
>  
>  int fib_nexthop_info(struct sk_buff *skb, const struct fib_nh_common *nh,
> -		     unsigned char *flags, bool skip_oif);
> +		     u8 family, unsigned char *flags, bool skip_oif);
>  int fib_add_nexthop(struct sk_buff *skb, const struct fib_nh_common *nh,
> -		    int nh_weight);
> +		    int nh_weight, u8 family);

Call this rt_family in both for 'route family' to make it clear.

>  #endif  /* _NET_FIB_H */
> diff --git a/include/net/nexthop.h b/include/net/nexthop.h
> index 95f766c31c90..f13c61806abf 100644
> --- a/include/net/nexthop.h
> +++ b/include/net/nexthop.h
> @@ -172,7 +172,7 @@ int nexthop_mpath_fill_node(struct sk_buff *skb, struct nexthop *nh)

nexthop_mpath_fill_node should take the family as input argument and
then ...

>  		struct fib_nh_common *nhc = &nhi->fib_nhc;
>  		int weight = nhg->nh_entries[i].weight;
>  
> -		if (fib_add_nexthop(skb, nhc, weight) < 0)
> +		if (fib_add_nexthop(skb, nhc, weight, nhc->nhc_family) < 0)

pass it to fib_add_nexthop.

>  			return -EMSGSIZE;
>  	}
>  

The rest looks ok to me.

as an FYI for the archives, the fib_nexthops.sh script does show the
unexpected gw for IPv6 but it does not flag it as an error. I need to
fix that so this should have been caught in the original submission.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ