[Bug 187904] [ipfw] ipfw(8) does not properly recognize the network in shorthand [regression]

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 05 Jan 2023 16:27:21 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=187904

--- Comment #9 from Marek Zarychta <zarychtam@plan-b.pwste.edu.pl> ---
(In reply to Vladislav V. Prodan from comment #8)
I pointed to bug 258874 only as an explanation. It's not any real bug. Neither
is this one IMHO. Classful network notation is deprecated, or at least no more
correct. RFC 791 where it was introduced doesn't officially support shortened
notation scheme. Relying on this scheme in 2023 and demanding support for an
unofficial shortened classful notation for the legacy IP protocol is no more
feasible.

I have run some tests on 13.1-STABLE for both IP protocols and everything seems
to work fine, at least fully consistent with inet (3) man page:

# ipfw table 100 add 0.0.0.0/4
added: 0.0.0.0/4 0
# ipfw table 100 add 0.0.0.0/8
added: 0.0.0.0/8 0
# ipfw table 100 add 127.0.0.0/8
added: 127.0.0.0/8 0

# ipfw table 100 add 18
added: 0.0.0.18/32 0
# ipfw table 100 add 18.12
added: 18.0.0.12/32 0
# ipfw table 100 add 18.34.4
added: 18.34.0.4/32 0

# ipfw table 100 add ::1
added: ::1/128 0
# ipfw table 100 add 2001:db8::/32
added: 2001:db8::/32 0
# ipfw table 100 add 2000::/3
added: 2000::/3 0
# ipfw table 100 add  64:ff9b::8.8.8.8
added: 64:ff9b::808:808/128 0

Anyway, it still could be considered a POLA or ABI violation for 12-STABLE if
it worked before.

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