xfrm: properly handle invalid states as an error
[deliverable/linux.git] / net / xfrm / xfrm_output.c
index bcfda8921b5bf944d38ac3e087eb1cccfac327fe..0cf003dfa8fcd3d4f2f974f21649b164f76429b3 100644 (file)
@@ -64,6 +64,7 @@ static int xfrm_output_one(struct sk_buff *skb, int err)
 
                if (unlikely(x->km.state != XFRM_STATE_VALID)) {
                        XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTSTATEINVALID);
+                       err = -EINVAL;
                        goto error;
                }
 
This page took 0.097188 seconds and 5 git commands to generate.