Arnd Bergmann
2015-Jan-13 14:10 UTC
[Bridge] [PATCH] bridge: only provide proxy ARP when CONFIG_INET is enabled
When IPV4 support is disabled, we cannot call arp_send from the bridge code, which would result in a kernel link error: net/built-in.o: In function `br_handle_frame_finish': :(.text+0x59914): undefined reference to `arp_send' :(.text+0x59a50): undefined reference to `arp_tbl' This makes the newly added proxy ARP support in the bridge code depend on the CONFIG_INET symbol and lets the compiler optimize the code out to avoid the link error. Signed-off-by: Arnd Bergmann <arnd at arndb.de> Fixes: 958501163ddd ("bridge: Add support for IEEE 802.11 Proxy ARP") Cc: Kyeyoon Park <kyeyoonp at codeaurora.org> diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c index 1f1de715197c..e2aa7be3a847 100644 --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c @@ -154,7 +154,8 @@ int br_handle_frame_finish(struct sk_buff *skb) dst = NULL; if (is_broadcast_ether_addr(dest)) { - if (p->flags & BR_PROXYARP && + if (IS_ENABLED(CONFIG_INET) && + p->flags & BR_PROXYARP && skb->protocol == htons(ETH_P_ARP)) br_do_proxy_arp(skb, br, vid);
Cong Wang
2015-Jan-13 19:25 UTC
[Bridge] [PATCH] bridge: only provide proxy ARP when CONFIG_INET is enabled
On Tue, Jan 13, 2015 at 6:10 AM, Arnd Bergmann <arnd at arndb.de> wrote:> When IPV4 support is disabled, we cannot call arp_send from > the bridge code, which would result in a kernel link error: > > net/built-in.o: In function `br_handle_frame_finish': > :(.text+0x59914): undefined reference to `arp_send' > :(.text+0x59a50): undefined reference to `arp_tbl' > > This makes the newly added proxy ARP support in the bridge > code depend on the CONFIG_INET symbol and lets the compiler > optimize the code out to avoid the link error. >Not sure how much sense to make CONFIG_BRIDGE depend on CONFIG_INET, at least CONFIG_BONDING does.
David Miller
2015-Jan-14 20:08 UTC
[Bridge] [PATCH] bridge: only provide proxy ARP when CONFIG_INET is enabled
From: Arnd Bergmann <arnd at arndb.de> Date: Tue, 13 Jan 2015 15:10:27 +0100> When IPV4 support is disabled, we cannot call arp_send from > the bridge code, which would result in a kernel link error: > > net/built-in.o: In function `br_handle_frame_finish': > :(.text+0x59914): undefined reference to `arp_send' > :(.text+0x59a50): undefined reference to `arp_tbl' > > This makes the newly added proxy ARP support in the bridge > code depend on the CONFIG_INET symbol and lets the compiler > optimize the code out to avoid the link error. > > Signed-off-by: Arnd Bergmann <arnd at arndb.de> > Fixes: 958501163ddd ("bridge: Add support for IEEE 802.11 Proxy ARP")Applied, thanks Arnd.