OpenVZ Forum


Home » Mailing lists » Devel » [PATCH net-2.6.25] Cleanup IN_DEV_MFORWARD macro
[PATCH net-2.6.25] Cleanup IN_DEV_MFORWARD macro [message #24673] Fri, 07 December 2007 16:19 Go to next message
Pavel Emelianov is currently offline  Pavel Emelianov
Messages: 1149
Registered: September 2006
Senior Member
This is essentially IN_DEV_ANDCONF with proper arguments.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

---

diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h
index dd093ea..962a062 100644
--- a/include/linux/inetdevice.h
+++ b/include/linux/inetdevice.h
@@ -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)
-- 
1.5.3.4
Re: [PATCH net-2.6.25] Cleanup IN_DEV_MFORWARD macro [message #24711 is a reply to message #24673] Sat, 08 December 2007 01:37 Go to previous messageGo to next message
Herbert Xu is currently offline  Herbert Xu
Messages: 45
Registered: April 2007
Member
On Fri, Dec 07, 2007 at 07:19:38PM +0300, Pavel Emelyanov wrote:
> This is essentially IN_DEV_ANDCONF with proper arguments.
> 
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

Acked-by: Herbert Xu <herbert@gondor.apana.org.au>

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

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
Re: [PATCH net-2.6.25] Cleanup IN_DEV_MFORWARD macro [message #24840 is a reply to message #24673] Tue, 11 December 2007 10:17 Go to previous message
davem is currently offline  davem
Messages: 463
Registered: February 2006
Senior Member
From: Pavel Emelyanov <xemul@openvz.org>
Date: Fri, 07 Dec 2007 19:19:38 +0300

> This is essentially IN_DEV_ANDCONF with proper arguments.
> 
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

Applied, thanks!
Previous Topic: [PATCH] Use BUILD_BUG_ON in inet_timewait_sock.c checks
Next Topic: [PATCH net-2.6.25] Cleanup sysctl manipulations in devinet.c
Goto Forum:
  


Current Time: Fri Apr 19 16:28:46 GMT 2024

Total time taken to generate the page: 0.01783 seconds