|
1 |
| -/* $OpenBSD: ip6_divert.c,v 1.104 2025/06/06 13:13:37 bluhm Exp $ */ |
| 1 | +/* $OpenBSD: ip6_divert.c,v 1.105 2025/06/18 17:45:07 bluhm Exp $ */ |
2 | 2 |
|
3 | 3 | /*
|
4 | 4 | * Copyright (c) 2009 Michele Marchetto <[email protected]>
|
|
52 | 52 | struct inpcbtable divb6table;
|
53 | 53 | struct cpumem *div6counters;
|
54 | 54 |
|
55 |
| -u_int divert6_sendspace = DIVERT_SENDSPACE; /* [a] */ |
56 |
| -u_int divert6_recvspace = DIVERT_RECVSPACE; /* [a] */ |
57 |
| - |
58 |
| -const struct sysctl_bounded_args divert6ctl_vars[] = { |
59 |
| - { DIVERT6CTL_RECVSPACE, &divert6_recvspace, 0, SB_MAX }, |
60 |
| - { DIVERT6CTL_SENDSPACE, &divert6_sendspace, 0, SB_MAX }, |
61 |
| -}; |
62 |
| - |
63 | 55 | const struct pr_usrreqs divert6_usrreqs = {
|
64 | 56 | .pru_attach = divert6_attach,
|
65 | 57 | .pru_detach = divert_detach,
|
@@ -267,8 +259,8 @@ divert6_attach(struct socket *so, int proto, int wait)
|
267 | 259 | if ((so->so_state & SS_PRIV) == 0)
|
268 | 260 | return EACCES;
|
269 | 261 |
|
270 |
| - error = soreserve(so, atomic_load_int(&divert6_sendspace), |
271 |
| - atomic_load_int(&divert6_recvspace)); |
| 262 | + error = soreserve(so, atomic_load_int(&divert_sendspace), |
| 263 | + atomic_load_int(&divert_recvspace)); |
272 | 264 | if (error)
|
273 | 265 | return (error);
|
274 | 266 | error = in_pcballoc(so, &divb6table, wait);
|
@@ -304,9 +296,7 @@ divert6_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp,
|
304 | 296 | return (divert_sysctl_divstat(div6counters, oldp, oldlenp,
|
305 | 297 | newp));
|
306 | 298 | default:
|
307 |
| - return (sysctl_bounded_arr(divert6ctl_vars, |
308 |
| - nitems(divert6ctl_vars), name, namelen, oldp, oldlenp, |
309 |
| - newp, newlen)); |
| 299 | + return (EOPNOTSUPP); |
310 | 300 | }
|
311 | 301 | /* NOTREACHED */
|
312 | 302 | }
|
0 commit comments