OSDN Git Service

net: Convert protocol error handlers from void to int
[tomoyo/tomoyo-test1.git] / net / ipv6 / xfrm6_protocol.c
index b2dc8ce..cc979b7 100644 (file)
@@ -80,14 +80,16 @@ static int xfrm6_esp_rcv(struct sk_buff *skb)
        return 0;
 }
 
-static void xfrm6_esp_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
+static int xfrm6_esp_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
                          u8 type, u8 code, int offset, __be32 info)
 {
        struct xfrm6_protocol *handler;
 
        for_each_protocol_rcu(esp6_handlers, handler)
                if (!handler->err_handler(skb, opt, type, code, offset, info))
-                       break;
+                       return 0;
+
+       return -ENOENT;
 }
 
 static int xfrm6_ah_rcv(struct sk_buff *skb)
@@ -107,14 +109,16 @@ static int xfrm6_ah_rcv(struct sk_buff *skb)
        return 0;
 }
 
-static void xfrm6_ah_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
+static int xfrm6_ah_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
                         u8 type, u8 code, int offset, __be32 info)
 {
        struct xfrm6_protocol *handler;
 
        for_each_protocol_rcu(ah6_handlers, handler)
                if (!handler->err_handler(skb, opt, type, code, offset, info))
-                       break;
+                       return 0;
+
+       return -ENOENT;
 }
 
 static int xfrm6_ipcomp_rcv(struct sk_buff *skb)
@@ -134,14 +138,16 @@ static int xfrm6_ipcomp_rcv(struct sk_buff *skb)
        return 0;
 }
 
-static void xfrm6_ipcomp_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
+static int xfrm6_ipcomp_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
                             u8 type, u8 code, int offset, __be32 info)
 {
        struct xfrm6_protocol *handler;
 
        for_each_protocol_rcu(ipcomp6_handlers, handler)
                if (!handler->err_handler(skb, opt, type, code, offset, info))
-                       break;
+                       return 0;
+
+       return -ENOENT;
 }
 
 static const struct inet6_protocol esp6_protocol = {