ell.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz at gmail.com>
To: ell at lists.01.org
Subject: Re: [PATCH 01/11] net: Add l_net_subnet_matches
Date: Tue, 19 Apr 2022 15:12:20 -0500	[thread overview]
Message-ID: <f705212f-f095-1fd5-d975-dbaf8c292885@gmail.com> (raw)
In-Reply-To: CAOq732LGogmh7t7y81wsiUOmDevHT=ow2P8bvQzv_6XvXQp44w@mail.gmail.com

[-- Attachment #1: Type: text/plain, Size: 1406 bytes --]

Hi Andrew,

> With IPv6 Router Advertisements you can have knowledge of multiple
> on-link prefixes.  The gateway needs to match one of them in exactly
> the same way as with IPv4.

But netconfig is not doing this matching? The kernel is?  icmp6 simply puts in 
the default gateway info and the prefix routes into the routing table.  I don't 
think it is 'our problem' if the prefixes and route info from the RA results in 
the RA address not being routable.


> Well, if that address you're trying to validate (e.g. let's say your
> DNS IP) is on-link, which you'd find out from the RA, then you don't
> need to add anything to the routing table because your RA handler will
> already have added that route.  If it's not and there's no default
> router, then either it's an error or you might want to implicitly add
> a route for it.

If there is no gateway and the DNS address is not 'onlink', what 'implicit' 
route can we add that would make any sense?  Isn't the address simply unreachable?

Why would we be 'validating' the DNS address in the first place?  How would we 
validate it?

> 
> But the way you'd find out whether given IP is on-link is by calling
> l_net_subnet_matches for each prefix.  Their lengths vary from 0 to
> 128 like the RFC says.

Anyhow, just rename this function l_net_prefix_matches, since that is what you 
really intend.

Regards,
-Denis

             reply	other threads:[~2022-04-19 20:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-19 20:12 Denis Kenzior [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-04-21 11:02 [PATCH 01/11] net: Add l_net_subnet_matches Andrew Zaborowski
2022-04-21  2:36 Denis Kenzior
2022-04-20 22:34 Andrew Zaborowski
2022-04-19 18:48 Andrew Zaborowski
2022-04-19 15:02 Denis Kenzior
2022-04-19  7:42 Andrew Zaborowski
2022-04-18 17:59 Denis Kenzior
2022-04-18 17:21 Andrew Zaborowski
2022-04-18 17:04 Denis Kenzior
2022-04-18 17:01 Andrew Zaborowski
2022-04-18 16:34 Denis Kenzior
2022-04-11 14:20 Andrew Zaborowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f705212f-f095-1fd5-d975-dbaf8c292885@gmail.com \
    --to=ell@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).