From nobody Sat Oct 22 21:15:08 2022
X-Original-To: bugs@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MvvHd0QQrz4g7vd
	for <bugs@mlmmj.nyi.freebsd.org>; Sat, 22 Oct 2022 21:15:09 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4MvvHc5LLXz3H7y
	for <bugs@FreeBSD.org>; Sat, 22 Oct 2022 21:15:08 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MvvHc4QFCzgxv
	for <bugs@FreeBSD.org>; Sat, 22 Oct 2022 21:15:08 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
Received: from kenobi.freebsd.org ([127.0.1.5])
	by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 29MLF8sd030211
	for <bugs@FreeBSD.org>; Sat, 22 Oct 2022 21:15:08 GMT
	(envelope-from bugzilla-noreply@freebsd.org)
Received: (from www@localhost)
	by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 29MLF8Uj030210
	for bugs@FreeBSD.org; Sat, 22 Oct 2022 21:15:08 GMT
	(envelope-from bugzilla-noreply@freebsd.org)
X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f
From: bugzilla-noreply@freebsd.org
To: bugs@FreeBSD.org
Subject: [Bug 267278] ipfw mask addr:mask syntax creates wrong rule
Date: Sat, 22 Oct 2022 21:15:08 +0000
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: Base System
X-Bugzilla-Component: bin
X-Bugzilla-Version: 13.1-STABLE
X-Bugzilla-Keywords: 
X-Bugzilla-Severity: Affects Only Me
X-Bugzilla-Who: igor.polovykh@gmail.com
X-Bugzilla-Status: New
X-Bugzilla-Resolution: 
X-Bugzilla-Priority: ---
X-Bugzilla-Assigned-To: bugs@FreeBSD.org
X-Bugzilla-Flags: 
X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform
 op_sys bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-267278-227@https.bugs.freebsd.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/
Auto-Submitted: auto-generated
List-Id: Bug reports <freebsd-bugs.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/freebsd-bugs
List-Help: <mailto:freebsd-bugs+help@freebsd.org>
List-Post: <mailto:freebsd-bugs@freebsd.org>
List-Subscribe: <mailto:freebsd-bugs+subscribe@freebsd.org>
List-Unsubscribe: <mailto:freebsd-bugs+unsubscribe@freebsd.org>
Sender: owner-freebsd-bugs@freebsd.org
MIME-Version: 1.0
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1666473308;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=mFUraKjK9yZzVQYv5Ccong06E8F6bYpfdL3SWehFbSQ=;
	b=uEiADNGiW7qt8QlbBwSieLdMfyLeXCh6AYaBvX+7+HCe4K7XBsJEdpdTkGEH9DPpTWjz+K
	QXhXn0a1+KkFjL2Rzh6l23gByYdJ7EdZtHMZ+Gp1cQb9rxLO1P5mxOZ83aIr0wTnY92UpB
	vJaWZUQawCYT1SCLrsGNyMzvsk233lHUETHCJO5rIs2wz0/YMdUBTTtgU6N/yvq6jq+0PG
	dDFXBckWUzIgdS/OT8y/CTPGbImjfc0GUbxVJy7e9LwLQkBDqNZtNwaH0nDSsbys2mR9LS
	8FTn0wUqxId5fPK7MzsiSi/fBVgnQY291j/v9fWJaFOh8SZuK350pyzAQwC56A==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666473308; a=rsa-sha256; cv=none;
	b=gQ6RDKAexEYQXYHZUFGzRcyQTJSM0AAXqS98b7TCVSsx1DheWlUDEfp/og7jUB5Z9YN+Kc
	YgMyChMIstTzSrbY7BG7lac7UYkY6PJ6fwIw+ubVBLY0GZI/wJWZQRLq8e4PqAvVUmuHKR
	yLxw+vB7oDqkrzu0r80fZFLD8G6aE7YMgMJxhMRW7/NXqBuVFX4P4WlcZ6iK9bn4wRZ7BF
	CFSeg5HPkUsI5FJXmlbk0IiDT7sG8et41vLNpJdoOBJalOEzGgrLZjiDKjVWXNnBE4yNpa
	k5TyI70QEeWmGqQjTiWgVbYij6yomXTow7HEHQpGg9pQBo0DglO/M8XyIHoqCQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
X-ThisMailContainsUnwantedMimeParts: N

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D267278

            Bug ID: 267278
           Summary: ipfw mask addr:mask syntax creates wrong rule
           Product: Base System
           Version: 13.1-STABLE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: igor.polovykh@gmail.com

man ipfw

     ip-addr:
             A host or subnet address specified in one of the following way=
s:

...............

             addr:mask
                     Matches all addresses with base addr (specified as an =
IP
                     address, a network number, or a hostname) and the mask=
 of
                     mask, specified as a dotted quad.  As an example,
                     1.2.3.4:255.0.255.0 or 1.0.3.0:255.0.255.0 will match
                     1.*.3.*.  This form is advised only for non-contiguous
                     masks.  It is better to resort to the addr/masklen for=
mat
                     for contiguous masks, which is more compact and less e=
r-
                     ror-prone.
...........

I tried to set rule to block many broadcasts from several subnets
ipfw add deny ip from any to 1.2.0.255:0.0.255.0

but when I look at created rules table with 'ipfw show' I see:
....
03300     0       0 deny ip from any to 0.0.0.0:0.0.255.0
....

This is not I expected and manual page says about it.

I expected:
03300     0       0 deny ip from any to 1.2.0.255:0.0.255.0

Perhaps I don't understand something.

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