diff options
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r-- | net/ipv6/addrconf.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 783bccfcc060..88d2cf0cae52 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -4935,6 +4935,21 @@ int addrconf_sysctl_forward(struct ctl_table *ctl, int write, | |||
4935 | return ret; | 4935 | return ret; |
4936 | } | 4936 | } |
4937 | 4937 | ||
4938 | static | ||
4939 | int addrconf_sysctl_mtu(struct ctl_table *ctl, int write, | ||
4940 | void __user *buffer, size_t *lenp, loff_t *ppos) | ||
4941 | { | ||
4942 | struct inet6_dev *idev = ctl->extra1; | ||
4943 | int min_mtu = IPV6_MIN_MTU; | ||
4944 | struct ctl_table lctl; | ||
4945 | |||
4946 | lctl = *ctl; | ||
4947 | lctl.extra1 = &min_mtu; | ||
4948 | lctl.extra2 = idev ? &idev->dev->mtu : NULL; | ||
4949 | |||
4950 | return proc_dointvec_minmax(&lctl, write, buffer, lenp, ppos); | ||
4951 | } | ||
4952 | |||
4938 | static void dev_disable_change(struct inet6_dev *idev) | 4953 | static void dev_disable_change(struct inet6_dev *idev) |
4939 | { | 4954 | { |
4940 | struct netdev_notifier_info info; | 4955 | struct netdev_notifier_info info; |
@@ -5086,7 +5101,7 @@ static struct addrconf_sysctl_table | |||
5086 | .data = &ipv6_devconf.mtu6, | 5101 | .data = &ipv6_devconf.mtu6, |
5087 | .maxlen = sizeof(int), | 5102 | .maxlen = sizeof(int), |
5088 | .mode = 0644, | 5103 | .mode = 0644, |
5089 | .proc_handler = proc_dointvec, | 5104 | .proc_handler = addrconf_sysctl_mtu, |
5090 | }, | 5105 | }, |
5091 | { | 5106 | { |
5092 | .procname = "accept_ra", | 5107 | .procname = "accept_ra", |