From patchwork Mon Jul 7 03:41:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Linus_L=C3=BCssing?= X-Patchwork-Id: 4090 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=212.227.17.12; helo=mout.web.de; envelope-from=linus.luessing@web.de; receiver=b.a.t.m.a.n@lists.open-mesh.org Received: from mout.web.de (mout.web.de [212.227.17.12]) by open-mesh.org (Postfix) with ESMTPS id E82DB600823 for ; Mon, 7 Jul 2014 05:41:07 +0200 (CEST) Received: from localhost ([82.83.72.255]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0LnB9V-1WPhMx47uH-00hPEU; Mon, 07 Jul 2014 05:41:03 +0200 From: =?UTF-8?q?Linus=20L=C3=BCssing?= To: netdev@vger.kernel.org Date: Mon, 7 Jul 2014 05:41:16 +0200 Message-Id: <1404704477-19448-2-git-send-email-linus.luessing@web.de> X-Mailer: git-send-email 2.0.1 In-Reply-To: <1404704477-19448-1-git-send-email-linus.luessing@web.de> References: <1404704477-19448-1-git-send-email-linus.luessing@web.de> MIME-Version: 1.0 X-Provags-ID: V03:K0:1ztJ0mk2jVRfj0qACdQUQs+T1xzIoUiNOYbdNbJAJcOSxFthj3W iVt5g2BJQjmD0HVRWlZ2auqu4AotTp1dG/tOOHVAC4kkK856LNJ3PGAL+rjLZG/no/b/4ZN wehLWGzTuf4u2jcOyghqEdLhgXu+nl6dmLvzwyVC4N1IwNLVYmv4ZpPId7/ahkxBG1++g9H K7JKNuP/WFxiEeTFk0c3g== Cc: b.a.t.m.a.n@lists.open-mesh.org, bridge@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Stephen Hemminger , "David S. Miller" Subject: [B.A.T.M.A.N.] [PATCH net-next 1/2] bridge: adding stubs for multicast exports X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2014 03:41:08 -0000 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 --- include/linux/if_bridge.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h index fd22789..e0c575c 100644 --- a/include/linux/if_bridge.h +++ b/include/linux/if_bridge.h @@ -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