Skip to contentSkip to conversation

ip6tables-save and udp port range

PATCH In review Thomas Woerner 2 participants 2 messages Sep 23, 2003 – Oct 2, 2003 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ip6tables-save and udp port range

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]
#1 lore raw
Quoted 2 lines · Thomas Woerner

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.

thanks, patch applied.

Quoted 2 lines

Thanks in advance
Thomas Woerner

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie