Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134652
b: refs/heads/master
c: c1cf842
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Feb 23, 2009
1 parent 47ad112 commit 8130044
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6dac62d3888a34f5bccbe14222ba77e8877a2e54
refs/heads/master: c1cf8422f0512c2b14f0d66bce34abb0645c888a
24 changes: 15 additions & 9 deletions trunk/Documentation/networking/ip-sysctl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -699,16 +699,22 @@ accept_source_route - BOOLEAN
default TRUE (router)
FALSE (host)

rp_filter - BOOLEAN
1 - do source validation by reversed path, as specified in RFC1812
Recommended option for single homed hosts and stub network
routers. Could cause troubles for complicated (not loop free)
networks running a slow unreliable protocol (sort of RIP),
or using static routes.

rp_filter - INTEGER
0 - No source validation.

conf/all/rp_filter must also be set to TRUE to do source validation
1 - Strict mode as defined in RFC3704 Strict Reverse Path
Each incoming packet is tested against the FIB and if the interface
is not the best reverse path the packet check will fail.
By default failed packets are discarded.
2 - Loose mode as defined in RFC3704 Loose Reverse Path
Each incoming packet's source address is also tested against the FIB
and if the source address is not reachable via any interface
the packet check will fail.

Current recommended practice in RFC3704 is to enable strict mode
to prevent IP spoofin from DDos attacks. If using asymmetric routing
or other complicated routing,t hen loose mode is recommended.

conf/all/rp_filter must also be set to non-zero to do source validation
on the interface

Default value is 0. Note that some distributions enable it
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/fib_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif,
fib_res_put(&res);
if (no_addr)
goto last_resort;
if (rpf)
if (rpf == 1)
goto e_inval;
fl.oif = dev->ifindex;

Expand Down

0 comments on commit 8130044

Please sign in to comment.