Skip to contentSkip to conversation

ip6tables-save and udp port range

PATCH Thomas Woerner 1 participant 1 message Sep 22, 2003 netfilter

lore
Share & tools
lore
#0 lore raw

Hello,

ip6tables-save is not saving an udp port range if one of the ports is 0x0 or 0xFFFF. This is aleady fixed in the ipv4 version.

I have attached the patch.

Thanks in advance
Thomas Woerner

Signature · 4 lines
Thomas Woerner, Software Engineer      Phone: +49-711-96437-0
Red Hat GmbH                           Fax  : +49-711-96437-111
Hauptstaetterstr. 58                   Email: [email protected]
D-70178 Stuttgart                      Web  : http://www.redhat.de/
extensions/libip6t_udp.c renamed from extensions/libip6t_udp.c.save_ports +2 -2
@@ -205,7 +205,7 @@
 	const struct ip6t_udp *udpinfo = (struct ip6t_udp *)match->data;
 
 	if (udpinfo->spts[0] != 0
-	    && udpinfo->spts[1] != 0xFFFF) {
+	    || udpinfo->spts[1] != 0xFFFF) {
 		if (udpinfo->invflags & IP6T_UDP_INV_SRCPT)
 			printf("! ");
 		if (udpinfo->spts[0]
@@ -219,7 +219,7 @@
 	}
 
 	if (udpinfo->dpts[0] != 0
-	    && udpinfo->dpts[1] != 0xFFFF) {
+	    || udpinfo->dpts[1] != 0xFFFF) {
 		if (udpinfo->invflags & IP6T_UDP_INV_DSTPT)
 			printf("! ");
 		if (udpinfo->dpts[0]