Skip to content

Commit

Permalink
ipv6: Only act upon NETDEV_*_TYPE_CHANGE if we have ipv6 addresses
Browse files Browse the repository at this point in the history
An interface changing type may not have IPv6 addresses. Don't
call the address configuration type change in this case.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Andrew Lunn authored and David S. Miller committed Dec 5, 2015
1 parent 2f8364a commit 3ef0952
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -3287,7 +3287,8 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,

case NETDEV_PRE_TYPE_CHANGE:
case NETDEV_POST_TYPE_CHANGE:
addrconf_type_change(dev, event);
if (idev)
addrconf_type_change(dev, event);
break;
}

Expand Down

0 comments on commit 3ef0952

Please sign in to comment.