Skip to content

Commit d69c5c2

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: "The main purpose of this pull request is to fix up the erroneous bonding patch I applied last round. I meant to apply v4 of the patch from Jiri but I applied v3 by accident. Mea culpa. Also, eagle eyed Dan Carpenter noticed that openvswitch has one of those "X = alloc(); if (!Y)" mistakes, test the proper pointer instead." * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: openvswitch: checking wrong variable in queue_userspace_packet() bonding: Fix LACPDU rx_dropped commit.
2 parents eea41ae + 8aa51d6 commit d69c5c2

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

drivers/net/bonding/bond_alb.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -342,33 +342,35 @@ static void rlb_update_entry_from_arp(struct bonding *bond, struct arp_pkt *arp)
342342
_unlock_rx_hashtbl_bh(bond);
343343
}
344344

345-
static void rlb_arp_recv(struct sk_buff *skb, struct bonding *bond,
345+
static int rlb_arp_recv(struct sk_buff *skb, struct bonding *bond,
346346
struct slave *slave)
347347
{
348348
struct arp_pkt *arp;
349349

350350
if (skb->protocol != cpu_to_be16(ETH_P_ARP))
351-
return;
351+
goto out;
352352

353353
arp = (struct arp_pkt *) skb->data;
354354
if (!arp) {
355355
pr_debug("Packet has no ARP data\n");
356-
return;
356+
goto out;
357357
}
358358

359359
if (!pskb_may_pull(skb, arp_hdr_len(bond->dev)))
360-
return;
360+
goto out;
361361

362362
if (skb->len < sizeof(struct arp_pkt)) {
363363
pr_debug("Packet is too small to be an ARP\n");
364-
return;
364+
goto out;
365365
}
366366

367367
if (arp->op_code == htons(ARPOP_REPLY)) {
368368
/* update rx hash table for this ARP */
369369
rlb_update_entry_from_arp(bond, arp);
370370
pr_debug("Server received an ARP Reply from client\n");
371371
}
372+
out:
373+
return RX_HANDLER_ANOTHER;
372374
}
373375

374376
/* Caller must hold bond lock for read */

drivers/net/bonding/bonding.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ struct bonding {
218218
struct slave *primary_slave;
219219
bool force_primary;
220220
s32 slave_cnt; /* never change this value outside the attach/detach wrappers */
221-
void (*recv_probe)(struct sk_buff *, struct bonding *,
221+
int (*recv_probe)(struct sk_buff *, struct bonding *,
222222
struct slave *);
223223
rwlock_t lock;
224224
rwlock_t curr_slave_lock;

net/openvswitch/datapath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ static int queue_userspace_packet(int dp_ifindex, struct sk_buff *skb,
321321
return -ENOMEM;
322322

323323
nskb = __vlan_put_tag(nskb, vlan_tx_tag_get(nskb));
324-
if (!skb)
324+
if (!nskb)
325325
return -ENOMEM;
326326

327327
nskb->vlan_tci = 0;

0 commit comments

Comments
 (0)