diff options
Diffstat (limited to '')
-rw-r--r-- | drivers/net/macvlan.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index e226a96da..e1f95fd08 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c @@ -1137,7 +1137,7 @@ void macvlan_common_setup(struct net_device *dev) { ether_setup(dev); - dev->min_mtu = 0; + /* ether_setup() has set dev->min_mtu to ETH_MIN_MTU. */ dev->max_mtu = ETH_MAX_MTU; dev->priv_flags &= ~IFF_TX_SKB_SHARING; netif_keep_dst(dev); @@ -1471,8 +1471,10 @@ destroy_macvlan_port: /* the macvlan port may be freed by macvlan_uninit when fail to register. * so we destroy the macvlan port only when it's valid. */ - if (create && macvlan_port_get_rtnl(lowerdev)) + if (create && macvlan_port_get_rtnl(lowerdev)) { + macvlan_flush_sources(port, vlan); macvlan_port_destroy(port->dev); + } return err; } EXPORT_SYMBOL_GPL(macvlan_common_newlink); |