diff options
Diffstat (limited to 'drivers/net/bonding/bond_3ad.c')
-rw-r--r-- | drivers/net/bonding/bond_3ad.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 3463b469e657..3031e0413114 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c | |||
@@ -2460,18 +2460,21 @@ out: | |||
2460 | return NETDEV_TX_OK; | 2460 | return NETDEV_TX_OK; |
2461 | } | 2461 | } |
2462 | 2462 | ||
2463 | int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct bonding *bond, | 2463 | int bond_3ad_lacpdu_recv(const struct sk_buff *skb, struct bonding *bond, |
2464 | struct slave *slave) | 2464 | struct slave *slave) |
2465 | { | 2465 | { |
2466 | int ret = RX_HANDLER_ANOTHER; | 2466 | int ret = RX_HANDLER_ANOTHER; |
2467 | struct lacpdu *lacpdu, _lacpdu; | ||
2468 | |||
2467 | if (skb->protocol != PKT_TYPE_LACPDU) | 2469 | if (skb->protocol != PKT_TYPE_LACPDU) |
2468 | return ret; | 2470 | return ret; |
2469 | 2471 | ||
2470 | if (!pskb_may_pull(skb, sizeof(struct lacpdu))) | 2472 | lacpdu = skb_header_pointer(skb, 0, sizeof(_lacpdu), &_lacpdu); |
2473 | if (!lacpdu) | ||
2471 | return ret; | 2474 | return ret; |
2472 | 2475 | ||
2473 | read_lock(&bond->lock); | 2476 | read_lock(&bond->lock); |
2474 | ret = bond_3ad_rx_indication((struct lacpdu *) skb->data, slave, skb->len); | 2477 | ret = bond_3ad_rx_indication(lacpdu, slave, skb->len); |
2475 | read_unlock(&bond->lock); | 2478 | read_unlock(&bond->lock); |
2476 | return ret; | 2479 | return ret; |
2477 | } | 2480 | } |