net: add sysctl for enabling RFC 8335 PROBE messages
Section 8 of RFC 8335 specifies potential security concerns of responding to PROBE requests, and states that nodes that support PROBE functionality MUST be able to enable/disable responses and that responses MUST be disabled by default Signed-off-by: Andreas Roeseler <andreas.a.roeseler@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
750f4fc2a1
commit
f1b8fa9fa5
3 changed files with 16 additions and 0 deletions
|
@ -1143,6 +1143,12 @@ icmp_echo_ignore_all - BOOLEAN
|
||||||
|
|
||||||
Default: 0
|
Default: 0
|
||||||
|
|
||||||
|
icmp_echo_enable_probe - BOOLEAN
|
||||||
|
If set to one, then the kernel will respond to RFC 8335 PROBE
|
||||||
|
requests sent to it.
|
||||||
|
|
||||||
|
Default: 0
|
||||||
|
|
||||||
icmp_echo_ignore_broadcasts - BOOLEAN
|
icmp_echo_ignore_broadcasts - BOOLEAN
|
||||||
If set non-zero, then the kernel will ignore all ICMP ECHO and
|
If set non-zero, then the kernel will ignore all ICMP ECHO and
|
||||||
TIMESTAMP requests sent to it via broadcast/multicast.
|
TIMESTAMP requests sent to it via broadcast/multicast.
|
||||||
|
|
|
@ -84,6 +84,7 @@ struct netns_ipv4 {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
u8 sysctl_icmp_echo_ignore_all;
|
u8 sysctl_icmp_echo_ignore_all;
|
||||||
|
u8 sysctl_icmp_echo_enable_probe;
|
||||||
u8 sysctl_icmp_echo_ignore_broadcasts;
|
u8 sysctl_icmp_echo_ignore_broadcasts;
|
||||||
u8 sysctl_icmp_ignore_bogus_error_responses;
|
u8 sysctl_icmp_ignore_bogus_error_responses;
|
||||||
u8 sysctl_icmp_errors_use_inbound_ifaddr;
|
u8 sysctl_icmp_errors_use_inbound_ifaddr;
|
||||||
|
|
|
@ -598,6 +598,15 @@ static struct ctl_table ipv4_net_table[] = {
|
||||||
.mode = 0644,
|
.mode = 0644,
|
||||||
.proc_handler = proc_dou8vec_minmax,
|
.proc_handler = proc_dou8vec_minmax,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.procname = "icmp_echo_enable_probe",
|
||||||
|
.data = &init_net.ipv4.sysctl_icmp_echo_enable_probe,
|
||||||
|
.maxlen = sizeof(int),
|
||||||
|
.mode = 0644,
|
||||||
|
.proc_handler = proc_dointvec_minmax,
|
||||||
|
.extra1 = SYSCTL_ZERO,
|
||||||
|
.extra2 = SYSCTL_ONE
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.procname = "icmp_echo_ignore_broadcasts",
|
.procname = "icmp_echo_ignore_broadcasts",
|
||||||
.data = &init_net.ipv4.sysctl_icmp_echo_ignore_broadcasts,
|
.data = &init_net.ipv4.sysctl_icmp_echo_ignore_broadcasts,
|
||||||
|
|
Loading…
Add table
Reference in a new issue