datapath: Handle duplicate netdev in netdev_rx_handler_register()
[sliver-openvswitch.git] / datapath / linux-2.6 / compat-2.6 / include / linux / netdevice.h
index 379c1a9..29a7ccc 100644 (file)
@@ -94,6 +94,8 @@ static inline int netdev_rx_handler_register(struct net_device *dev,
                                             void *rx_handler,
                                             void *rx_handler_data)
 {
+       if (dev->br_port)
+               return -EBUSY;
        return 0;
 }
 static inline void netdev_rx_handler_unregister(struct net_device *dev) { }