Commit 4e5a7332 authored by Tariq Toukan's avatar Tariq Toukan Committed by Jakub Kicinski

net/tls: Except bond interface from some TLS checks

In the tls_dev_event handler, ignore tlsdev_ops requirement for bond
interfaces, they do not exist as the interaction is done directly with
the lower device.

Also, make the validate function pass when it's called with the upper
bond interface.
Signed-off-by: default avatarTariq Toukan <tariqt@nvidia.com>
Reviewed-by: default avatarBoris Pismenny <borisp@nvidia.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 153cbd13
...@@ -1329,6 +1329,8 @@ static int tls_dev_event(struct notifier_block *this, unsigned long event, ...@@ -1329,6 +1329,8 @@ static int tls_dev_event(struct notifier_block *this, unsigned long event,
switch (event) { switch (event) {
case NETDEV_REGISTER: case NETDEV_REGISTER:
case NETDEV_FEAT_CHANGE: case NETDEV_FEAT_CHANGE:
if (netif_is_bond_master(dev))
return NOTIFY_DONE;
if ((dev->features & NETIF_F_HW_TLS_RX) && if ((dev->features & NETIF_F_HW_TLS_RX) &&
!dev->tlsdev_ops->tls_dev_resync) !dev->tlsdev_ops->tls_dev_resync)
return NOTIFY_BAD; return NOTIFY_BAD;
......
...@@ -424,7 +424,7 @@ struct sk_buff *tls_validate_xmit_skb(struct sock *sk, ...@@ -424,7 +424,7 @@ struct sk_buff *tls_validate_xmit_skb(struct sock *sk,
struct net_device *dev, struct net_device *dev,
struct sk_buff *skb) struct sk_buff *skb)
{ {
if (dev == tls_get_ctx(sk)->netdev) if (dev == tls_get_ctx(sk)->netdev || netif_is_bond_master(dev))
return skb; return skb;
return tls_sw_fallback(sk, skb); return tls_sw_fallback(sk, skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment