Re: [PATCH 01/11] net: Add l_net_subnet_matches
Denis Kenzior <denkenz at gmail.com>
| Newsgroups | dev.linux.lists.ell |
|---|---|
| Message-ID | <[email protected]> |
Hi Andrew, > I put the following comment in one of the patches: > > + * TODO: check if we have a prefix route covering the IP, > + * l_dhcp6_client doesn't guarantee that the received IP is in > + * on of the subnets marked as on-link in the RA. > You keep repeating this, but I still don't believe this is true. You could have RA gateway address being link-local, or subnet C. The prefix info in the RA could be subnet B and the DHCPv6 address obtained could be in subnet A with no overlap. Why would you want to? Who knows ;) The only 'requirement' is that the gateway is routable. If it isn't, then obviously no traffic can get outside. So I would simply drop this TODO, and any hope of doing any sort of validation. Let the kernel do this. > That's a different discussion. We might want to warn or directly > return an error from the D-Bus .Connect call if the connection is > unusable, rather than ignore it and make the user discover it the hard > way. You could argue that it's usable for local traffic though. > Let the higher layers deal with it. If they need internet connectivity, then services like connman already implement these types of checks. >> If there is no gateway and the DNS address is not 'onlink', what 'implicit' >> route can we add that would make any sense? > > You could add a direct route for that ip, assume it's 'onlink'. But Yeah, no :) > it's really an error situation and should rather be treated that way > IMHO. Sure, but I'd still let the higher levels deal with it. Regards, -Denis