patch-1.3.60 linux/net/ipv4/ip_forward.c

Next file: linux/net/ipv4/ip_fw.c
Previous file: linux/net/ipv4/igmp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.59/linux/net/ipv4/ip_forward.c linux/net/ipv4/ip_forward.c
@@ -105,7 +105,7 @@
 	 */
 
 	
-	if(!(is_frag&4))
+	if(!(is_frag&IPFWD_MASQUERADED))
 	{
 		fw_res=call_fw_firewall(PF_INET, skb, skb->h.iph);
 		switch (fw_res) {
@@ -153,7 +153,7 @@
 	}
 
 #ifdef CONFIG_IP_MROUTE
-	if(!(is_frag&8))
+	if(!(is_frag&IPFWD_MULTICASTING))
 	{
 #endif	
 		/*
@@ -219,7 +219,7 @@
 		 */
 		dev2=skb->dev;
 		raddr=skb->raddr;
-		if(is_frag&16)		/* VIFF_TUNNEL mode */
+		if(is_frag&IPFWD_MULTITUNNEL)	/* VIFF_TUNNEL mode */
 			encap=20;
 		rt=NULL;
 	}
@@ -238,7 +238,7 @@
 		 * If this fragment needs masquerading, make it so...
 		 * (Dont masquerade de-masqueraded fragments)
 		 */
-		if (!(is_frag&4) && fw_res==FW_MASQUERADE)
+		if (!(is_frag&IPFWD_MASQUERADED) && fw_res==FW_MASQUERADE)
 			ip_fw_masquerade(&skb, dev2);
 #endif
 		IS_SKB(skb);
@@ -280,7 +280,7 @@
 			 */
 			skb2->protocol=htons(ETH_P_IP);
 #ifdef CONFIG_IP_MROUTE
-			if(is_frag&16)
+			if(is_frag&IPFWD_MULTITUNNEL)
 			{
 				skb_reserve(skb,(encap+dev->hard_header_len+15)&~15);	/* 16 byte aligned IP headers are good */
 				ip_encap(skb2,skb->len, dev2, raddr);
@@ -314,7 +314,7 @@
 			skb2 = skb;		
 			skb2->dev=dev2;
 #ifdef CONFIG_IP_MROUTE
-			if(is_frag&16)
+			if(is_frag&IPFWD_MULTITUNNEL)
 				ip_encap(skb,skb->len, dev2, raddr);
 			else
 			{

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this