[Devel] [PATCH 1/5] Cut off br_port fied from net_device

Pavel Emelyanov xemul at openvz.org
Mon Oct 22 05:33:33 PDT 2007


And add the forward declaration for br_handle_frame_hook in
include/linux/if_bridge.h

Signed-off-by: Pavel Emelyanov <xemul at openvz.org>

---

diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h
index 58e43e5..a718586 100644
--- a/include/linux/if_bridge.h
+++ b/include/linux/if_bridge.h
@@ -104,6 +104,8 @@ struct __fdb_entry
 
 #include <linux/netdevice.h>
 
+struct net_bridge_port;
+
 extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *));
 extern struct sk_buff *(*br_handle_frame_hook)(struct net_bridge_port *p,
 					       struct sk_buff *skb);
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 4a3f54e..469e04f 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -699,8 +699,10 @@ struct net_device
 	/* Network namespace this network device is inside */
 	struct net		*nd_net;
 
+#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
 	/* bridge stuff */
 	struct net_bridge_port	*br_port;
+#endif
 	/* macvlan */
 	struct macvlan_port	*macvlan_port;
 
-- 
1.5.3.4




More information about the Devel mailing list