| version 1.113.12.2, 2008/06/02 13:24:27 |
version 1.113.12.3, 2008/09/28 10:40:59 |
| Line 1595 ip6_delaux(struct mbuf *m) |
|
| Line 1595 ip6_delaux(struct mbuf *m) |
|
| static int |
static int |
| sysctl_net_inet6_ip6_maxflows(SYSCTLFN_ARGS) |
sysctl_net_inet6_ip6_maxflows(SYSCTLFN_ARGS) |
| { |
{ |
| int s; |
int error; |
| |
|
| s = sysctl_lookup(SYSCTLFN_CALL(rnode)); |
error = sysctl_lookup(SYSCTLFN_CALL(rnode)); |
| if (s || newp == NULL) |
if (error || newp == NULL) |
| return (s); |
return (error); |
| |
|
| s = splsoftnet(); |
mutex_enter(softnet_lock); |
| ip6flow_reap(0); |
KERNEL_LOCK(1, NULL); |
| splx(s); |
|
| |
ip6flow_reap(0); |
| |
|
| |
KERNEL_UNLOCK_ONE(NULL); |
| |
mutex_exit(softnet_lock); |
| |
|
| return (0); |
return (0); |
| } |
} |
| |
|
| static int |
static int |
| Line 1625 sysctl_net_inet6_ip6_hashsize(SYSCTLFN_A |
|
| Line 1629 sysctl_net_inet6_ip6_hashsize(SYSCTLFN_A |
|
| /* |
/* |
| * Can only fail due to malloc() |
* Can only fail due to malloc() |
| */ |
*/ |
| if (ip6flow_invalidate_all(tmp)) |
mutex_enter(softnet_lock); |
| return ENOMEM; |
KERNEL_LOCK(1, NULL); |
| |
|
| |
error = ip6flow_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 */ |
| |
|
| Line 1642 sysctl_net_inet6_ip6_hashsize(SYSCTLFN_A |
|
| Line 1651 sysctl_net_inet6_ip6_hashsize(SYSCTLFN_A |
|
| * System control for IP6 |
* System control for IP6 |
| */ |
*/ |
| |
|
| u_char inet6ctlerrmap[PRC_NCMDS] = { |
const u_char inet6ctlerrmap[PRC_NCMDS] = { |
| 0, 0, 0, 0, |
0, 0, 0, 0, |
| 0, EMSGSIZE, EHOSTDOWN, EHOSTUNREACH, |
0, EMSGSIZE, EHOSTDOWN, EHOSTUNREACH, |
| EHOSTUNREACH, EHOSTUNREACH, ECONNREFUSED, ECONNREFUSED, |
EHOSTUNREACH, EHOSTUNREACH, ECONNREFUSED, ECONNREFUSED, |