Re: [PATCH net-next 3/3] net/ipv6: Add support for onlink flag

2018-01-24 Thread David Miller
From: David Ahern Date: Wed, 24 Jan 2018 15:08:39 -0700 > On 1/23/18 8:00 PM, David Ahern wrote: >> +tbid = l3mdev_fib_table(dev) ? : RT_TABLE_MAIN; >> +if (cfg->fc_table && cfg->fc_table != tbid) { >> +NL_SET_ERR_MSG(extack, >> + "Table id mismatch b

Re: [PATCH net-next 3/3] net/ipv6: Add support for onlink flag

2018-01-24 Thread David Ahern
On 1/23/18 8:00 PM, David Ahern wrote: > + tbid = l3mdev_fib_table(dev) ? : RT_TABLE_MAIN; > + if (cfg->fc_table && cfg->fc_table != tbid) { > + NL_SET_ERR_MSG(extack, > +"Table id mismatch between given table and > device"); > + return -

[PATCH net-next 3/3] net/ipv6: Add support for onlink flag

2018-01-23 Thread David Ahern
Similar to IPv4 allow routes to be added with the RTNH_F_ONLINK flag. The onlink option requires a gateway and a nexthop device. Any unicast gateway is allowed (including IPv4 mapped addresses and unresolved ones) as long as the gateway is not a local address and if it resolves it must match the gi