FreeBSD Bugzilla – Attachment 185012 Details for
Bug 221137
FreeBSD 11+ does not send ICMP redirects
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
New patch for rev 322037. Uses net.inet.ip.redirect as condition to use ip_tryforward()
p2.diff (text/plain), 1.19 KB, created by
igorr
on 2017-08-04 07:31:02 UTC
(
hide
)
Description:
New patch for rev 322037. Uses net.inet.ip.redirect as condition to use ip_tryforward()
Filename:
MIME Type:
Creator:
igorr
Created:
2017-08-04 07:31:02 UTC
Size:
1.19 KB
patch
obsolete
>Index: sys/netinet/ip_input.c >=================================================================== >--- sys/netinet/ip_input.c (revisión: 322037) >+++ sys/netinet/ip_input.c (copia de trabajo) >@@ -107,7 +107,7 @@ > &VNET_NAME(ipforwarding), 0, > "Enable IP forwarding between interfaces"); > >-static VNET_DEFINE(int, ipsendredirects) = 1; /* XXX */ >+static VNET_DEFINE(int, ipsendredirects) = 0; /* XXX */ > #define V_ipsendredirects VNET(ipsendredirects) > SYSCTL_INT(_net_inet_ip, IPCTL_SENDREDIRECTS, redirect, CTLFLAG_VNET | CTLFLAG_RW, > &VNET_NAME(ipsendredirects), 0, >@@ -567,12 +567,17 @@ > IPSEC_CAPS(ipv4, m, IPSEC_CAP_OPERABLE) == 0) > #endif > ) { >- if ((m = ip_tryforward(m)) == NULL) >- return; >- if (m->m_flags & M_FASTFWD_OURS) { >- m->m_flags &= ~M_FASTFWD_OURS; >- ip = mtod(m, struct ip *); >- goto ours; >+ /* If sending ICMP redirects is enabled, then don't use ip_tryforward() >+ * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221137 >+ */ >+ if (V_ipsendredirects != 1) { >+ if ((m = ip_tryforward(m)) == NULL) >+ return; >+ if (m->m_flags & M_FASTFWD_OURS) { >+ m->m_flags &= ~M_FASTFWD_OURS; >+ ip = mtod(m, struct ip *); >+ goto ours; >+ } > } > } >
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 221137
:
184886
| 185012 |
196187