diff options
Diffstat (limited to 'net/bridge/br_netlink.c')
-rw-r--r-- | net/bridge/br_netlink.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index b93f42c515da..4fbcea0e7ecb 100644 --- a/net/bridge/br_netlink.c +++ b/net/bridge/br_netlink.c @@ -543,7 +543,7 @@ int br_setlink(struct net_device *dev, struct nlmsghdr *nlh, u16 flags) afspec, RTM_SETLINK); } - if (!(flags & BRIDGE_FLAGS_SELF)) { + if (p && !(flags & BRIDGE_FLAGS_SELF)) { /* set bridge attributes in hardware if supported */ ret_offload = netdev_switch_port_bridge_setlink(dev, nlh, @@ -583,7 +583,7 @@ int br_dellink(struct net_device *dev, struct nlmsghdr *nlh, u16 flags) */ br_ifinfo_notify(RTM_NEWLINK, p); - if (!(flags & BRIDGE_FLAGS_SELF)) { + if (p && !(flags & BRIDGE_FLAGS_SELF)) { /* del bridge attributes in hardware */ ret_offload = netdev_switch_port_bridge_dellink(dev, nlh, |