FreeBSD Bugzilla – Attachment 224415 Details for
Bug 255388
netinet/ip_input.c: Do not forward datagrams original from 169.254.0.0/16
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for ip_input.c
ip_input.c.diff (text/plain), 871 bytes, created by
Zhenlei Huang
on 2021-04-25 09:20:59 UTC
(
hide
)
Description:
Patch for ip_input.c
Filename:
MIME Type:
Creator:
Zhenlei Huang
Created:
2021-04-25 09:20:59 UTC
Size:
871 bytes
patch
obsolete
>diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c >index a85f8ac7b567..e8ce391227bc 100644 >--- a/sys/netinet/ip_input.c >+++ b/sys/netinet/ip_input.c >@@ -736,12 +736,6 @@ ip_input(struct mbuf *m) > } > 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))) { > if (V_ip_mrouter) { > /* >@@ -779,6 +773,14 @@ ip_input(struct mbuf *m) > if (ip->ip_dst.s_addr == INADDR_ANY) > goto ours; > >+ /* RFC 3927 2.7: Do not forward datagrams for 169.254.0.0/16. */ >+ if (IN_LINKLOCAL(ntohl(ip->ip_src.s_addr)) || >+ IN_LINKLOCAL(ntohl(ip->ip_dst.s_addr))) { >+ IPSTAT_INC(ips_cantforward); >+ m_freem(m); >+ return; >+ } >+ > /* > * Not for us; forward if possible and desirable. > */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 255388
: 224415