| version 1.53, 1997/10/18 21:18:31 |
version 1.54, 1998/01/05 09:52:04 |
| Line 1249 ip_sysctl(name, namelen, oldp, oldlenp, |
|
| Line 1249 ip_sysctl(name, namelen, oldp, oldlenp, |
|
| { |
{ |
| extern int subnetsarelocal; |
extern int subnetsarelocal; |
| |
|
| |
int error, old; |
| |
|
| /* All sysctl names at this level are terminal. */ |
/* All sysctl names at this level are terminal. */ |
| if (namelen != 1) |
if (namelen != 1) |
| return (ENOTDIR); |
return (ENOTDIR); |
| Line 1283 ip_sysctl(name, namelen, oldp, oldlenp, |
|
| Line 1285 ip_sysctl(name, namelen, oldp, oldlenp, |
|
| return (sysctl_int(oldp, oldlenp, newp, newlen, |
return (sysctl_int(oldp, oldlenp, newp, newlen, |
| &subnetsarelocal)); |
&subnetsarelocal)); |
| case IPCTL_MTUDISC: |
case IPCTL_MTUDISC: |
| return (sysctl_int(oldp, oldlenp, newp, newlen, |
return (sysctl_int(oldp, oldlenp, newp, newlen, |
| &ip_mtudisc)); |
&ip_mtudisc)); |
| |
case IPCTL_ANONPORTMIN: |
| |
old = anonportmin; |
| |
error = sysctl_int(oldp, oldlenp, newp, newlen, &anonportmin); |
| |
if (anonportmin >= anonportmax || anonportmin > 65535 |
| |
#ifndef IPNOPRIVPORTS |
| |
|| anonportmin < IPPORT_RESERVED |
| |
#endif |
| |
) { |
| |
anonportmin = old; |
| |
return (EINVAL); |
| |
} |
| |
return (error); |
| |
case IPCTL_ANONPORTMAX: |
| |
old = anonportmax; |
| |
error = sysctl_int(oldp, oldlenp, newp, newlen, &anonportmax); |
| |
if (anonportmin >= anonportmax || anonportmax > 65535 |
| |
#ifndef IPNOPRIVPORTS |
| |
|| anonportmax < IPPORT_RESERVED |
| |
#endif |
| |
) { |
| |
anonportmax = old; |
| |
return (EINVAL); |
| |
} |
| |
return (error); |
| default: |
default: |
| return (EOPNOTSUPP); |
return (EOPNOTSUPP); |
| } |
} |