Skip to contentSkip to conversation

: fix ipt_MASQUERADE in latest -bk

PATCH In review Patrick McHardy 2 participants 2 messages Aug 29, 2003 – Aug 30, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : fix ipt_MASQUERADE in latest -bk

Hi Harald,
this change broke masquerading, key.oif is uninitialized and routing lookups fail:

[NETFILTER]: Fix masquerade routing check, backport to 2.4 by [email protected]

This patch fixes it.

Best regards,
Patrick

===== net/ipv4/netfilter/ipt_MASQUERADE.c 1.6 vs edited =====

net/ipv4/netfilter/ipt_MASQUERADE.c +1 -0
@@ -87,6 +87,7 @@
 	key.dst = (*pskb)->nh.iph->daddr;
 	key.src = 0; /* Unknown: that's what we're trying to establish */
 	key.tos = RT_TOS((*pskb)->nh.iph->tos)|RTO_CONN;
+	key.oif = 0;
 #ifdef CONFIG_IP_ROUTE_FWMARK
 	key.fwmark = (*pskb)->nfmark;
 #endif
#1 lore raw
Quoted 3 lines · Patrick McHardy

Hi Harald,
this change broke masquerading, key.oif is uninitialized and routing lookups fail:

thanks, I'll submit this today.

Quoted 2 lines

Best regards,
Patrick

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