diff mbox

ip: fix logic of reverse path filter sysctl

Message ID 20090724123005.35450325@nehalam
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

stephen hemminger July 24, 2009, 7:30 p.m. UTC
Even though reverse path filter was changed from simple boolean to trinary control,
the loose mode only works if both all and device are configured because of
this logic error.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller July 28, 2009, 1:40 a.m. UTC | #1
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 24 Jul 2009 12:30:05 -0700

> Even though reverse path filter was changed from simple boolean to trinary control,
> the loose mode only works if both all and device are configured because of
> this logic error.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Good catch, applied, thanks Stephen!
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/include/linux/inetdevice.h	2009-07-24 12:24:54.537399657 -0700
+++ b/include/linux/inetdevice.h	2009-07-24 12:25:11.457119906 -0700
@@ -82,7 +82,7 @@  static inline void ipv4_devconf_setall(s
 
 #define IN_DEV_FORWARD(in_dev)		IN_DEV_CONF_GET((in_dev), 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_RPFILTER(in_dev)		IN_DEV_MAXCONF((in_dev), RP_FILTER)
 #define IN_DEV_SOURCE_ROUTE(in_dev)	IN_DEV_ANDCONF((in_dev), \
 						       ACCEPT_SOURCE_ROUTE)
 #define IN_DEV_BOOTP_RELAY(in_dev)	IN_DEV_ANDCONF((in_dev), BOOTP_RELAY)