diff options
author | Bruce M Simpson <bms@FreeBSD.org> | 2007-02-05 00:15:40 +0000 |
---|---|---|
committer | Bruce M Simpson <bms@FreeBSD.org> | 2007-02-05 00:15:40 +0000 |
commit | 64e740a35296ec52c7bf745c9df62010c53c10f2 (patch) | |
tree | 5290fe765412a115e1083b389345c95b870aa8c4 /sys/netinet/ip_fastfwd.c | |
parent | 0d86a7f7c2ef09032d36607105acc4d077363a60 (diff) |
When fast-forwarding is enabled, do not forward directed IPv4 broadcasts
to locally attached broadcast networks.
Note well: This relies on the layer 2 route cloning behaviour in BSD.
PR: 98799
Tested by: Dmitry Sergienko
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=166507
Diffstat (limited to 'sys/netinet/ip_fastfwd.c')
-rw-r--r-- | sys/netinet/ip_fastfwd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/ip_fastfwd.c b/sys/netinet/ip_fastfwd.c index e98d63041bca..90b348029085 100644 --- a/sys/netinet/ip_fastfwd.c +++ b/sys/netinet/ip_fastfwd.c @@ -420,9 +420,11 @@ passin: ifp = ro.ro_rt->rt_ifp; /* - * Immediately drop blackholed traffic. + * Immediately drop blackholed traffic, and directed broadcasts + * for either the all-ones or all-zero subnet addresses on + * locally attached networks. */ - if (ro.ro_rt->rt_flags & RTF_BLACKHOLE) + if ((ro.ro_rt->rt_flags & (RTF_BLACKHOLE|RTF_BROADCAST)) != 0) goto drop; /* |