aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/icmp.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-04-14 05:30:23 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-14 05:30:23 -0400
commitdf39e8ba56a788733d369068c7319e04b1da3cd5 (patch)
tree1e9be853bdb455e341cdbf957656f342cfa2eb9e /net/ipv4/icmp.c
parentf5572855ec492334d8c3ec0e0e86c31865d5cf07 (diff)
parent159d83363b629c91d020734207c1bc788b96af5a (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/ehea/ehea_main.c drivers/net/wireless/iwlwifi/Kconfig drivers/net/wireless/rt2x00/rt61pci.c net/ipv4/inet_timewait_sock.c net/ipv6/raw.c net/mac80211/ieee80211_sta.c
Diffstat (limited to 'net/ipv4/icmp.c')
-rw-r--r--net/ipv4/icmp.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index efc7cbe759c9..3e14d9cd29b3 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -578,7 +578,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
578 } 578 }
579 579
580 if (xfrm_decode_session_reverse(skb_in, &fl, AF_INET)) 580 if (xfrm_decode_session_reverse(skb_in, &fl, AF_INET))
581 goto ende; 581 goto relookup_failed;
582 582
583 if (inet_addr_type(net, fl.fl4_src) == RTN_LOCAL) 583 if (inet_addr_type(net, fl.fl4_src) == RTN_LOCAL)
584 err = __ip_route_output_key(net, &rt2, &fl); 584 err = __ip_route_output_key(net, &rt2, &fl);
@@ -588,7 +588,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
588 588
589 fl2.fl4_dst = fl.fl4_src; 589 fl2.fl4_dst = fl.fl4_src;
590 if (ip_route_output_key(net, &rt2, &fl2)) 590 if (ip_route_output_key(net, &rt2, &fl2))
591 goto ende; 591 goto relookup_failed;
592 592
593 /* Ugh! */ 593 /* Ugh! */
594 odst = skb_in->dst; 594 odst = skb_in->dst;
@@ -601,21 +601,23 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
601 } 601 }
602 602
603 if (err) 603 if (err)
604 goto ende; 604 goto relookup_failed;
605 605
606 err = xfrm_lookup((struct dst_entry **)&rt2, &fl, NULL, 606 err = xfrm_lookup((struct dst_entry **)&rt2, &fl, NULL,
607 XFRM_LOOKUP_ICMP); 607 XFRM_LOOKUP_ICMP);
608 if (err == -ENOENT) { 608 switch (err) {
609 case 0:
610 dst_release(&rt->u.dst);
611 rt = rt2;
612 break;
613 case -EPERM:
614 goto ende;
615 default:
616relookup_failed:
609 if (!rt) 617 if (!rt)
610 goto out_unlock; 618 goto out_unlock;
611 goto route_done; 619 break;
612 } 620 }
613
614 dst_release(&rt->u.dst);
615 rt = rt2;
616
617 if (err)
618 goto out_unlock;
619 } 621 }
620 622
621route_done: 623route_done: