Similiar problems exist with tunnels and masquerading. In some cases incoming
tunnel packets can end up being checked by ip_fw_demasquerade() which will
fail causing the packet to be dropped.
The following works but it would be more appropriate to change the code so
that ip_fw_demasquerade() only attempts to demasquerade a specific
set of protocols: IPPROTO_ICMP, IPPROTO_UDP, IPPROTO_TCP and IPPROTO_IPV6 etc.
--- ip_masq.c.save Mon Dec 21 10:47:21 1998
+++ ip_masq.c Mon Dec 21 10:56:24 1998
@@ -1776,7 +1776,11 @@
size = ntohs(iph->tot_len) - (iph->ihl * 4);
doff = proto_doff(iph->protocol, h.raw, size);
- if (doff < 0) {
+ /* added check for tunnels,
+ * Wouldn't it be better to only do demasquerading if protocol is
+ * IPPROTO_ICMP, IPPROTO_UDP, IPPROTO_TCP?
+ */
+ if (iph->protocol != IPPROTO_IPIP && iph->protocol != IPPROTO_GRE && doff < 0) {
IP_MASQ_DEBUG(0, "I-pkt invalid packet data size\n");
return -1;
}
-- Stuart Lynne <sl@fireplug.net> 604-461-7532 <http://edge.fireplug.net> PGP Fingerprint: 28 E2 A0 15 99 62 9A 00 88 EC A3 EE 2D 1C 15 68 - To unsubscribe from this list: send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.rutgers.edu