netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ip: fix logic of reverse path filter sysctl
@ 2009-07-24 19:30 Stephen Hemminger
  2009-07-28  1:40 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2009-07-24 19:30 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

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>

--- 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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ip: fix logic of reverse path filter sysctl
  2009-07-24 19:30 [PATCH] ip: fix logic of reverse path filter sysctl Stephen Hemminger
@ 2009-07-28  1:40 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-07-28  1:40 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

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!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-28  1:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-24 19:30 [PATCH] ip: fix logic of reverse path filter sysctl Stephen Hemminger
2009-07-28  1:40 ` 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).