Skip to contentSkip to conversation

Cleanup IN_DEV_MFORWARD macro

PATCH Applied Pavel Emelyanov 3 participants 3 messages Dec 7, 2007 – Dec 11, 2007

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

PATCH 1/1 Cleanup IN_DEV_MFORWARD macro

This is essentially IN_DEV_ANDCONF with proper arguments.

---

include/linux/inetdevice.h +1 -3
index dd093ea..962a062 100644
@@ -78,9 +78,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev)
 	(max(IPV4_DEVCONF_ALL(attr), IN_DEV_CONF_GET((in_dev), attr)))
 
 #define IN_DEV_FORWARD(in_dev)		IN_DEV_CONF_GET((in_dev), FORWARDING)
-#define IN_DEV_MFORWARD(in_dev)		(IPV4_DEVCONF_ALL(MC_FORWARDING) && \
-					 IPV4_DEVCONF((in_dev)->cnf, \
-						      MC_FORWARDING))
+#define IN_DEV_MFORWARD(in_dev)		IN_DEV_ANDCONF((in_dev), MC_FORWARDING)
 #define IN_DEV_RPFILTER(in_dev)		IN_DEV_ANDCONF((in_dev), RP_FILTER)
 #define IN_DEV_SOURCE_ROUTE(in_dev)	IN_DEV_ANDCONF((in_dev), \
 						       ACCEPT_SOURCE_ROUTE)
Signature · 1 line
1.5.3.4
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Pavel Emelyanov

This is essentially IN_DEV_ANDCONF with proper arguments.

Thanks Pavel! I must have written that one before writing the AND macro :)

Cheers,

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt