]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
hopefully fixed the multiple-interface iptables-save problem
authorHarald Welte <laforge@gnumonks.org>
Wed, 23 May 2001 23:07:33 +0000 (23:07 +0000)
committerHarald Welte <laforge@gnumonks.org>
Wed, 23 May 2001 23:07:33 +0000 (23:07 +0000)
TODO
iptables-save.c
iptables.c

diff --git a/TODO b/TODO
index baee79c2811a1d2234035b4793136b4de2df46a3..f08bf2e9bf5d351c4e58627b9246488063bf9465 100644 (file)
--- a/TODO
+++ b/TODO
@@ -4,7 +4,7 @@ Currently maintained by Harald Welte <laforge@gnumonks.org>
 Please inform me, if you want to work on any of the TODO items, so I
 can update this list and thus prevent two people doing the same work.
 
-CVS ID: $Id: TODO,v 1.34 2001/05/05 04:39:39 laforge Exp $
+CVS ID: $Id: TODO,v 1.35 2001/05/09 15:45:24 jamesm Exp $
 
 IMPORTANT issues:
 - solution for nostate / notrack (we don't want to track specific conn's)
@@ -22,6 +22,10 @@ X runme error with IPv6 stuff! [HW]
 X SMP conntrack race [RR] (ftp-fixes, included in 2.4.4)
 - static compiling/linking of iptables (for router-on-a-disk) [HW]
 - IPv6 testing (MARK, LOG, REJECT) [HW]
+x iptables-save doesn't work with eth+ style multiple IF stuff [HW]
+X reject-with on REJECT target doesn't work [HW]
+- IPv6 REJECT target doesn't have extension plugin ?!?
+- colon inside prefix doesn't work
 
 NICE to have:
 - multicast connection tracking
index 4dd60a40735f5e1f59f9c2d6deb1862192652e01..282ca7f8890b721270f7ea80e07b5545db3a15b1 100644 (file)
@@ -48,7 +48,7 @@ print_iface(char letter, const char *iface, const unsigned char *mask,
                        if (iface[i] != '\0')
                                printf("%c", iface[i]);
                } else {
-                       if (iface[i] == '\0')
+                       if (iface[i] != '\0')
                                printf("+");
                        break;
                }
index 51aadddb17a63d24b5b6a2d908a972fea592ac55..5e7db06fdcbf5a4d8f47d86ad42551f0ea5cbb62 100644 (file)
@@ -736,19 +736,18 @@ parse_interface(const char *arg, char *vianame, unsigned char *mask)
        else if (vianame[vialen - 1] == '+') {
                memset(mask, 0xFF, vialen - 1);
                memset(mask + vialen - 1, 0, IFNAMSIZ - vialen + 1);
-               /* Remove `+' */
-               vianame[vialen - 1] = '\0';
+               /* Don't remove `+' here! -HW */
        } else {
                /* Include nul-terminator in match */
                memset(mask, 0xFF, vialen + 1);
                memset(mask + vialen + 1, 0, IFNAMSIZ - vialen - 1);
-       }
-       for (i = 0; vianame[i]; i++) {
-               if (!isalnum(vianame[i]) && vianame[i] != '_') {
-                       printf("Warning: wierd character in interface"
-                              " `%s' (No aliases, :, ! or *).\n",
-                              vianame);
-                       break;
+               for (i = 0; vianame[i]; i++) {
+                       if (!isalnum(vianame[i]) && vianame[i] != '_') {
+                               printf("Warning: wierd character in interface"
+                                      " `%s' (No aliases, :, ! or *).\n",
+                                      vianame);
+                               break;
+                       }
                }
        }
 }
@@ -1165,10 +1164,6 @@ print_firewall(const struct ipt_entry *fw,
 
                if (fw->ip.iniface[0] != '\0') {
                        strcat(iface, fw->ip.iniface);
-                       /* If it doesn't compare the nul-term, it's a
-                          wildcard. */
-                       if (fw->ip.iniface_mask[strlen(fw->ip.iniface)] == 0)
-                               strcat(iface, "+");
                }
                else if (format & FMT_NUMERIC) strcat(iface, "*");
                else strcat(iface, "any");
@@ -1182,10 +1177,6 @@ print_firewall(const struct ipt_entry *fw,
 
                if (fw->ip.outiface[0] != '\0') {
                        strcat(iface, fw->ip.outiface);
-                       /* If it doesn't compare the nul-term, it's a
-                          wildcard. */
-                       if (fw->ip.outiface_mask[strlen(fw->ip.outiface)] == 0)
-                               strcat(iface, "+");
                }
                else if (format & FMT_NUMERIC) strcat(iface, "*");
                else strcat(iface, "any");