netdev
[Top] [All Lists]

[PATCH] IPV6: missing xfrm_loock() in icmpv6_{send,echo_reply}()

To: davem@xxxxxxxxxxxxx
Subject: [PATCH] IPV6: missing xfrm_loock() in icmpv6_{send,echo_reply}()
From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx>
Date: Wed, 15 Sep 2004 09:04:24 +0900 (JST)
Cc: netdev@xxxxxxxxxxx, yoshfuji@xxxxxxxxxxxxxx, miyazawa@xxxxxxxxxxxxxx
Organization: USAGI Project
Sender: netdev-bounce@xxxxxxxxxxx
Hello.

net/ipv6/icmp.c was not converted in xfrm_lookup() extraction patch.
This patch converts it; adding the missing call to xfrm_lookup in
icmpv6_{send,echo_reply}().

Signed-off-by: Kazunori Miyazawa <kazunori@xxxxxxxxxxxx>
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@xxxxxxxxxxxxxx>

Thanks.

===== net/ipv6/icmp.c 1.58 vs edited =====
--- 1.58/net/ipv6/icmp.c        2004-08-24 06:29:43 +09:00
+++ edited/net/ipv6/icmp.c      2004-09-15 08:53:05 +09:00
@@ -372,6 +372,8 @@
        err = ip6_dst_lookup(sk, &dst, &fl);
        if (err)
                goto out;
+       if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0)
+               goto out_dst_release;
 
        if (hlimit < 0) {
                if (ipv6_addr_is_multicast(&fl.fl6_dst))
@@ -458,6 +460,8 @@
        err = ip6_dst_lookup(sk, &dst, &fl);
        if (err)
                goto out;
+       if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0)
+               goto out_dst_release;
 
        if (hlimit < 0) {
                if (ipv6_addr_is_multicast(&fl.fl6_dst))
@@ -489,6 +493,7 @@
 out_put: 
        if (likely(idev != NULL))
                in6_dev_put(idev);
+out_dst_release:
        dst_release(dst);
 out: 
        icmpv6_xmit_unlock();


-- 
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@xxxxxxxxxxxxxx>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA

<Prev in Thread] Current Thread [Next in Thread>