Commit 45af08be authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller

[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: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cdee5751
...@@ -656,7 +656,7 @@ static int ipgre_rcv(struct sk_buff *skb) ...@@ -656,7 +656,7 @@ static int ipgre_rcv(struct sk_buff *skb)
read_unlock(&ipgre_lock); read_unlock(&ipgre_lock);
return(0); return(0);
} }
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PROT_UNREACH, 0); icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);
drop: drop:
read_unlock(&ipgre_lock); read_unlock(&ipgre_lock);
......
...@@ -397,7 +397,7 @@ static int ipip6_rcv(struct sk_buff *skb) ...@@ -397,7 +397,7 @@ static int ipip6_rcv(struct sk_buff *skb)
return 0; 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); kfree_skb(skb);
read_unlock(&ipip6_lock); read_unlock(&ipip6_lock);
out: out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment