|
@@ -5199,6 +5199,20 @@ int addrconf_sysctl_forward(struct ctl_table *ctl, int write,
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
+static
|
|
|
+int addrconf_sysctl_hop_limit(struct ctl_table *ctl, int write,
|
|
|
+ void __user *buffer, size_t *lenp, loff_t *ppos)
|
|
|
+{
|
|
|
+ struct ctl_table lctl;
|
|
|
+ int min_hl = 1, max_hl = 255;
|
|
|
+
|
|
|
+ lctl = *ctl;
|
|
|
+ lctl.extra1 = &min_hl;
|
|
|
+ lctl.extra2 = &max_hl;
|
|
|
+
|
|
|
+ return proc_dointvec_minmax(&lctl, write, buffer, lenp, ppos);
|
|
|
+}
|
|
|
+
|
|
|
static
|
|
|
int addrconf_sysctl_mtu(struct ctl_table *ctl, int write,
|
|
|
void __user *buffer, size_t *lenp, loff_t *ppos)
|
|
@@ -5454,7 +5468,7 @@ static struct addrconf_sysctl_table
|
|
|
.data = &ipv6_devconf.hop_limit,
|
|
|
.maxlen = sizeof(int),
|
|
|
.mode = 0644,
|
|
|
- .proc_handler = proc_dointvec,
|
|
|
+ .proc_handler = addrconf_sysctl_hop_limit,
|
|
|
},
|
|
|
{
|
|
|
.procname = "mtu",
|