• stephen hemminger's avatar
    bridge: allow creating bridge devices with netlink · bb900b27
    stephen hemminger authored
    Add netlink device ops to allow creating bridge device via netlink.
    This works in a manner similar to vlan, macvlan and bonding.
    
    Example:
      # ip link add link dev br0 type bridge
      # ip link del dev br0
    
    The change required rearranging initializtion code to deal with
    being called by create link. Most of the initialization happens
    in br_dev_setup, but allocation of stats is done in ndo_init callback
    to deal with allocation failure. Sysfs setup has to wait until
    after the network device kobject is registered.
    Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    bb900b27
br_notify.c 2.55 KB