瀏覽代碼

[INET]: Use port unreachable instead of proto for tunnels

This patch changes GRE and SIT to generate port unreachable instead of
protocol unreachable errors when we can't find a matching tunnel for a
packet.

This removes the ambiguity as to whether the error is caused by no
tunnel being found or by the lack of support for the given tunnel
type.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu 19 年之前
父節點
當前提交
45af08be6d
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      net/ipv4/ip_gre.c
  2. 1 1
      net/ipv6/sit.c

+ 1 - 1
net/ipv4/ip_gre.c

@@ -656,7 +656,7 @@ static int ipgre_rcv(struct sk_buff *skb)
 		read_unlock(&ipgre_lock);
 		return(0);
 	}
-	icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PROT_UNREACH, 0);
+	icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);
 
 drop:
 	read_unlock(&ipgre_lock);

+ 1 - 1
net/ipv6/sit.c

@@ -397,7 +397,7 @@ static int ipip6_rcv(struct sk_buff *skb)
 		return 0;
 	}
 
-	icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PROT_UNREACH, 0);
+	icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);
 	kfree_skb(skb);
 	read_unlock(&ipip6_lock);
 out: