* [PATCH net-next-2.6] bridge: Fix build error when IGMP_SNOOPING is not enabled
@ 2010-03-01 19:53 Sridhar Samudrala
2010-03-01 20:54 ` Randy Dunlap
2010-03-02 0:46 ` Herbert Xu
0 siblings, 2 replies; 4+ messages in thread
From: Sridhar Samudrala @ 2010-03-01 19:53 UTC (permalink / raw)
To: Herbert Xu, David Miller; +Cc: netdev
Fix the following build error when IGMP_SNOOPING is not enabled.
In file included from net/bridge/br.c:24:
net/bridge/br_private.h: In function 'br_multicast_is_router':
net/bridge/br_private.h:361: error: 'struct net_bridge' has no member named 'multicast_router'
net/bridge/br_private.h:362: error: 'struct net_bridge' has no member named 'multicast_router'
net/bridge/br_private.h:363: error: 'struct net_bridge' has no member named 'multicast_router_timer'
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index 9191198..1cf2cef 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -302,6 +302,13 @@ extern int br_multicast_set_port_router(struct net_bridge_port *p,
unsigned long val);
extern int br_multicast_toggle(struct net_bridge *br, unsigned long val);
extern int br_multicast_set_hash_max(struct net_bridge *br, unsigned long val);
+
+static inline bool br_multicast_is_router(struct net_bridge *br)
+{
+ return br->multicast_router == 2 ||
+ (br->multicast_router == 1 &&
+ timer_pending(&br->multicast_router_timer));
+}
#else
static inline int br_multicast_rcv(struct net_bridge *br,
struct net_bridge_port *port,
@@ -354,14 +361,11 @@ static inline void br_multicast_forward(struct net_bridge_mdb_entry *mdst,
struct sk_buff *skb2)
{
}
-#endif
-
static inline bool br_multicast_is_router(struct net_bridge *br)
{
- return br->multicast_router == 2 ||
- (br->multicast_router == 1 &&
- timer_pending(&br->multicast_router_timer));
+ return 0;
}
+#endif
/* br_netfilter.c */
#ifdef CONFIG_BRIDGE_NETFILTER
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next-2.6] bridge: Fix build error when IGMP_SNOOPING is not enabled
2010-03-01 19:53 [PATCH net-next-2.6] bridge: Fix build error when IGMP_SNOOPING is not enabled Sridhar Samudrala
@ 2010-03-01 20:54 ` Randy Dunlap
2010-03-02 0:46 ` Herbert Xu
1 sibling, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2010-03-01 20:54 UTC (permalink / raw)
To: Sridhar Samudrala; +Cc: Herbert Xu, David Miller, netdev
On 03/01/10 11:53, Sridhar Samudrala wrote:
> Fix the following build error when IGMP_SNOOPING is not enabled.
> In file included from net/bridge/br.c:24:
> net/bridge/br_private.h: In function 'br_multicast_is_router':
> net/bridge/br_private.h:361: error: 'struct net_bridge' has no member named 'multicast_router'
> net/bridge/br_private.h:362: error: 'struct net_bridge' has no member named 'multicast_router'
> net/bridge/br_private.h:363: error: 'struct net_bridge' has no member named 'multicast_router_timer'
>
> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
>
> diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
> index 9191198..1cf2cef 100644
> --- a/net/bridge/br_private.h
> +++ b/net/bridge/br_private.h
> @@ -302,6 +302,13 @@ extern int br_multicast_set_port_router(struct net_bridge_port *p,
> unsigned long val);
> extern int br_multicast_toggle(struct net_bridge *br, unsigned long val);
> extern int br_multicast_set_hash_max(struct net_bridge *br, unsigned long val);
> +
> +static inline bool br_multicast_is_router(struct net_bridge *br)
> +{
> + return br->multicast_router == 2 ||
> + (br->multicast_router == 1 &&
> + timer_pending(&br->multicast_router_timer));
> +}
> #else
> static inline int br_multicast_rcv(struct net_bridge *br,
> struct net_bridge_port *port,
> @@ -354,14 +361,11 @@ static inline void br_multicast_forward(struct net_bridge_mdb_entry *mdst,
> struct sk_buff *skb2)
> {
> }
> -#endif
> -
> static inline bool br_multicast_is_router(struct net_bridge *br)
> {
> - return br->multicast_router == 2 ||
> - (br->multicast_router == 1 &&
> - timer_pending(&br->multicast_router_timer));
> + return 0;
> }
> +#endif
>
> /* br_netfilter.c */
> #ifdef CONFIG_BRIDGE_NETFILTER
>
>
> --
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Thanks.
--
~Randy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next-2.6] bridge: Fix build error when IGMP_SNOOPING is not enabled
2010-03-01 19:53 [PATCH net-next-2.6] bridge: Fix build error when IGMP_SNOOPING is not enabled Sridhar Samudrala
2010-03-01 20:54 ` Randy Dunlap
@ 2010-03-02 0:46 ` Herbert Xu
2010-03-02 2:14 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Herbert Xu @ 2010-03-02 0:46 UTC (permalink / raw)
To: Sridhar Samudrala; +Cc: David Miller, netdev
On Mon, Mar 01, 2010 at 11:53:04AM -0800, Sridhar Samudrala wrote:
> Fix the following build error when IGMP_SNOOPING is not enabled.
> In file included from net/bridge/br.c:24:
> net/bridge/br_private.h: In function 'br_multicast_is_router':
> net/bridge/br_private.h:361: error: 'struct net_bridge' has no member named 'multicast_router'
> net/bridge/br_private.h:362: error: 'struct net_bridge' has no member named 'multicast_router'
> net/bridge/br_private.h:363: error: 'struct net_bridge' has no member named 'multicast_router_timer'
>
> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Thanks for the fix.
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
I'd originally left the struct data outside ifdefs and then added
the ifdefs without testing.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next-2.6] bridge: Fix build error when IGMP_SNOOPING is not enabled
2010-03-02 0:46 ` Herbert Xu
@ 2010-03-02 2:14 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2010-03-02 2:14 UTC (permalink / raw)
To: herbert; +Cc: sri, netdev
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Tue, 2 Mar 2010 08:46:26 +0800
> On Mon, Mar 01, 2010 at 11:53:04AM -0800, Sridhar Samudrala wrote:
>> Fix the following build error when IGMP_SNOOPING is not enabled.
>> In file included from net/bridge/br.c:24:
>> net/bridge/br_private.h: In function 'br_multicast_is_router':
>> net/bridge/br_private.h:361: error: 'struct net_bridge' has no member named 'multicast_router'
>> net/bridge/br_private.h:362: error: 'struct net_bridge' has no member named 'multicast_router'
>> net/bridge/br_private.h:363: error: 'struct net_bridge' has no member named 'multicast_router_timer'
>>
>> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
>
> Thanks for the fix.
>
> Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
>
> I'd originally left the struct data outside ifdefs and then added
> the ifdefs without testing.
Thanks everyone, I'll apply this.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-03-02 2:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-01 19:53 [PATCH net-next-2.6] bridge: Fix build error when IGMP_SNOOPING is not enabled Sridhar Samudrala
2010-03-01 20:54 ` Randy Dunlap
2010-03-02 0:46 ` Herbert Xu
2010-03-02 2:14 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).