xfrm: Assign the inner mode output function to the dst entry
[firefly-linux-kernel-4.4.55.git] / net / ipv4 / sysctl_net_ipv4.c
index 1b4ec21497a49756025965e4e17e4bc9466f4f5c..321e6e84dbccb93e08741263815aaae82610b0a8 100644 (file)
@@ -28,6 +28,8 @@ static int ip_local_port_range_min[] = { 1, 1 };
 static int ip_local_port_range_max[] = { 65535, 65535 };
 static int tcp_adv_win_scale_min = -31;
 static int tcp_adv_win_scale_max = 31;
+static int ip_ttl_min = 1;
+static int ip_ttl_max = 255;
 
 /* Update system visible IP port range */
 static void set_local_port_range(int range[2])
@@ -155,8 +157,9 @@ static struct ctl_table ipv4_table[] = {
                .data           = &sysctl_ip_default_ttl,
                .maxlen         = sizeof(int),
                .mode           = 0644,
-               .proc_handler   = ipv4_doint_and_flush,
-               .extra2         = &init_net,
+               .proc_handler   = proc_dointvec_minmax,
+               .extra1         = &ip_ttl_min,
+               .extra2         = &ip_ttl_max,
        },
        {
                .procname       = "ip_no_pmtu_disc",
@@ -308,7 +311,6 @@ static struct ctl_table ipv4_table[] = {
                .mode           = 0644,
                .proc_handler   = proc_do_large_bitmap,
        },
-#ifdef CONFIG_IP_MULTICAST
        {
                .procname       = "igmp_max_memberships",
                .data           = &sysctl_igmp_max_memberships,
@@ -316,8 +318,6 @@ static struct ctl_table ipv4_table[] = {
                .mode           = 0644,
                .proc_handler   = proc_dointvec
        },
-
-#endif
        {
                .procname       = "igmp_max_msf",
                .data           = &sysctl_igmp_max_msf,