Re: review request: changing the default ifconfig(8) address format to CIDR

Lexi Winter <[email protected]>
Newsgroups gmane.os.freebsd.architechture
Message-ID <[email protected]>
Jessica Clarke:
> On 4 May 2024, at 16:34, Lexi Winter <[email protected]> wrote:
> Do we need to care about supporting (/ do we currently support)
> historical non-contiguous netmasks? At a glance the CIDR code doesn’t
> handle that and will stop at the first 0, so changing to that by
> default would break such setups.

i have never had a need to try this, but i just tested it and it does
not appear to be supported at least in 15.0:

# ifconfig bridge2 create
# ifconfig bridge2 192.0.2.1 netmask 255.0.255.0
# ifconfig bridge2
bridge2: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
	options=0
	ether 58:9c:fc:00:16:69
	inet 192.0.2.1 netmask 0xffff0000 broadcast 192.0.255.255
	[snip]
# ifconfig bridge2 destroy
# ifconfig bridge2 create
# ifconfig bridge2 192.0.2.1 netmask 255.255.255.88
# ifconfig bridge2
bridge2: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
	options=0
	ether 58:9c:fc:00:16:69
	inet 192.0.2.1 netmask 0xffffffe0 broadcast 192.0.2.31
	[snip]

(0xffffffe0 = 255.255.255.224)

a quick Internet search suggests that non-contiguous netmasks were
deprecated when CIDR was introduced, so around 1993.
signature.asc (application/pgp-signature, 659 B)
-----BEGIN PGP SIGNATURE-----

iQGzBAABCAAdFiEEuwt6MaPcv/+Mo+ftDHqbqZ41x5kFAmY2kYwACgkQDHqbqZ41
x5mQNwv8D+5WX257JQXFthozh0HwRkhRsqM425M4eGd/DzATCFlh0qG5zxA8u7NQ
alHaVuLA2s2DtBXvzyBVpfFc5+/rNK92XAMIU6RjCdsqOyNzZ6NZHZb0phDhfz8s
o/n2w1r9BeyIH1jbruD9h9uvcDDrQI2BLORcWcSk6s7aQEr3oVtpXcwYlQZhCXx1
jAXgdUtpNzEeJ4V96SeZBe5nmHTqO+PmPrVI64osPEtBfdiEo36NCHemKeri3h7b
vhuv2nb1VOXNysBGtw5Klb/6jemIExknhsAXzv8whrnAZex5dAPRh1ZhPfuDZthK
xnr7PgkjePp2BOrbli85UhhiLokjgMPpRcxD5zEAjurxfZbZrqAXZLXbJNRobHK9
t0/231XRx1sOXaTvd8qna2zfllZKPhyi5DNqK6A9Vr66IHqh7u0s2PM9YqAD26pK
XeU6m4fuIhxNeD2yR4xT9B5crILs1jSjKpJLeokBCdXmn/snk3Je6SrnDbcZXSDw
CJZZOeqK
=LucQ
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.