diff options
author | David S. Miller <davem@davemloft.net> | 2018-10-02 07:31:17 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-02 07:31:17 +0200 |
commit | 2240c12d7d3de741ffbcf22d7a96358a450051ac (patch) | |
tree | bf64abfcc23e730ffb74ead92213dc95f41fc548 /net/xfrm | |
parent | Merge tag 'mlx5e-updates-2018-10-01' of git://git.kernel.org/pub/scm/linux/ke... (diff) | |
parent | xfrm: allow driver to quietly refuse offload (diff) | |
download | linux-2240c12d7d3de741ffbcf22d7a96358a450051ac.tar.xz linux-2240c12d7d3de741ffbcf22d7a96358a450051ac.zip |
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); |