version 1.349, 2017/02/07 02:38:08 |
version 1.352, 2017/03/06 07:31:15 |
|
|
ipforward_rt_percpu = percpu_alloc(sizeof(struct route)); |
ipforward_rt_percpu = percpu_alloc(sizeof(struct route)); |
if (ipforward_rt_percpu == NULL) |
if (ipforward_rt_percpu == NULL) |
panic("failed to allocate ipforward_rt_percpu"); |
panic("failed to allocate ipforward_rt_percpu"); |
|
|
|
ip_mtudisc_timeout_q = rt_timer_queue_create(ip_mtudisc_timeout); |
} |
} |
|
|
static struct in_ifaddr * |
static struct in_ifaddr * |
Line 1601 sysctl_net_inet_ip_pmtudto(SYSCTLFN_ARGS |
|
Line 1603 sysctl_net_inet_ip_pmtudto(SYSCTLFN_ARGS |
|
int error, tmp; |
int error, tmp; |
struct sysctlnode node; |
struct sysctlnode node; |
|
|
|
icmp_mtudisc_lock(); |
|
|
node = *rnode; |
node = *rnode; |
tmp = ip_mtudisc_timeout; |
tmp = ip_mtudisc_timeout; |
node.sysctl_data = &tmp; |
node.sysctl_data = &tmp; |
error = sysctl_lookup(SYSCTLFN_CALL(&node)); |
error = sysctl_lookup(SYSCTLFN_CALL(&node)); |
if (error || newp == NULL) |
if (error || newp == NULL) |
return (error); |
goto out; |
if (tmp < 0) |
if (tmp < 0) { |
return (EINVAL); |
error = EINVAL; |
|
goto out; |
/* XXX NOMPSAFE still need softnet_lock */ |
} |
mutex_enter(softnet_lock); |
|
|
|
ip_mtudisc_timeout = tmp; |
ip_mtudisc_timeout = tmp; |
rt_timer_queue_change(ip_mtudisc_timeout_q, ip_mtudisc_timeout); |
rt_timer_queue_change(ip_mtudisc_timeout_q, ip_mtudisc_timeout); |
|
error = 0; |
mutex_exit(softnet_lock); |
out: |
|
icmp_mtudisc_unlock(); |
return (0); |
return error; |
} |
} |
|
|
static int |
static int |