Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F96264580
D29968.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1021 B
Referenced Files
None
Subscribers
None
D29968.diff
View Options
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -738,15 +738,10 @@
}
ia = NULL;
}
- /* RFC 3927 2.7: Do not forward datagrams for 169.254.0.0/16. */
- if (IN_LINKLOCAL(ntohl(ip->ip_dst.s_addr))) {
- IPSTAT_INC(ips_cantforward);
- m_freem(m);
- return;
- }
if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) {
MROUTER_RLOCK();
- if (V_ip_mrouter) {
+ /* Do not forward packets from IN_LINKLOCAL. */
+ if (V_ip_mrouter && !IN_LINKLOCAL(ntohl(ip->ip_src.s_addr))) {
/*
* If we are acting as a multicast router, all
* incoming multicast packets are passed to the
@@ -785,6 +780,13 @@
goto ours;
if (ip->ip_dst.s_addr == INADDR_ANY)
goto ours;
+ /* Do not forward packets to or from IN_LINKLOCAL. */
+ if (IN_LINKLOCAL(ntohl(ip->ip_dst.s_addr)) ||
+ IN_LINKLOCAL(ntohl(ip->ip_src.s_addr))) {
+ IPSTAT_INC(ips_cantforward);
+ m_freem(m);
+ return;
+ }
/*
* Not for us; forward if possible and desirable.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Sep 25, 6:39 AM (16 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
12740949
Default Alt Text
D29968.diff (1021 B)
Attached To
Mode
D29968: Do not forward datagrams original from 169.254.0.0/16 link-local addresses
Attached
Detach File
Event Timeline
Log In to Comment