[XFRM]: Allow packet drops during larval state resolution.
[deliverable/linux.git] / net / ipv6 / raw.c
index 009a1047fc3fab58b87c95a62591606e75d7c2a8..a58459a766849fe71e2fa4c08cb67dd65e78aa03 100644 (file)
@@ -818,8 +818,12 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
        if (final_p)
                ipv6_addr_copy(&fl.fl6_dst, final_p);
 
-       if ((err = xfrm_lookup(&dst, &fl, sk, 1)) < 0)
-               goto out;
+       if ((err = __xfrm_lookup(&dst, &fl, sk, 1)) < 0) {
+               if (err == -EREMOTE)
+                       err = ip6_dst_blackhole(sk, &dst, &fl);
+               if (err < 0)
+                       goto out;
+       }
 
        if (hlimit < 0) {
                if (ipv6_addr_is_multicast(&fl.fl6_dst))
This page took 0.039464 seconds and 5 git commands to generate.