Hi there, The save function in libipt_mport.c doesn't handle ranges correctly or find the list terminator, and iptables-save output cannot be restored. The attached patch fixes these.
Regards, -Bob
--- netfilter/userspace/extensions/libipt_mport.c Sat Apr 6 23:32:50 2002 +++ netfilter/userspace/extensions/libipt_mport.c Sun Apr 7 14:51:18 2002 @@ -270,7 +270,7 @@ for (i=0; i < IPT_MULTI_PORTS; i++) { if (pflags & (1<<i) - && !(~minfo->ports[i])) + && minfo->ports[i] == 65535) break; if (i == IPT_MULTI_PORTS-1 && minfo->ports[i-1] == minfo->ports[i]) @@ -279,7 +279,7 @@ print_port(minfo->ports[i], ip->proto, 0); if (pflags & (1<<i)) { printf(":"); - print_port(minfo->ports[i++], ip->proto, 0); + print_port(minfo->ports[++i], ip->proto, 0); } } printf(" ");