Skip to content

Commit

Permalink
bonding: fix bond_inet6addr_event()
Browse files Browse the repository at this point in the history
After commit ad1afb0 (vlan_dev: VLAN 0 should be treated
as "no vlan tag" (802.1p packet)),
bond_inet6addr_event() might be called with a NULL bond->vlgrp pointer, and
a non empty bond->vlan_list. vlan_group_get_device() is dereferencing a NULL pointer.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jul 19, 2010
1 parent c26875e commit db5dda9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/bonding/bond_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ static int bond_inet6addr_event(struct notifier_block *this,
}

list_for_each_entry(vlan, &bond->vlan_list, vlan_list) {
if (!bond->vlgrp)
continue;
vlan_dev = vlan_group_get_device(bond->vlgrp,
vlan->vlan_id);
if (vlan_dev == event_dev) {
Expand Down

0 comments on commit db5dda9

Please sign in to comment.