aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Nuorvala <vnuorval@tcs.hut.fi>2006-11-24 20:08:58 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:30:27 -0500
commit107a5fe6191249878de0de42bb64d3c35be1a986 (patch)
treebaecf23708782511699974240f20e793ca688556
parent6fb32ddeb2502292bb89e17f58600ce265598ed7 (diff)
[IPV6]: Improve IPv6 tunnel error reporting
Log an error if the remote tunnel endpoint is unable to handle tunneled packets. Signed-off-by: Ville Nuorvala <vnuorval@tcs.hut.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv6/ip6_tunnel.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index daad1e5a2a85..8d918348f5bb 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -424,12 +424,9 @@ ip6ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
424 } 424 }
425 break; 425 break;
426 case ICMPV6_PARAMPROB: 426 case ICMPV6_PARAMPROB:
427 /* ignore if parameter problem not caused by a tunnel 427 teli = 0;
428 encapsulation limit sub-option */ 428 if (code == ICMPV6_HDR_FIELD)
429 if (code != ICMPV6_HDR_FIELD) { 429 teli = parse_tlv_tnl_enc_lim(skb, skb->data);
430 break;
431 }
432 teli = parse_tlv_tnl_enc_lim(skb, skb->data);
433 430
434 if (teli && teli == ntohl(info) - 2) { 431 if (teli && teli == ntohl(info) - 2) {
435 tel = (struct ipv6_tlv_tnl_enc_lim *) &skb->data[teli]; 432 tel = (struct ipv6_tlv_tnl_enc_lim *) &skb->data[teli];
@@ -441,6 +438,10 @@ ip6ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
441 "tunnel!\n", t->parms.name); 438 "tunnel!\n", t->parms.name);
442 rel_msg = 1; 439 rel_msg = 1;
443 } 440 }
441 } else if (net_ratelimit()) {
442 printk(KERN_WARNING
443 "%s: Recipient unable to parse tunneled "
444 "packet!\n ", t->parms.name);
444 } 445 }
445 break; 446 break;
446 case ICMPV6_PKT_TOOBIG: 447 case ICMPV6_PKT_TOOBIG: