patch-2.1.89 linux/net/ipv4/ip_gre.c

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

diff -u --recursive --new-file v2.1.88/linux/net/ipv4/ip_gre.c linux/net/ipv4/ip_gre.c
@@ -554,7 +554,7 @@
 		}
 		if (tunnel->parms.i_flags&GRE_SEQ) {
 			if (!(flags&GRE_SEQ) ||
-			    (tunnel->i_seqno && seqno - tunnel->i_seqno < 0)) {
+			    (tunnel->i_seqno && (s32)(seqno - tunnel->i_seqno) < 0)) {
 				tunnel->stat.rx_fifo_errors++;
 				tunnel->stat.rx_errors++;
 				goto drop;
@@ -704,12 +704,7 @@
 		if (jiffies - tunnel->err_time < IPTUNNEL_ERR_TIMEO) {
 			tunnel->err_count--;
 
-			if (skb->protocol == __constant_htons(ETH_P_IP))
-				icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_UNREACH, 0);
-#ifdef CONFIG_IPV6
-			else if (skb->protocol == __constant_htons(ETH_P_IPV6))
-				icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_ADDR_UNREACH, 0, dev);
-#endif
+			dst_link_failure(skb);
 		} else
 			tunnel->err_count = 0;
 	}
@@ -792,12 +787,7 @@
 	return 0;
 
 tx_error_icmp:
-	if (skb->protocol == __constant_htons(ETH_P_IP))
-		icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_UNREACH, 0);
-#ifdef CONFIG_IPV6
-	else if (skb->protocol == __constant_htons(ETH_P_IPV6))
-		icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_ADDR_UNREACH, 0, dev);
-#endif
+	dst_link_failure(skb);
 
 tx_error:
 	stats->tx_errors++;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov