Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 03 Oct 2021 21:35:21 +0000
From:      bugzilla-noreply@freebsd.org
To:        net@FreeBSD.org
Subject:   [Bug 258874] route add -inet 240/4 results in 0.0.0.0/4 127.0.0.1 UGRS lo0
Message-ID:  <bug-258874-7501-2rAXpQ5wyM@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-258874-7501@https.bugs.freebsd.org/bugzilla/>
References:  <bug-258874-7501@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258874

Alexander V. Chernikov <melifaro@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |melifaro@FreeBSD.org

--- Comment #6 from Alexander V. Chernikov <melifaro@FreeBSD.org> ---
For the record, the previous behaviour was provided by the following code in
route.c:

```
        /*
         * MSB of net should be meaningful. 0/0 is exception.
         */
        if (net > 0)
                while ((net & 0xff000000) =3D=3D 0)
                        net <<=3D 8;
```

https://cgit.freebsd.org/src/tree/sbin/route/route.c?h=3Dstable/12#n1123


This part was removed as a classful bits cleanup here:
https://cgit.freebsd.org/src/commit/sbin/route/route.c?id=3Dd28210b2c2aaf32=
00907ed30d296b0d4856dd03c


I have mixed opinions on that.
Using 10/8 or 240/4 is certainly convenient.
However, it effectively goes again the behaviour specified in inet(3), so it
may be a bit confusing for the people w/o muscular memory on remembering th=
at
worked.
I'd rather prefer to leave it in a current state.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-258874-7501-2rAXpQ5wyM>