Skip to contentSkip to conversation

net: bridge: fix signature of stub br_multicast_is_router

PATCH In review [email protected] 2 participants 2 messages May 15, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: bridge: fix signature of stub br_multicast_is_router

From: Tom Rix <[email protected]>

Building with CONFIG_IPV6 off causes this build error

br_input.c:135:8: error: too many arguments to function
‘br_multicast_is_router’

        br_multicast_is_router(br, skb)) {
        ^~~~~~~~~~~~~~~~~~~~~~
In file included from net/bridge/br_input.c:23:
net/bridge/br_private.h:1059:20: note: declared here
 static inline bool br_multicast_is_router(struct net_bridge *br)
                    ^~~~~~~~~~~~~~~~~~~~~~

Comparing the stub with the real function shows the stub needs another parameter.

---
 net/bridge/br_private.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/bridge/br_private.h +1 -1
index f9a381fcff094..9fd54626ca809 100644
@@ -1056,7 +1056,7 @@ static inline void br_multicast_flood(struct net_bridge_mdb_entry *mdst,
 {
 }
 
-static inline bool br_multicast_is_router(struct net_bridge *br)
+static inline bool br_multicast_is_router(struct net_bridge *br, struct sk_buff *skb)
 {
 	return false;
 }
Signature · 1 line
2.26.3
#1 lore raw
Quoted 13 lines · On 5/15/21 1:38 PM, [email protected] wrote:

From: Tom Rix <[email protected]>

Building with CONFIG_IPV6 off causes this build error

br_input.c:135:8: error: too many arguments to function
‘br_multicast_is_router’

        br_multicast_is_router(br, skb)) {
        ^~~~~~~~~~~~~~~~~~~~~~
In file included from net/bridge/br_input.c:23:
net/bridge/br_private.h:1059:20: note: declared here
 static inline bool br_multicast_is_router(struct net_bridge *br)
                    ^~~~~~~~~~~~~~~~~~~~~~
Quoted 4 lines

Comparing the stub with the real function shows the stub needs another parameter.

Hi,

A similar patch has already been merged:

https://lore.kernel.org/netdev/[email protected]/

Quoted 18 lines
---
 net/bridge/br_private.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/bridge/br_private.h +1 -1
index f9a381fcff094..9fd54626ca809 100644
@@ -1056,7 +1056,7 @@ static inline void br_multicast_flood(struct net_bridge_mdb_entry *mdst,
 {
 }
 
-static inline bool br_multicast_is_router(struct net_bridge *br)
+static inline bool br_multicast_is_router(struct net_bridge *br, struct sk_buff *skb)
 {
 	return false;
 }
Signature · 1 line
~Randy