From: Michael Schwendt <rh0209ms@arcor.de>
To: netfilter-devel@lists.netfilter.org
Subject: Re: [PATCH] save inverted MAC match
Date: Thu, 14 Nov 2002 23:43:40 +0100 [thread overview]
Message-ID: <20021114234340.59dbc60a.rh0209ms@arcor.de> (raw)
In-Reply-To: <20021106172119.609b16f8.rh0209ms@arcor.de>
[-- Attachment #1: Type: text/plain, Size: 1101 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wed, 6 Nov 2002 17:21:19 +0100, Michael Schwendt wrote:
> The "mac" userspace extension contains a minor bug for both IPv4 and
> IPv6. Upon printing/saving a rule which matches inverted MAC
> addresses, a space character is missing between the '!' prefix and
> the MAC address. Hence iptables-restore fails to parse the output of
> iptables-save. iptables 1.2.5, 1.2.6a, 1.2.7a and CVS are affected.
>
> Steps to reproduce:
>
> iptables -N test
> iptables -I test -m mac --mac-source ! 01:02:03:04:05:06
> iptables-save | iptables-restore
>
> Further reference:
>
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=77337
In CVS, only the IPv4 code has been fixed (somehow I've missed v1.8
of libipt_mac.c - don't know why).
The IPv6 code still contains the same bug (in CVS libip6t_mac.c
v1.5). Please don't forget to apply the patch.
- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
iD8DBQE91Ccc0iMVcrivHFQRArM7AJ4x4n0YdhEYD45Bg3FYNKHgfky+9gCghax1
Thx88ZNFK4KpS2kSQXXlCgg=
=l7w/
-----END PGP SIGNATURE-----
[-- Attachment #2: iptables-1.2.7a-invertmac.patch --]
[-- Type: application/octet-stream, Size: 577 bytes --]
Red Hat Linux bug #77337: Add missing space between '!' and MAC
address upon printing/saving rules.
diff -Naur iptables-1.2.7a-orig/extensions/libip6t_mac.c iptables-1.2.7a/extensions/libip6t_mac.c
--- iptables-1.2.7a-orig/extensions/libip6t_mac.c Wed May 29 15:08:16 2002
+++ iptables-1.2.7a/extensions/libip6t_mac.c Wed Nov 6 16:50:17 2002
@@ -90,7 +90,7 @@
{
unsigned int i;
- printf("%s%02X", invert ? "!" : "", macaddress[0]);
+ printf("%s%02X", invert ? "! " : "", macaddress[0]);
for (i = 1; i < ETH_ALEN; i++)
printf(":%02X", macaddress[i]);
printf(" ");
next prev parent reply other threads:[~2002-11-14 22:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-06 16:21 [PATCH] save inverted MAC match Michael Schwendt
2002-11-14 22:43 ` Michael Schwendt [this message]
2002-12-12 17:27 ` Michael Schwendt
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=20021114234340.59dbc60a.rh0209ms@arcor.de \
--to=rh0209ms@arcor.de \
--cc=netfilter-devel@lists.netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.