File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -501,15 +501,19 @@ static const struct net_device_ops hsr_device_ops = {
501501 .ndo_fix_features = hsr_fix_features ,
502502};
503503
504+ static struct device_type hsr_type = {
505+ .name = "hsr" ,
506+ };
504507
505508void hsr_dev_setup (struct net_device * dev )
506509{
507510 random_ether_addr (dev -> dev_addr );
508511
509512 ether_setup (dev );
510- dev -> header_ops = & hsr_header_ops ;
511- dev -> netdev_ops = & hsr_device_ops ;
512- dev -> tx_queue_len = 0 ;
513+ dev -> header_ops = & hsr_header_ops ;
514+ dev -> netdev_ops = & hsr_device_ops ;
515+ SET_NETDEV_DEVTYPE (dev , & hsr_type );
516+ dev -> tx_queue_len = 0 ;
513517
514518 dev -> destructor = hsr_dev_destroy ;
515519
@@ -525,6 +529,10 @@ void hsr_dev_setup(struct net_device *dev)
525529 * hsr_header_create() etc.
526530 */
527531 dev -> features |= NETIF_F_VLAN_CHALLENGED ;
532+ /* Not sure about this. Taken from bridge code. netdev_features.h says
533+ * it means "Does not change network namespaces".
534+ */
535+ dev -> features |= NETIF_F_NETNS_LOCAL ;
528536}
529537
530538
You can’t perform that action at this time.
0 commit comments