summaryrefslogtreecommitdiff
path: root/net/xfrm/xfrm_device.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-10-02 08:31:17 +0300
committerDavid S. Miller <davem@davemloft.net>2018-10-02 08:31:17 +0300
commit2240c12d7d3de741ffbcf22d7a96358a450051ac (patch)
treebf64abfcc23e730ffb74ead92213dc95f41fc548 /net/xfrm/xfrm_device.c
parent3bd09b05b0689497d8f2e33ae983b1ee10d15eeb (diff)
parent4a132095dd64fefabdc5dad1cd9e9809b126e582 (diff)
downloadlinux-2240c12d7d3de741ffbcf22d7a96358a450051ac.tar.xz
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next
Steffen Klassert says: ==================== pull request (net-next): ipsec-next 2018-10-01 1) Make xfrmi_get_link_net() static to silence a sparse warning. From Wei Yongjun. 2) Remove a unused esph pointer definition in esp_input(). From Haishuang Yan. 3) Allow the NIC driver to quietly refuse xfrm offload in case it does not support it, the SA is created without offload in this case. From Shannon Nelson. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm/xfrm_device.c')
-rw-r--r--net/xfrm/xfrm_device.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_device.c b/net/xfrm/xfrm_device.c
index 260fbba4f03e..144c137886b1 100644
--- a/net/xfrm/xfrm_device.c
+++ b/net/xfrm/xfrm_device.c
@@ -192,9 +192,13 @@ int xfrm_dev_state_add(struct net *net, struct xfrm_state *x,
err = dev->xfrmdev_ops->xdo_dev_state_add(x);
if (err) {
+ xso->num_exthdrs = 0;
+ xso->flags = 0;
xso->dev = NULL;
dev_put(dev);
- return err;
+
+ if (err != -EOPNOTSUPP)
+ return err;
}
return 0;