Skip to contentSkip to conversation

ip: fix logic of reverse path filter sysctl

PATCH In review Stephen Hemminger 2 participants 2 messages Jul 24, 2009 – Jul 28, 2009

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

PATCH 1/1 ip: fix logic of reverse path filter sysctl

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.

include/linux/inetdevice.h +1 -1
@@ -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)
maintainer
#1 lore raw

From: Stephen Hemminger <[email protected]>
Date: Fri, 24 Jul 2009 12:30:05 -0700

Quoted 5 lines

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.

Good catch, applied, thanks Stephen!