diff options
author | Steffen Klassert <steffen.klassert@secunet.com> | 2017-04-14 10:07:28 +0200 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2017-04-14 10:07:28 +0200 |
commit | f6e27114a60a0afdec40db1bf7f6da37b565745a (patch) | |
tree | 2465286baa3d77a51e27c2249db8d14f402b540f /include/net | |
parent | b3859c8ebffe26ddf7aec0b23a83389d6f2419f9 (diff) | |
download | linux-f6e27114a60a0afdec40db1bf7f6da37b565745a.tar.gz linux-f6e27114a60a0afdec40db1bf7f6da37b565745a.tar.bz2 linux-f6e27114a60a0afdec40db1bf7f6da37b565745a.zip |
net: Add a xfrm validate function to validate_xmit_skb
When we do IPsec offloading, we need a fallback for
packets that were targeted to be IPsec offloaded but
rerouted to a device that does not support IPsec offload.
For that we add a function that checks the offloading
features of the sending device and and flags the
requirement of a fallback before it calls the IPsec
output function. The IPsec output function adds the IPsec
trailer and does encryption if needed.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/xfrm.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 17603bf190c1..6793a30c66b1 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -1862,6 +1862,7 @@ static inline struct xfrm_offload *xfrm_offload(struct sk_buff *skb) #ifdef CONFIG_XFRM_OFFLOAD void __net_init xfrm_dev_init(void); +int validate_xmit_xfrm(struct sk_buff *skb, netdev_features_t features); int xfrm_dev_state_add(struct net *net, struct xfrm_state *x, struct xfrm_user_offload *xuo); bool xfrm_dev_offload_ok(struct sk_buff *skb, struct xfrm_state *x); @@ -1890,6 +1891,11 @@ static inline void __net_init xfrm_dev_init(void) { } +static inline int validate_xmit_xfrm(struct sk_buff *skb, netdev_features_t features) +{ + return 0; +} + static inline int xfrm_dev_state_add(struct net *net, struct xfrm_state *x, struct xfrm_user_offload *xuo) { return 0; |