diff options
author | David S. Miller <davem@davemloft.net> | 2018-10-02 08:31:17 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-02 08:31:17 +0300 |
commit | 2240c12d7d3de741ffbcf22d7a96358a450051ac (patch) | |
tree | bf64abfcc23e730ffb74ead92213dc95f41fc548 /net/xfrm | |
parent | 3bd09b05b0689497d8f2e33ae983b1ee10d15eeb (diff) | |
parent | 4a132095dd64fefabdc5dad1cd9e9809b126e582 (diff) | |
download | linux-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')
-rw-r--r-- | net/xfrm/xfrm_device.c | 6 | ||||
-rw-r--r-- | net/xfrm/xfrm_interface.c | 2 |
2 files changed, 6 insertions, 2 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; diff --git a/net/xfrm/xfrm_interface.c b/net/xfrm/xfrm_interface.c index 4b4ef4f662d9..dc5b20bf29cf 100644 --- a/net/xfrm/xfrm_interface.c +++ b/net/xfrm/xfrm_interface.c @@ -742,7 +742,7 @@ nla_put_failure: return -EMSGSIZE; } -struct net *xfrmi_get_link_net(const struct net_device *dev) +static struct net *xfrmi_get_link_net(const struct net_device *dev) { struct xfrm_if *xi = netdev_priv(dev); |