diff options
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 62d2409bb293..bc13b3d77432 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -1444,8 +1444,9 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb) | |||
1444 | struct sk_buff *skb = *pskb; | 1444 | struct sk_buff *skb = *pskb; |
1445 | struct slave *slave; | 1445 | struct slave *slave; |
1446 | struct bonding *bond; | 1446 | struct bonding *bond; |
1447 | void (*recv_probe)(struct sk_buff *, struct bonding *, | 1447 | int (*recv_probe)(struct sk_buff *, struct bonding *, |
1448 | struct slave *); | 1448 | struct slave *); |
1449 | int ret = RX_HANDLER_ANOTHER; | ||
1449 | 1450 | ||
1450 | skb = skb_share_check(skb, GFP_ATOMIC); | 1451 | skb = skb_share_check(skb, GFP_ATOMIC); |
1451 | if (unlikely(!skb)) | 1452 | if (unlikely(!skb)) |
@@ -1464,8 +1465,12 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb) | |||
1464 | struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC); | 1465 | struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC); |
1465 | 1466 | ||
1466 | if (likely(nskb)) { | 1467 | if (likely(nskb)) { |
1467 | recv_probe(nskb, bond, slave); | 1468 | ret = recv_probe(nskb, bond, slave); |
1468 | dev_kfree_skb(nskb); | 1469 | dev_kfree_skb(nskb); |
1470 | if (ret == RX_HANDLER_CONSUMED) { | ||
1471 | consume_skb(skb); | ||
1472 | return ret; | ||
1473 | } | ||
1469 | } | 1474 | } |
1470 | } | 1475 | } |
1471 | 1476 | ||
@@ -1487,7 +1492,7 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb) | |||
1487 | memcpy(eth_hdr(skb)->h_dest, bond->dev->dev_addr, ETH_ALEN); | 1492 | memcpy(eth_hdr(skb)->h_dest, bond->dev->dev_addr, ETH_ALEN); |
1488 | } | 1493 | } |
1489 | 1494 | ||
1490 | return RX_HANDLER_ANOTHER; | 1495 | return ret; |
1491 | } | 1496 | } |
1492 | 1497 | ||
1493 | /* enslave device <slave> to bond device <master> */ | 1498 | /* enslave device <slave> to bond device <master> */ |
@@ -2723,7 +2728,7 @@ static void bond_validate_arp(struct bonding *bond, struct slave *slave, __be32 | |||
2723 | } | 2728 | } |
2724 | } | 2729 | } |
2725 | 2730 | ||
2726 | static void bond_arp_rcv(struct sk_buff *skb, struct bonding *bond, | 2731 | static int bond_arp_rcv(struct sk_buff *skb, struct bonding *bond, |
2727 | struct slave *slave) | 2732 | struct slave *slave) |
2728 | { | 2733 | { |
2729 | struct arphdr *arp; | 2734 | struct arphdr *arp; |
@@ -2731,7 +2736,7 @@ static void bond_arp_rcv(struct sk_buff *skb, struct bonding *bond, | |||
2731 | __be32 sip, tip; | 2736 | __be32 sip, tip; |
2732 | 2737 | ||
2733 | if (skb->protocol != __cpu_to_be16(ETH_P_ARP)) | 2738 | if (skb->protocol != __cpu_to_be16(ETH_P_ARP)) |
2734 | return; | 2739 | return RX_HANDLER_ANOTHER; |
2735 | 2740 | ||
2736 | read_lock(&bond->lock); | 2741 | read_lock(&bond->lock); |
2737 | 2742 | ||
@@ -2776,6 +2781,7 @@ static void bond_arp_rcv(struct sk_buff *skb, struct bonding *bond, | |||
2776 | 2781 | ||
2777 | out_unlock: | 2782 | out_unlock: |
2778 | read_unlock(&bond->lock); | 2783 | read_unlock(&bond->lock); |
2784 | return RX_HANDLER_ANOTHER; | ||
2779 | } | 2785 | } |
2780 | 2786 | ||
2781 | /* | 2787 | /* |