summaryrefslogtreecommitdiffstats
path: root/net/ipv6/esp6_offload.c
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2017-08-07 08:31:07 +0200
committerSteffen Klassert <steffen.klassert@secunet.com>2017-08-07 08:31:07 +0200
commit4ff0308f06da5016aafb05330ed37809b54f81ae (patch)
treeeafc8bc7473371efb0c0832f415e16ced5af068a /net/ipv6/esp6_offload.c
parent7bab09631c2a303f87a7eb7e3d69e888673b9b7e (diff)
downloadtalos-obmc-linux-4ff0308f06da5016aafb05330ed37809b54f81ae.tar.gz
talos-obmc-linux-4ff0308f06da5016aafb05330ed37809b54f81ae.zip
esp: Fix error handling on layer 2 xmit.
esp_output_tail() and esp6_output_tail() can return negative and positive error values. We currently treat only negative values as errors, fix this to treat both cases as error. Fixes: fca11ebde3f0 ("esp4: Reorganize esp_output") Fixes: 383d0350f2cc ("esp6: Reorganize esp_output") Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/ipv6/esp6_offload.c')
-rw-r--r--net/ipv6/esp6_offload.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/esp6_offload.c b/net/ipv6/esp6_offload.c
index f02f131f6435..1cf437f75b0b 100644
--- a/net/ipv6/esp6_offload.c
+++ b/net/ipv6/esp6_offload.c
@@ -286,7 +286,7 @@ static int esp6_xmit(struct xfrm_state *x, struct sk_buff *skb, netdev_features
esp.seqno = cpu_to_be64(xo->seq.low + ((u64)xo->seq.hi << 32));
err = esp6_output_tail(x, skb, &esp);
- if (err < 0)
+ if (err)
return err;
secpath_reset(skb);
OpenPOWER on IntegriCloud