linux-stable/net/bridge
Matteo Croce 30515832e9 net: bridge: fix build when IPv6 is disabled
The br_ip6_multicast_add_router() prototype is defined only when
CONFIG_IPV6 is enabled, but the function is always referenced, so there
is this build error with CONFIG_IPV6 not defined:

net/bridge/br_multicast.c: In function ‘__br_multicast_enable_port’:
net/bridge/br_multicast.c:1743:3: error: implicit declaration of function ‘br_ip6_multicast_add_router’; did you mean ‘br_ip4_multicast_add_router’? [-Werror=implicit-function-declaration]
 1743 |   br_ip6_multicast_add_router(br, port);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |   br_ip4_multicast_add_router
net/bridge/br_multicast.c: At top level:
net/bridge/br_multicast.c:2804:13: warning: conflicting types for ‘br_ip6_multicast_add_router’
 2804 | static void br_ip6_multicast_add_router(struct net_bridge *br,
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
net/bridge/br_multicast.c:2804:13: error: static declaration of ‘br_ip6_multicast_add_router’ follows non-static declaration
net/bridge/br_multicast.c:1743:3: note: previous implicit declaration of ‘br_ip6_multicast_add_router’ was here
 1743 |   br_ip6_multicast_add_router(br, port);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Fix this build error by moving the definition out of the #ifdef.

Fixes: a3c02e769e ("net: bridge: mcast: split multicast router state for IPv4 and IPv6")
Signed-off-by: Matteo Croce <mcroce@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-05-14 10:38:59 -07:00
..
netfilter netfilter: allow to turn off xtables compat layer 2021-04-26 18:16:56 +02:00
Kconfig bridge: cfm: Add BRIDGE_CFM to Kconfig. 2020-10-29 18:39:43 -07:00
Makefile net: bridge: multicast: add EHT host handling functions 2021-01-22 19:39:56 -08:00
br.c net: bridge: fix misspellings using codespell tool 2021-01-09 13:54:47 -08:00
br_arp_nd_proxy.c net: bridge: when suppression is enabled exclude RARP packets 2021-03-22 13:30:24 -07:00
br_cfm.c bridge: cfm: Netlink Notifications. 2020-10-29 18:39:44 -07:00
br_cfm_netlink.c bridge: cfm: Netlink Notifications. 2020-10-29 18:39:44 -07:00
br_device.c netfilter: flowtable: bridge vlan hardware offload and switchdev 2021-03-24 12:48:39 -07:00
br_fdb.c net: bridge: add helper to replay port and local fdb entries 2021-03-23 14:49:05 -07:00
br_forward.c net: bridge: mcast: add wrappers for router node retrieval 2021-05-13 14:04:31 -07:00
br_if.c bridge: cfm: Kernel space implementation of CFM. MEP create/delete. 2020-10-29 18:39:43 -07:00
br_input.c net: bridge: mcast: prepare is-router function for mcast router split 2021-05-13 14:04:31 -07:00
br_ioctl.c net: bridge: delete duplicated words 2020-09-18 14:12:43 -07:00
br_mdb.c net: bridge: mcast: add ip4+ip6 mcast router timers to mdb netlink 2021-05-13 14:04:31 -07:00
br_mrp.c bridge: mrp: Disable roles before deleting the MRP instance 2021-03-24 12:14:08 -07:00
br_mrp_netlink.c bridge: mrp: Use hlist_head instead of list_head for mrp 2020-11-09 16:42:12 -08:00
br_mrp_switchdev.c bridge: mrp: Extend br_mrp_switchdev to detect better the errors 2021-02-16 14:47:46 -08:00
br_multicast.c net: bridge: fix build when IPv6 is disabled 2021-05-14 10:38:59 -07:00
br_multicast_eht.c net: bridge: mcast: factor out common allow/block EHT handling 2021-03-16 11:57:57 -07:00
br_netfilter_hooks.c netfilter: bridge: reset skb->pkt_type after NF_INET_POST_ROUTING traversal 2020-11-28 11:46:51 -08:00
br_netfilter_ipv6.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-06-25 01:32:59 +02:00
br_netlink.c bridge: Fix possible races between assigning rx_handler_data and setting IFF_BRIDGE_PORT bit 2021-04-29 15:33:17 -07:00
br_netlink_tunnel.c net: bridge: notify on vlan tunnel changes done via the old api 2020-07-12 15:18:24 -07:00
br_nf_core.c net: add bool confirm_neigh parameter for dst_ops.update_pmtu 2019-12-24 22:28:54 -08:00
br_private.h net: bridge: fix br_multicast_is_router stub when igmp is disabled 2021-05-14 10:35:20 -07:00
br_private_cfm.h bridge: cfm: Kernel space implementation of CFM. CCM frame RX added. 2020-10-29 18:39:43 -07:00
br_private_mcast_eht.h net: bridge: multicast: make tracked EHT hosts limit configurable 2021-01-27 17:40:35 -08:00
br_private_mrp.h bridge: mrp: Extend br_mrp_switchdev to detect better the errors 2021-02-16 14:47:46 -08:00
br_private_stp.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
br_private_tunnel.h net: bridge: vlan options: add support for tunnel mapping set/del 2020-03-17 22:47:12 -07:00
br_stp.c net: bridge: add helper to retrieve the current ageing time 2021-03-23 14:49:05 -07:00
br_stp_bpdu.c net: bridge: add STP xstats 2019-12-14 20:02:36 -08:00
br_stp_if.c net: remove newlines in NL_SET_ERR_MSG_MOD 2020-05-07 17:56:14 -07:00
br_stp_timer.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
br_switchdev.c net: bridge: switchdev: include local flag in FDB notifications 2021-04-16 15:15:45 -07:00
br_sysfs_br.c net: bridge: propagate error code and extack from br_mc_disabled_update 2021-04-14 14:32:05 -07:00
br_sysfs_if.c net: bridge: don't print in br_switchdev_set_port_flag 2021-02-12 17:08:04 -08:00
br_vlan.c netfilter: flowtable: bridge vlan hardware offload and switchdev 2021-03-24 12:48:39 -07:00
br_vlan_options.c net: bridge: vlan options: move the tunnel command to the nested attribute 2020-03-20 08:52:20 -07:00
br_vlan_tunnel.c net: bridge: declare br_vlan_tunnel_lookup argument tunnel_id as __be64 2021-03-22 13:11:59 -07:00