[INET]: Use port unreachable instead of proto for tunnels
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 6 Apr 2006 05:31:19 +0000 (22:31 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 10 Apr 2006 05:25:29 +0000 (22:25 -0700)
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>
net/ipv4/ip_gre.c
net/ipv6/sit.c

index 9981dcd68f11e76dc5213832ac20323a6b6dd3d1..ab99bebdcdc89da781df9997c002f9d3a27c6693 100644 (file)
@@ -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);
index c2d3e17beae60cc1b2dcfdf4e4d46c7d57b12d05..6578c3080f47738fb1a2a4d35e4320c2c4d285a2 100644 (file)
@@ -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: