Re: [PATCH v2 net-next 08/18] ipv4: Refactor fib_check_nh

2019-04-10 Thread David Ahern
On 4/9/19 10:31 PM, Govindarajulu Varadarajan wrote: > However this worked > > @@ -1096,7 +1096,7 @@ static int fib_check_nh(struct fib_config *cfg, > struct fib_nh *nh, > u32 table = cfg->fc_table; > int err; > > - if (nh->fib_nh_gw_family == AF_INET) > + if (nh->fib_

Re: [PATCH v2 net-next 08/18] ipv4: Refactor fib_check_nh

2019-04-09 Thread Govindarajulu Varadarajan
On Tue, Apr 9, 2019 at 7:13 PM David Ahern wrote: > > On 4/9/19 5:08 PM, Govindarajulu Varadarajan wrote: > > On Fri, Apr 5, 2019 at 4:32 PM David Ahern wrote: > >> > >> From: David Ahern > >> > >> fib_check_nh is currently huge covering multiple uses cases - device only, > >> device + gateway,

Re: [PATCH v2 net-next 08/18] ipv4: Refactor fib_check_nh

2019-04-09 Thread David Ahern
On 4/9/19 5:08 PM, Govindarajulu Varadarajan wrote: > On Fri, Apr 5, 2019 at 4:32 PM David Ahern wrote: >> >> From: David Ahern >> >> fib_check_nh is currently huge covering multiple uses cases - device only, >> device + gateway, and device + gateway with ONLINK. The next patch adds >> validation

Re: [PATCH v2 net-next 08/18] ipv4: Refactor fib_check_nh

2019-04-09 Thread David Ahern
On 4/9/19 5:08 PM, Govindarajulu Varadarajan wrote: > On Fri, Apr 5, 2019 at 4:32 PM David Ahern wrote: >> >> From: David Ahern >> >> fib_check_nh is currently huge covering multiple uses cases - device only, >> device + gateway, and device + gateway with ONLINK. The next patch adds >> validation

Re: [PATCH v2 net-next 08/18] ipv4: Refactor fib_check_nh

2019-04-09 Thread Govindarajulu Varadarajan
On Fri, Apr 5, 2019 at 4:32 PM David Ahern wrote: > > From: David Ahern > > fib_check_nh is currently huge covering multiple uses cases - device only, > device + gateway, and device + gateway with ONLINK. The next patch adds > validation checks for IPv6 which only further complicates it. So, brea

[PATCH v2 net-next 08/18] ipv4: Refactor fib_check_nh

2019-04-05 Thread David Ahern
From: David Ahern fib_check_nh is currently huge covering multiple uses cases - device only, device + gateway, and device + gateway with ONLINK. The next patch adds validation checks for IPv6 which only further complicates it. So, break fib_check_nh into 2 helpers - one for gateway validation and