From: Fridtjof Busse <fridtjof.busse@gmx.de>
To: netfilter-devel@lists.netfilter.org
Subject: MAC and iptables-save
Date: Fri, 27 Dec 2002 14:51:14 +0100 [thread overview]
Message-ID: <200212271451.14532@fbunet.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 824 bytes --]
Hi
"iptables-restore" doesn't work if "iptables-save" saved a rule with "-m
mac --mac-source"
To reproduce this:
Create a rule:
iptables -A INPUT -i eth0 -m mac --mac-source ! 00:01:02:03:04:05 -j
REJECT
Save this rule:
iptables-save > test.iptables
Load the ruleset:
iptables-restore test.iptables
iptables-restore v1.2.7a: Bad mac address `!00:01:02:03:04:05'
Try `iptables-restore -h' or 'iptables-restore --help' for more
iptables-save doesn't add a space before it prints the mac-address, it
looks like this:
-A INPUT -i wlan0 -m mac --mac !00:02:2D:5C:08:1B -j DROP
instead of:
-A INPUT -i wlan0 -m mac --mac ! 00:02:2D:5C:08:1B -j DROP
Fix attached, since this bug seems to be still in the CVS.
--
Fridtjof Busse
BOFH excuse #63:
not properly grounded, please bury computer
[-- Attachment #2: iptables-1.2.7a-mac.diff --]
[-- Type: text/x-diff, Size: 691 bytes --]
--- extensions/libipt_mac.c.orig Fri Nov 8 18:20:48 2002
+++ extensions/libipt_mac.c Fri Nov 8 18:22:48 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(" ");
--- extensions/libip6t_mac.c.orig Fri Nov 8 18:23:10 2002
+++ extensions/libip6t_mac.c Fri Nov 8 18:23:31 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 reply other threads:[~2002-12-27 13:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-27 13:51 Fridtjof Busse [this message]
2003-01-06 13:00 ` MAC and iptables-save Harald Welte
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=200212271451.14532@fbunet.de \
--to=fridtjof.busse@gmx.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.