patch-2.1.8 linux/net/ipv4/icmp.c
Next file: linux/net/ipv4/ip_masq.c
Previous file: linux/net/ipv4/af_inet.c
Back to the patch index
Back to the overall index
-  Lines: 32
-  Date:
Sun Nov  3 11:04:43 1996
-  Orig file: 
v2.1.7/linux/net/ipv4/icmp.c
-  Orig date: 
Tue Oct 29 19:58:49 1996
diff -u --recursive --new-file v2.1.7/linux/net/ipv4/icmp.c linux/net/ipv4/icmp.c
@@ -639,7 +639,8 @@
 	int hash;
 	struct inet_protocol *ipprot;
 	unsigned char *dp;	
-	
+	__u32 info = 0;
+
 	iph = (struct iphdr *) (icmph + 1);
 	
 	dp= ((unsigned char *)iph)+(iph->ihl<<2);
@@ -723,11 +724,7 @@
 					 */
 						new_mtu = 68;
 				}
-				/*
-				 * Ugly trick to pass MTU to protocol layer.
-				 * Really we should add argument "info" to error handler.
-				 */
-				iph->id = htons(new_mtu);
+				info = new_mtu;
 				break;
 			}
 #endif
@@ -777,7 +774,7 @@
 
 		if (iph->protocol == ipprot->protocol && ipprot->err_handler) 
 		{
-			ipprot->err_handler(icmph->type, icmph->code, dp,
+			ipprot->err_handler(icmph->type, icmph->code, dp, info,
 					    iph->daddr, iph->saddr, ipprot);
 		}
 
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov