| version 1.272, 2008/05/05 17:11:17 |
version 1.273, 2008/08/20 18:35:20 |
| Line 2143 sysctl_net_inet_ip_pmtudto(SYSCTLFN_ARGS |
|
| Line 2143 sysctl_net_inet_ip_pmtudto(SYSCTLFN_ARGS |
|
| if (tmp < 0) |
if (tmp < 0) |
| return (EINVAL); |
return (EINVAL); |
| |
|
| |
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); |
| |
|
| |
mutex_exit(softnet_lock); |
| |
|
| return (0); |
return (0); |
| } |
} |
| |
|
| Line 2156 sysctl_net_inet_ip_pmtudto(SYSCTLFN_ARGS |
|
| Line 2160 sysctl_net_inet_ip_pmtudto(SYSCTLFN_ARGS |
|
| static int |
static int |
| sysctl_net_inet_ip_maxflows(SYSCTLFN_ARGS) |
sysctl_net_inet_ip_maxflows(SYSCTLFN_ARGS) |
| { |
{ |
| int s; |
int error; |
| |
|
| |
error = sysctl_lookup(SYSCTLFN_CALL(rnode)); |
| |
if (error || newp == NULL) |
| |
return (error); |
| |
|
| s = sysctl_lookup(SYSCTLFN_CALL(rnode)); |
mutex_enter(softnet_lock); |
| if (s || newp == NULL) |
KERNEL_LOCK(1, NULL); |
| return (s); |
|
| |
|
| s = splsoftnet(); |
|
| ipflow_prune(); |
ipflow_prune(); |
| splx(s); |
|
| |
KERNEL_UNLOCK_ONE(NULL); |
| |
mutex_exit(softnet_lock); |
| |
|
| return (0); |
return (0); |
| } |
} |
| Line 2186 sysctl_net_inet_ip_hashsize(SYSCTLFN_ARG |
|
| Line 2194 sysctl_net_inet_ip_hashsize(SYSCTLFN_ARG |
|
| /* |
/* |
| * Can only fail due to malloc() |
* Can only fail due to malloc() |
| */ |
*/ |
| if (ipflow_invalidate_all(tmp)) |
mutex_enter(softnet_lock); |
| return ENOMEM; |
KERNEL_LOCK(1, NULL); |
| |
|
| |
error = ipflow_invalidate_all(tmp); |
| |
|
| |
KERNEL_UNLOCK_ONE(NULL); |
| |
mutex_exit(softnet_lock); |
| |
|
| } else { |
} else { |
| /* |
/* |
| * EINVAL if not a power of 2 |
* EINVAL if not a power of 2 |
| */ |
*/ |
| return EINVAL; |
error = EINVAL; |
| } |
} |
| |
|
| return (0); |
return error; |
| } |
} |
| #endif /* GATEWAY */ |
#endif /* GATEWAY */ |
| |
|