From: Seth David Schoen <schoen@loyalty.org>
To: Florian Weimer <fw@deneb.enyo.de>
Cc: linux-man@vger.kernel.org, gnu@toad.com
Subject: Re: [PATCH 1/1] ip.7: Add "special and reserved addresses" section
Date: Wed, 24 Mar 2021 12:18:58 -0700 [thread overview]
Message-ID: <20210324191858.GP10062@frotz.zork.net> (raw)
In-Reply-To: <87blb9q7ok.fsf@mid.deneb.enyo.de>
Florian Weimer writes:
> * Seth David Schoen:
>
> > Both things you noted are true: you can change broadcast addresses with
> > ifconfig or ip (e.g. ip addr add x/y broadcast z dev d), and /31 subnets
> > indeed don't have them. This is defined at
>
> There is also the questions of netmask that aren't in the CIDR style
> (so 255.255.0.255 instead of 255.255.255.0). Are they still
> supported?
Nope -- I tried setting such a mask with ifconfig and got EINVAL back
from the kernel, while iproute2 doesn't even allow specifying a netmask
as opposed to a prefix length.
This EINVAL comes from here
https://github.com/torvalds/linux/blob/4ee998b0ef8b6d7b1267cd4d953182224929abba/net/ipv4/devinet.c#L1214
where the bad_mask() macro is checked to see if the mask is valid. (I
haven't reasoned about the way bad_mask() is implemented, but the purpose
of the check seems to be whether the requested mask is CIDR-valid.)
> > I'm not familiar with a way in which it depends on the network device
> > other than the /31 issue. At least, this particular logic isn't
> > affected by other aspects of the network device type.
>
> Are there network devices that are neither point-to-point, nor do they
> have broadcast support?
We've talked about this question a bit in our project before. I don't
believe so, but I can look into it further. It's logically conceivable
that there could be such devices.
> > Could you suggest a way that these details could usefully be described
> > here? The ability to change the broadcast address is very little-used,
> > so I'm not sure many readers would benefit from details about it here,
> > but I also wouldn't want to mislead them about that. Maybe just
> > changing it to "are both designated, by default, as broadcast
> > addresses"?
>
> My main concern is that the language should not imply that something
> cannot happen if it actually can. Otherwise programmers will end up
> using this guidance and create software that won't work in such
> configurations.
That makes sense. Are you OK with the "are both designated, by default,
as broadcast addresses" or similar language?
--
Seth David Schoen <schoen@loyalty.org> | Qué empresa fácil no pensar
http://www.loyalty.org/~schoen/ | en un tigre, reflexioné.
| -- Borges, "El Zahir"
next prev parent reply other threads:[~2021-03-24 19:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-20 0:20 [PATCH 1/1] ip.7: Add "special and reserved addresses" section Seth David Schoen
2021-03-20 19:49 ` Florian Weimer
2021-03-22 17:58 ` Seth David Schoen
2021-03-22 21:29 ` Seth David Schoen
2021-03-24 7:07 ` John Gilmore
2021-03-24 8:26 ` Florian Weimer
2021-03-24 19:18 ` Seth David Schoen [this message]
2021-03-26 22:53 ` Seth David Schoen
2021-03-26 23:45 ` John Gilmore
2021-03-27 0:22 ` Seth David Schoen
2021-03-30 3:21 ` [PATCH v2] " Seth David Schoen
2021-05-06 2:37 ` [RESEND PATCH " Seth David Schoen
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=20210324191858.GP10062@frotz.zork.net \
--to=schoen@loyalty.org \
--cc=fw@deneb.enyo.de \
--cc=gnu@toad.com \
--cc=linux-man@vger.kernel.org \
/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