bridge: adding stubs for multicast exports
authorLinus Lüssing <linus.luessing@web.de>
Mon, 7 Jul 2014 03:41:16 +0000 (05:41 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Jul 2014 23:12:53 +0000 (16:12 -0700)
To make users (e.g. batman-adv soon) load- and runnable even if the
bridge was compiled without snooping capabilities - or even if the
kernel was compiled without any bridge code at all.

Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/if_bridge.h

index fd22789d7b2ed3e8003829d6da9be5e57d21a74c..e0c575ca89f7860253502d13d3a2dd760a550ddc 100644 (file)
@@ -36,8 +36,22 @@ extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __use
 
 typedef int br_should_route_hook_t(struct sk_buff *skb);
 extern br_should_route_hook_t __rcu *br_should_route_hook;
+
+#if IS_ENABLED(CONFIG_BRIDGE) && IS_ENABLED(CONFIG_BRIDGE_IGMP_SNOOPING)
 int br_multicast_list_adjacent(struct net_device *dev,
                               struct list_head *br_ip_list);
 bool br_multicast_has_querier_adjacent(struct net_device *dev, int proto);
+#else
+static inline int br_multicast_list_adjacent(struct net_device *dev,
+                                            struct list_head *br_ip_list)
+{
+       return 0;
+}
+static inline bool br_multicast_has_querier_adjacent(struct net_device *dev,
+                                                    int proto)
+{
+       return false;
+}
+#endif
 
 #endif