FreeBSD Bugzilla – Attachment 12750 Details for
Bug 24512
Sent ICMP unreach when packet not for us is received, and forwarding is disabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 857 bytes, created by
jesper
on 2001-01-21 20:30:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
jesper
Created:
2001-01-21 20:30:01 UTC
Size:
857 bytes
patch
obsolete
>--- sys/netinet/ip_input.c.old Sun Jan 21 19:09:58 2001 >+++ sys/netinet/ip_input.c Sun Jan 21 20:39:39 2001 >@@ -124,6 +124,10 @@ > &ip_keepfaith, 0, > "Enable packet capture for FAITH IPv4->IPv6 translater daemon"); > >+int ip_sent_unreach = 1; >+SYSCTL_INT(_net_inet_ip, OID_AUTO, sent_unreach, CTLFLAG_RW, &ip_sent_unreach, >+ 0, "Sent ICMP unreach when packet not for us rx, and forwarding disabled"); >+ > #ifdef DIAGNOSTIC > static int ipprintfs = 0; > #endif >@@ -575,7 +579,14 @@ > */ > if (ipforwarding == 0) { > ipstat.ips_cantforward++; >- m_freem(m); >+ /* >+ * If we receive a packet not for us, and forwarding disabled >+ * sent a ICMP host unreachable back to the source. >+ */ >+ if (ip_sent_unreach != 0) >+ icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_HOST, 0, 0); >+ else >+ m_freem(m); > } else > ip_forward(m, 0); > #ifdef IPFIREWALL_FORWARD
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 24512
: 12750