bin/ed/main.c
1366
siglongjmp(env, -1);
bin/ed/main.c
184
if (sigsetjmp(env, 1)) {
bin/ed/main.c
78
sigjmp_buf env;
bin/ksh/c_sh.c
534
struct env *ep;
bin/ksh/c_sh.c
561
struct env *ep, *last_ep = NULL;
bin/ksh/jobs.c
1272
struct env *ep;
bin/ksh/main.c
152
struct env env;
bin/ksh/main.c
174
memset(&env, 0, sizeof(env));
bin/ksh/main.c
175
env.type = E_NONE;
bin/ksh/main.c
176
ainit(&env.area);
bin/ksh/main.c
177
genv = &env;
bin/ksh/main.c
42
struct env *genv;
bin/ksh/main.c
711
struct env *ep;
bin/ksh/main.c
727
struct env *ep = genv;
bin/ksh/main.c
782
struct env *ep;
bin/ksh/main.c
807
struct env *ep;
bin/ksh/sh.h
79
struct env *oenv; /* link to previous environment */
bin/ksh/sh.h
83
extern struct env *genv;
bin/ksh/var.c
849
XPtrV env;
bin/ksh/var.c
853
XPinit(env, 64);
bin/ksh/var.c
876
XPput(env, vp->val.s);
bin/ksh/var.c
878
XPput(env, NULL);
bin/ksh/var.c
879
return (char **) XPclose(env);
games/boggle/boggle/bog.c
272
if (setjmp(env)) {
games/boggle/boggle/bog.c
73
jmp_buf env;
games/boggle/boggle/timer.c
59
extern jmp_buf env;
games/boggle/boggle/timer.c
74
longjmp(env, 1);
games/trek/lose.c
68
extern jmp_buf env;
games/trek/lose.c
83
longjmp(env, 1);
games/trek/main.c
126
jmp_buf env;
games/trek/main.c
162
if (setjmp(env))
games/trek/play.c
80
extern jmp_buf env;
games/trek/play.c
82
longjmp(env, 1);
games/trek/win.c
58
extern jmp_buf env;
games/trek/win.c
85
longjmp(env, 1);
lib/libcrypto/cms/cms_env.c
136
CMS_EnvelopedData *env;
lib/libcrypto/cms/cms_env.c
138
env = cms_get0_enveloped(cms);
lib/libcrypto/cms/cms_env.c
139
if (!env)
lib/libcrypto/cms/cms_env.c
142
return env->recipientInfos;
lib/libcrypto/cms/cms_env.c
169
CMS_EnvelopedData *env;
lib/libcrypto/cms/cms_env.c
174
env = cms_enveloped_data_init(cms);
lib/libcrypto/cms/cms_env.c
175
if (env == NULL)
lib/libcrypto/cms/cms_env.c
177
if (!cms_EncryptedContent_init(env->encryptedContentInfo, cipher,
lib/libcrypto/cms/cms_env.c
250
CMS_EnvelopedData *env;
lib/libcrypto/cms/cms_env.c
253
env = cms_get0_enveloped(cms);
lib/libcrypto/cms/cms_env.c
254
if (!env)
lib/libcrypto/cms/cms_env.c
286
if (!sk_CMS_RecipientInfo_push(env->recipientInfos, ri))
lib/libcrypto/cms/cms_env.c
564
CMS_EnvelopedData *env;
lib/libcrypto/cms/cms_env.c
567
env = cms_get0_enveloped(cms);
lib/libcrypto/cms/cms_env.c
568
if (!env)
lib/libcrypto/cms/cms_env.c
624
if (!sk_CMS_RecipientInfo_push(env->recipientInfos, ri))
lib/libcrypto/cms/cms_env.c
871
cms_env_set_originfo_version(CMS_EnvelopedData *env)
lib/libcrypto/cms/cms_env.c
873
CMS_OriginatorInfo *org = env->originatorInfo;
lib/libcrypto/cms/cms_env.c
883
env->version = 4;
lib/libcrypto/cms/cms_env.c
886
if (env->version < 3)
lib/libcrypto/cms/cms_env.c
887
env->version = 3;
lib/libcrypto/cms/cms_env.c
896
env->version = 4;
lib/libcrypto/cms/cms_env.c
903
cms_env_set_version(CMS_EnvelopedData *env)
lib/libcrypto/cms/cms_env.c
911
if (env->version >= 4)
lib/libcrypto/cms/cms_env.c
914
cms_env_set_originfo_version(env);
lib/libcrypto/cms/cms_env.c
916
if (env->version >= 3)
lib/libcrypto/cms/cms_env.c
919
for (i = 0; i < sk_CMS_RecipientInfo_num(env->recipientInfos); i++) {
lib/libcrypto/cms/cms_env.c
920
ri = sk_CMS_RecipientInfo_value(env->recipientInfos, i);
lib/libcrypto/cms/cms_env.c
922
env->version = 3;
lib/libcrypto/cms/cms_env.c
926
env->version = 2;
lib/libcrypto/cms/cms_env.c
929
if (env->originatorInfo || env->unprotectedAttrs)
lib/libcrypto/cms/cms_env.c
930
env->version = 2;
lib/libcrypto/cms/cms_env.c
931
if (env->version == 2)
lib/libcrypto/cms/cms_env.c
933
env->version = 0;
lib/libcrypto/cms/cms_pwri.c
105
env = cms_get0_enveloped(cms);
lib/libcrypto/cms/cms_pwri.c
106
if (!env)
lib/libcrypto/cms/cms_pwri.c
117
kekciph = env->encryptedContentInfo->cipher;
lib/libcrypto/cms/cms_pwri.c
205
if (!sk_CMS_RecipientInfo_push(env->recipientInfos, ri))
lib/libcrypto/cms/cms_pwri.c
98
CMS_EnvelopedData *env;
lib/libcurses/base/lib_initscr.c
66
const char *env;
lib/libcurses/base/lib_initscr.c
71
env = getenv("TERM");
lib/libcurses/base/lib_initscr.c
72
(void) VALID_TERM_ENV(env, "unknown");
lib/libcurses/base/lib_initscr.c
74
if ((name = strdup(env)) == NULL) {
lib/libcurses/base/lib_mouse.c
487
const char *env = getenv("TERM");
lib/libcurses/base/lib_mouse.c
489
if (env != 0) {
lib/libcurses/base/lib_mouse.c
490
result = _nc_name_match(list, env, "|:");
lib/libcurses/base/lib_mouse.c
500
if (env != 0 && strstr(env, "linux") != 0) {
lib/libcurses/base/lib_set_term.c
326
char *env;
lib/libcurses/base/lib_set_term.c
489
if ((env = getenv("NCURSES_ASSUMED_COLORS")) != 0) {
lib/libcurses/base/lib_set_term.c
492
int count = sscanf(env, "%d%c%d%c", &fg, &sep1, &bg, &sep2);
lib/libcurses/base/lib_set_term.c
653
env = _nc_get_locale();
lib/libcurses/base/lib_set_term.c
654
sp->_legacy_coding = ((env == 0)
lib/libcurses/base/lib_set_term.c
655
|| !strcmp(env, "C")
lib/libcurses/base/lib_set_term.c
656
|| !strcmp(env, "POSIX"));
lib/libcurses/tinfo/lib_setup.c
554
char *env;
lib/libcurses/tinfo/lib_setup.c
560
env = setlocale(LC_CTYPE, 0);
lib/libcurses/tinfo/lib_setup.c
562
if (((env = getenv("LANG")) != 0 && *env != '\0')
lib/libcurses/tinfo/lib_setup.c
563
|| ((env = getenv("LC_CTYPE")) != 0 && *env != '\0')
lib/libcurses/tinfo/lib_setup.c
564
|| ((env = getenv("LC_ALL")) != 0 && *env != '\0')) {
lib/libcurses/tinfo/lib_setup.c
568
T(("_nc_get_locale %s", _nc_visbuf(env)));
lib/libcurses/tinfo/lib_setup.c
569
return env;
lib/libcurses/tinfo/lib_setup.c
582
char *env = nl_langinfo(CODESET);
lib/libcurses/tinfo/lib_setup.c
583
result = !strcmp(env, "UTF-8");
lib/libcurses/tinfo/lib_setup.c
584
T(("_nc_unicode_locale(%s) ->%d", env, result));
lib/libcurses/tinfo/lib_setup.c
586
char *env = _nc_get_locale();
lib/libcurses/tinfo/lib_setup.c
587
if (env != 0) {
lib/libcurses/tinfo/lib_setup.c
588
if (strstr(env, ".UTF-8") != 0) {
lib/libcurses/tinfo/lib_setup.c
590
T(("_nc_unicode_locale(%s) ->%d", env, result));
lib/libcurses/tinfo/lib_setup.c
608
const char *env;
lib/libcurses/tinfo/lib_setup.c
617
} else if ((env = getenv("TERM")) != 0) {
lib/libcurses/tinfo/lib_setup.c
618
if (strstr(env, "linux")) {
lib/libcurses/tinfo/lib_setup.c
620
} else if (strstr(env, "screen") != 0
lib/libcurses/tinfo/lib_setup.c
621
&& ((env = getenv("TERMCAP")) != 0
lib/libcurses/tinfo/lib_setup.c
622
&& strstr(env, "screen") != 0)
lib/libcurses/tinfo/lib_setup.c
623
&& strstr(env, "hhII00") != 0) {
lib/libcurses/tinfo/obsolete.c
268
char *env = getenv("NCURSES_OOM_TESTING");
lib/libcurses/tinfo/obsolete.c
270
if (env != NULL) {
lib/libcurses/tinfo/obsolete.c
272
oom_limit = strtol(env, &check, 0);
lib/libexpat/tests/minicheck.c
140
static jmp_buf env;
lib/libexpat/tests/minicheck.c
206
if (setjmp(env)) {
lib/libexpat/tests/minicheck.c
213
if (setjmp(env)) {
lib/libexpat/tests/minicheck.c
222
if (setjmp(env)) {
lib/libexpat/tests/minicheck.c
258
longjmp(env, 1);
lib/libkeynote/environment.c
722
kn_query(struct environment *env, char **retvalues, int numval,
lib/libkeynote/environment.c
735
for (en = env; en != NULL; en = en->env_next)
lib/libm/src/s_fma.c
100
feupdateenv(&env);
lib/libm/src/s_fma.c
105
feholdexcept(&env);
lib/libm/src/s_fma.c
109
feupdateenv(&env);
lib/libm/src/s_fma.c
114
feholdexcept(&env);
lib/libm/src/s_fma.c
118
feupdateenv(&env);
lib/libm/src/s_fma.c
88
fenv_t env;
lib/libm/src/s_fma.c
96
feholdexcept(&env);
lib/libm/src/s_fmal.c
100
feholdexcept(&env);
lib/libm/src/s_fmal.c
104
feupdateenv(&env);
lib/libm/src/s_fmal.c
109
feholdexcept(&env);
lib/libm/src/s_fmal.c
113
feupdateenv(&env);
lib/libm/src/s_fmal.c
83
fenv_t env;
lib/libm/src/s_fmal.c
91
feholdexcept(&env);
lib/libm/src/s_fmal.c
95
feupdateenv(&env);
lib/libm/src/s_lrint.c
49
fenv_t env;
lib/libm/src/s_lrint.c
52
feholdexcept(&env);
lib/libm/src/s_lrint.c
56
feupdateenv(&env);
lib/libm/src/s_lrintf.c
49
fenv_t env;
lib/libm/src/s_lrintf.c
52
feholdexcept(&env);
lib/libm/src/s_lrintf.c
56
feupdateenv(&env);
lib/libm/src/s_lrintl.c
49
fenv_t env;
lib/libm/src/s_lrintl.c
52
feholdexcept(&env);
lib/libm/src/s_lrintl.c
56
feupdateenv(&env);
libexec/getty/main.c
346
env[i] = environ[i];
libexec/getty/main.c
347
makeenv(&env[i]);
libexec/getty/main.c
352
execle(LO, "login", "-p", "--", name, NULL, env);
libexec/getty/main.c
78
char *env[128];
libexec/getty/subr.c
323
makeenv(char *env[])
libexec/getty/subr.c
329
ep = env;
libexec/ld.so/loader.c
931
_dl_getenv(const char *var, char **env)
libexec/ld.so/loader.c
935
while ((ep = *env++)) {
libexec/ld.so/loader.c
949
_dl_unsetenv(const char *var, char **env)
libexec/ld.so/loader.c
953
while ((ep = *env)) {
libexec/ld.so/loader.c
963
for (P = env;; ++P)
libexec/ld.so/loader.c
967
env++;
regress/lib/libc/malloc/malloc_errs/malloc_errs.c
290
char const *env[2];
regress/lib/libc/malloc/malloc_errs/malloc_errs.c
307
env[0] = options;
regress/lib/libc/malloc/malloc_errs/malloc_errs.c
308
env[1] = NULL;
regress/lib/libc/malloc/malloc_errs/malloc_errs.c
309
execle(argv[0], argv[0], num, NULL, env);
regress/lib/libc/setjmp-fpu/_setjmp.c
11
#define SETJMP(env, savemask) _setjmp(env)
regress/lib/libc/setjmp-fpu/_setjmp.c
12
#define LONGJMP(env, val) _longjmp(env, val)
regress/lib/libc/setjmp-fpu/setjmp-fpu.c
10
JMP_BUF env;
regress/lib/libc/setjmp-fpu/setjmp-fpu.c
21
rv = SETJMP(env, 0);
regress/lib/libc/setjmp-fpu/setjmp-fpu.c
37
LONGJMP(env, 1);
regress/lib/libc/setjmp-fpu/setjmp.c
11
#define SETJMP(env, savemask) setjmp(env)
regress/lib/libc/setjmp-fpu/setjmp.c
12
#define LONGJMP(env, val) longjmp(env, val)
regress/lib/libc/setjmp-fpu/sigsetjmp.c
11
#define SETJMP(env, savemask) sigsetjmp(env, savemask)
regress/lib/libc/setjmp-fpu/sigsetjmp.c
12
#define LONGJMP(env, val) siglongjmp(env, val)
regress/lib/libm/fenv/fenv.c
132
fenv_t env;
regress/lib/libm/fenv/fenv.c
134
fegetenv(&env);
regress/lib/libm/fenv/fenv.c
137
memset(&env.__x87.__others[0], 0, 14);
regress/lib/libm/fenv/fenv.c
139
assert(memcmp(&env, FE_DFL_ENV, sizeof(env)) == 0);
regress/lib/libm/fenv/fenv.c
405
fenv_t env;
regress/lib/libm/fenv/fenv.c
439
assert(feholdexcept(&env) == 0);
regress/lib/libm/fenv/fenv.c
447
assert(feupdateenv(&env) == 0);
regress/lib/libm/msun/fenv_test.c
180
fenv_t env;
regress/lib/libm/msun/fenv_test.c
182
fegetenv(&env);
regress/lib/libm/msun/fenv_test.c
184
hexdump(&env, sizeof(env), "current fenv ", HD_OMIT_CHARS);
regress/lib/libm/msun/fenv_test.c
185
hexdump(FE_DFL_ENV, sizeof(env), "default fenv ", HD_OMIT_CHARS);
regress/lib/libm/msun/fenv_test.c
202
ATF_CHECK(memcmp(&env.__mxcsr, &FE_DFL_ENV->__mxcsr,
regress/lib/libm/msun/fenv_test.c
203
sizeof(env.__mxcsr)) == 0);
regress/lib/libm/msun/fenv_test.c
204
ATF_CHECK(memcmp(&env.__x87.__control, &FE_DFL_ENV->__x87.__control,
regress/lib/libm/msun/fenv_test.c
205
sizeof(env.__x87.__control)) == 0);
regress/lib/libm/msun/fenv_test.c
206
ATF_CHECK(memcmp(&env.__x87.__status, &FE_DFL_ENV->__x87.__status,
regress/lib/libm/msun/fenv_test.c
207
sizeof(env.__x87.__status)) == 0);
regress/lib/libm/msun/fenv_test.c
208
ATF_CHECK(memcmp(&env.__x87.__tag, &FE_DFL_ENV->__x87.__tag,
regress/lib/libm/msun/fenv_test.c
209
sizeof(env.__x87.__tag)) == 0);
regress/lib/libm/msun/fenv_test.c
211
ATF_CHECK_EQ(0, memcmp(&env, FE_DFL_ENV, sizeof(env)));
regress/lib/libm/msun/fenv_test.c
498
fenv_t env;
regress/lib/libm/msun/fenv_test.c
534
ATF_CHECK_EQ(0, feholdexcept(&env));
regress/lib/libm/msun/fenv_test.c
541
ATF_CHECK_EQ(0, feupdateenv(&env));
regress/lib/libm/msun/test-utils.h
123
fenv_t env;
regress/lib/libm/msun/test-utils.h
136
feholdexcept(&env);
regress/lib/libm/msun/test-utils.h
146
fesetenv(&env);
regress/libexec/ld.so/init-env/prog/prog.c
13
main(int argc, char **argv, char **env)
regress/libexec/ld.so/init-env/prog/prog.c
17
if (env == environ)
regress/sbin/iked/parser/common.c
127
timer_set(struct iked *env, struct iked_timer *tmr,
regress/sbin/iked/parser/common.c
133
timer_add(struct iked *env, struct iked_timer *tmr, int timeout)
regress/sbin/iked/parser/common.c
138
timer_del(struct iked *env, struct iked_timer *tmr)
regress/sbin/iked/parser/common.c
143
ikev2_nat_detection(struct iked *env, struct iked_message *msg,
regress/sbin/iked/parser/common.c
150
ca_setreq(struct iked *env, struct iked_sa *sh, struct iked_static_id *localid,
regress/sbin/iked/parser/common.c
188
ikev2_send_informational(struct iked *env, struct iked_message *msg)
regress/sbin/iked/parser/common.c
194
ikev2_msg_decrypt(struct iked *env, struct iked_sa *sa,
regress/sbin/iked/parser/common.c
213
ikev2_msg_flushqueue(struct iked *env, struct iked_msgqueue *queue)
regress/sbin/iked/parser/common.c
218
ikev2_msg_lookup(struct iked *env, struct iked_msgqueue *queue,
regress/sbin/iked/parser/common.c
56
eap_parse(struct iked *env, const struct iked_sa *sa, struct iked_message *msg,
regress/sbin/iked/parser/common.c
69
ikev2_send_ike_e(struct iked *env, struct iked_sa *sa, struct ibuf *buf,
regress/sbin/iked/parser/common.c
76
ikev2_ikesa_recv_delete(struct iked *env, struct iked_sa *sa)
regress/sys/kern/signal/siginfo-fault/siginfo-fault.c
139
if (sigsetjmp(env, 1) == 0) {
regress/sys/kern/signal/siginfo-fault/siginfo-fault.c
146
if (sigsetjmp(env, 1) == 0) {
regress/sys/kern/signal/siginfo-fault/siginfo-fault.c
153
if (sigsetjmp(env, 1) == 0) {
regress/sys/kern/signal/siginfo-fault/siginfo-fault.c
168
if (sigsetjmp(env, 1) == 0) {
regress/sys/kern/signal/siginfo-fault/siginfo-fault.c
46
static jmp_buf env;
regress/sys/kern/signal/siginfo-fault/siginfo-fault.c
55
siglongjmp(env, 1);
regress/usr.bin/ssh/unittests/authopt/tests.c
125
ARRAY_EQ(nenv, env);
regress/usr.bin/ssh/unittests/authopt/tests.c
270
env, nenv, "foo=1,bar=2");
regress/usr.bin/ssh/unittests/authopt/tests.c
272
env, nenv, "foo=1");
regress/usr.bin/ssh/unittests/authopt/tests.c
557
expected->env = commasplit("foo=a,bar=b", &expected->nenv);
sbin/iked/ca.c
1069
ibuf_free(env->sc_certreq);
sbin/iked/ca.c
1070
if ((env->sc_certreq = ibuf_new(NULL, 0)) == NULL)
sbin/iked/ca.c
1091
if (ibuf_add(env->sc_certreq, md, len) != 0) {
sbin/iked/ca.c
1092
ibuf_free(env->sc_certreq);
sbin/iked/ca.c
1093
env->sc_certreq = NULL;
sbin/iked/ca.c
1098
if (ibuf_size(env->sc_certreq)) {
sbin/iked/ca.c
1099
env->sc_certreqtype = IKEV2_CERT_X509_CERT;
sbin/iked/ca.c
1100
iov[0].iov_base = &env->sc_certreqtype;
sbin/iked/ca.c
1101
iov[0].iov_len = sizeof(env->sc_certreqtype);
sbin/iked/ca.c
1103
iov[1].iov_base = ibuf_data(env->sc_certreq);
sbin/iked/ca.c
1104
iov[1].iov_len = ibuf_size(env->sc_certreq);
sbin/iked/ca.c
1108
ibuf_size(env->sc_certreq) / SHA_DIGEST_LENGTH,
sbin/iked/ca.c
1109
ibuf_size(env->sc_certreq) == SHA_DIGEST_LENGTH ?
sbin/iked/ca.c
1112
(void)proc_composev(&env->sc_ps, PROC_IKEV2, IMSG_CERTREQ,
sbin/iked/ca.c
112
struct iked *env = iked_env;
sbin/iked/ca.c
1124
(void)ca_validate_cert(env, NULL, x509, 0, NULL, NULL);
sbin/iked/ca.c
1127
if (!env->sc_certreqtype)
sbin/iked/ca.c
1128
env->sc_certreqtype = store->ca_pubkey.id_type;
sbin/iked/ca.c
1131
print_map(env->sc_certreqtype, ikev2_cert_map));
sbin/iked/ca.c
1133
iov[0].iov_base = &env->sc_certreqtype;
sbin/iked/ca.c
1134
iov[0].iov_len = sizeof(env->sc_certreqtype);
sbin/iked/ca.c
1137
(void)proc_composev(&env->sc_ps, PROC_IKEV2, IMSG_CERTREQ, iov, iovcnt);
sbin/iked/ca.c
127
env->sc_priv = store;
sbin/iked/ca.c
1293
ca_cert_local(struct iked *env, X509 *cert)
sbin/iked/ca.c
1295
struct ca_store *store = env->sc_priv;
sbin/iked/ca.c
134
struct iked *env = iked_env;
sbin/iked/ca.c
137
ibuf_free(env->sc_certreq);
sbin/iked/ca.c
138
if ((store = env->sc_priv) == NULL)
sbin/iked/ca.c
1382
ca_store_info(struct iked *env, struct imsg *imsg, const char *msg, X509_STORE *ctx)
sbin/iked/ca.c
1406
proc_compose_imsg(&env->sc_ps, PROC_CONTROL, -1,
sbin/iked/ca.c
150
struct iked *env = iked_env;
sbin/iked/ca.c
151
struct ca_store *store = env->sc_priv;
sbin/iked/ca.c
1773
ca_validate_pubkey(struct iked *env, struct iked_static_id *id,
sbin/iked/ca.c
181
ca_reset(struct iked *env)
sbin/iked/ca.c
183
struct ca_store *store = env->sc_priv;
sbin/iked/ca.c
1871
ca_validate_cert(struct iked *env, struct iked_static_id *id,
sbin/iked/ca.c
1874
struct ca_store *store = env->sc_priv;
sbin/iked/ca.c
1910
ret = ca_validate_pubkey(env, id, pkey, 0, NULL);
sbin/iked/ca.c
1943
if (env->sc_cert_partial_chain)
sbin/iked/ca.c
204
if (ca_reload(env) != 0)
sbin/iked/ca.c
228
ca_decode_cert_bundle(struct iked *env, struct iked_sahdr *sh,
sbin/iked/ca.c
334
struct iked *env = iked_env;
sbin/iked/ca.c
344
proc_compose(&env->sc_ps, PROC_PARENT, imsg->hdr.type, NULL, 0);
sbin/iked/ca.c
351
ca_reset(env);
sbin/iked/ca.c
355
ocsp_receive_fd(env, imsg);
sbin/iked/ca.c
358
config_getocsp(env, imsg);
sbin/iked/ca.c
362
config_getkey(env, imsg);
sbin/iked/ca.c
365
config_getstatic(env, imsg);
sbin/iked/ca.c
377
struct iked *env = iked_env;
sbin/iked/ca.c
381
ca_getreq(env, imsg);
sbin/iked/ca.c
384
ca_getcert(env, imsg);
sbin/iked/ca.c
387
ca_getauth(env, imsg);
sbin/iked/ca.c
399
struct iked *env = iked_env;
sbin/iked/ca.c
400
struct ca_store *store = env->sc_priv;
sbin/iked/ca.c
404
ca_store_info(env, imsg, "CA", store->ca_cas);
sbin/iked/ca.c
405
ca_store_info(env, imsg, "CERT", store->ca_certs);
sbin/iked/ca.c
407
proc_compose_imsg(&env->sc_ps, PROC_CONTROL, -1,
sbin/iked/ca.c
419
ca_setcert(struct iked *env, struct iked_sahdr *sh, struct iked_id *id,
sbin/iked/ca.c
457
if (proc_composev(&env->sc_ps, procid, IMSG_CERT, iov, iovcnt) == -1)
sbin/iked/ca.c
463
ca_setscert(struct iked *env, struct iked_sahdr *sh, uint8_t type, X509 *cert)
sbin/iked/ca.c
483
ret = proc_composev(&env->sc_ps, PROC_IKEV2, IMSG_SCERT, iov, iovcnt);
sbin/iked/ca.c
489
ca_setreq(struct iked *env, struct iked_sa *sa,
sbin/iked/ca.c
530
if (proc_composev(&env->sc_ps, procid, IMSG_CERTREQ, iov, iovcnt) == -1)
sbin/iked/ca.c
556
ca_setauth(struct iked *env, struct iked_sa *sa,
sbin/iked/ca.c
581
return (ikev2_msg_authsign(env, sa,
sbin/iked/ca.c
597
if (proc_composev(&env->sc_ps, id, IMSG_AUTH, iov, iovcnt) == -1)
sbin/iked/ca.c
603
ca_getcert(struct iked *env, struct imsg *imsg)
sbin/iked/ca.c
605
struct ca_store *store = env->sc_priv;
sbin/iked/ca.c
637
ca_decode_cert_bundle(env, &sh, &ptr, &len, &untrusted) == 0)
sbin/iked/ca.c
656
if (env->sc_ocsp_url == NULL)
sbin/iked/ca.c
657
ret = ca_validate_cert(env, &id, ptr, len, untrusted, NULL);
sbin/iked/ca.c
659
ret = ca_validate_cert(env, &id, ptr, len, untrusted, &issuer);
sbin/iked/ca.c
661
ret = ocsp_validate_cert(env, ptr, len, sh,
sbin/iked/ca.c
674
ret = ca_validate_pubkey(env, &id, ptr, len, NULL);
sbin/iked/ca.c
678
ret = ca_validate_pubkey(env, &id, NULL, 0, &key);
sbin/iked/ca.c
703
ret = proc_composev(&env->sc_ps, PROC_IKEV2, cmd, iov, iovcnt);
sbin/iked/ca.c
756
ca_getreq(struct iked *env, struct imsg *imsg)
sbin/iked/ca.c
758
struct ca_store *store = env->sc_priv;
sbin/iked/ca.c
832
if (!ca_cert_local(env, cert)) {
sbin/iked/ca.c
843
ca_setscert(env, &sh, type, chain[i - 2]);
sbin/iked/ca.c
900
ca_setcert(env, &sh, NULL, type,
sbin/iked/ca.c
908
ca_getauth(struct iked *env, struct imsg *imsg)
sbin/iked/ca.c
910
struct ca_store *store = env->sc_priv;
sbin/iked/ca.c
954
if (ikev2_msg_authsign(env, &sa, &policy.pol_auth, authmsg) != 0) {
sbin/iked/ca.c
959
ret = ca_setauth(env, &sa, sa.sa_localauth.id_buf, PROC_IKEV2);
sbin/iked/ca.c
969
ca_reload(struct iked *env)
sbin/iked/ca.c
971
struct ca_store *store = env->sc_priv;
sbin/iked/config.c
1004
if (env->sc_opts & IKED_OPT_NOACTION)
sbin/iked/config.c
1007
iov[0].iov_base = &env->sc_ocsp_tolerate;
sbin/iked/config.c
1008
iov[0].iov_len = sizeof(env->sc_ocsp_tolerate);
sbin/iked/config.c
1010
iov[1].iov_base = &env->sc_ocsp_maxage;
sbin/iked/config.c
1011
iov[1].iov_len = sizeof(env->sc_ocsp_maxage);
sbin/iked/config.c
1013
if (env->sc_ocsp_url) {
sbin/iked/config.c
1014
iov[2].iov_base = env->sc_ocsp_url;
sbin/iked/config.c
1015
iov[2].iov_len = strlen(env->sc_ocsp_url);
sbin/iked/config.c
1018
return (proc_composev(&env->sc_ps, PROC_CERT, IMSG_OCSP_CFG,
sbin/iked/config.c
1023
config_getocsp(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
1028
free(env->sc_ocsp_url);
sbin/iked/config.c
1033
need = sizeof(env->sc_ocsp_tolerate);
sbin/iked/config.c
1036
memcpy(&env->sc_ocsp_tolerate, ptr, need);
sbin/iked/config.c
1041
need = sizeof(env->sc_ocsp_maxage);
sbin/iked/config.c
1044
memcpy(&env->sc_ocsp_maxage, ptr, need);
sbin/iked/config.c
1050
env->sc_ocsp_url = get_string(ptr, have);
sbin/iked/config.c
1052
env->sc_ocsp_url = NULL;
sbin/iked/config.c
1054
env->sc_ocsp_url ? env->sc_ocsp_url : "none",
sbin/iked/config.c
1055
env->sc_ocsp_tolerate, env->sc_ocsp_maxage);
sbin/iked/config.c
1060
config_setkeys(struct iked *env)
sbin/iked/config.c
1097
if (proc_composev(&env->sc_ps, PROC_CERT, IMSG_PRIVKEY, iov, 2) == -1) {
sbin/iked/config.c
1107
if (proc_composev(&env->sc_ps, PROC_CERT, IMSG_PUBKEY, iov, 2) == -1) {
sbin/iked/config.c
112
config_free_sa(struct iked *env, struct iked_sa *sa)
sbin/iked/config.c
1125
config_getkey(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
1140
ca_getkey(&env->sc_ps, &id, imsg->hdr.type);
sbin/iked/config.c
1146
config_setradauth(struct iked *env)
sbin/iked/config.c
1148
proc_compose(&env->sc_ps, PROC_IKEV2, IMSG_CFG_RADAUTH,
sbin/iked/config.c
1149
&env->sc_radauth, sizeof(env->sc_radauth));
sbin/iked/config.c
1154
config_getradauth(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
1159
memcpy(&env->sc_radauth, imsg->data, sizeof(struct iked_radopts));
sbin/iked/config.c
116
timer_del(env, &sa->sa_timer);
sbin/iked/config.c
1165
config_setradacct(struct iked *env)
sbin/iked/config.c
1167
proc_compose(&env->sc_ps, PROC_IKEV2, IMSG_CFG_RADACCT,
sbin/iked/config.c
1168
&env->sc_radacct, sizeof(env->sc_radacct));
sbin/iked/config.c
117
timer_del(env, &sa->sa_keepalive);
sbin/iked/config.c
1173
config_getradacct(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
1178
memcpy(&env->sc_radacct, imsg->data, sizeof(struct iked_radopts));
sbin/iked/config.c
118
timer_del(env, &sa->sa_rekey);
sbin/iked/config.c
1184
config_setradserver(struct iked *env, struct sockaddr *sa, socklen_t salen,
sbin/iked/config.c
1191
if (env->sc_opts & IKED_OPT_NOACTION)
sbin/iked/config.c
1209
proc_composev_imsg(&env->sc_ps, PROC_IKEV2, -1, IMSG_CFG_RADSERVER, -1,
sbin/iked/config.c
122
config_free_childsas(env, &sa->sa_childsas, NULL, NULL);
sbin/iked/config.c
1220
config_getradserver(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
123
sa_configure_iface(env, sa, 0);
sbin/iked/config.c
1237
server->rs_env = env;
sbin/iked/config.c
124
sa_free_flows(env, &sa->sa_flows);
sbin/iked/config.c
1240
TAILQ_INSERT_TAIL(&env->sc_radauthservers, server, rs_entry);
sbin/iked/config.c
1242
TAILQ_INSERT_TAIL(&env->sc_radacctservers, server, rs_entry);
sbin/iked/config.c
1251
config_setradcfgmap(struct iked *env, int cfg_type, uint32_t vendor_id,
sbin/iked/config.c
1256
if (env->sc_opts & IKED_OPT_NOACTION)
sbin/iked/config.c
126
iked_radius_acct_stop(env, sa);
sbin/iked/config.c
1263
proc_compose_imsg(&env->sc_ps, PROC_IKEV2, -1, IMSG_CFG_RADCFGMAP, -1,
sbin/iked/config.c
1270
config_getradcfgmap(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
1281
if (TAILQ_EMPTY(&env->sc_radcfgmaps)) {
sbin/iked/config.c
129
(void)RB_REMOVE(iked_addrpool, &env->sc_addrpool, sa);
sbin/iked/config.c
1295
TAILQ_CONCAT(&env->sc_radcfgmaps, &cfgmaps, entry);
sbin/iked/config.c
1299
TAILQ_FOREACH(cfgmap, &env->sc_radcfgmaps, entry) {
sbin/iked/config.c
1313
TAILQ_INSERT_TAIL(&env->sc_radcfgmaps, cfgmap, entry);
sbin/iked/config.c
1319
config_setraddae(struct iked *env, struct sockaddr *sa, socklen_t salen)
sbin/iked/config.c
1324
if (env->sc_opts & IKED_OPT_NOACTION)
sbin/iked/config.c
133
(void)RB_REMOVE(iked_addrpool6, &env->sc_addrpool6, sa);
sbin/iked/config.c
1344
proc_compose_imsg(&env->sc_ps, PROC_IKEV2, -1, IMSG_CFG_RADDAE, -1,
sbin/iked/config.c
1355
config_getraddae(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
1368
dae->rd_env = env;
sbin/iked/config.c
1374
TAILQ_INSERT_TAIL(&env->sc_raddaes, dae, rd_entry);
sbin/iked/config.c
1380
config_setradclient(struct iked *env, struct sockaddr *sa, socklen_t salen,
sbin/iked/config.c
139
policy_unref(env, sa->sa_policy);
sbin/iked/config.c
1396
proc_composev_imsg(&env->sc_ps, PROC_IKEV2, -1, IMSG_CFG_RADDAECLIENT,
sbin/iked/config.c
1403
config_getradclient(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
1419
TAILQ_INSERT_TAIL(&env->sc_raddaeclients, client, rc_entry);
sbin/iked/config.c
142
ikev2_msg_flushqueue(env, &sa->sa_requests);
sbin/iked/config.c
143
ikev2_msg_flushqueue(env, &sa->sa_responses);
sbin/iked/config.c
190
ikestat_dec(env, ikes_sa_established_current);
sbin/iked/config.c
191
ikestat_inc(env, ikes_sa_removed);
sbin/iked/config.c
195
iked_radius_request_free(env, sa->sa_radreq);
sbin/iked/config.c
201
config_new_policy(struct iked *env)
sbin/iked/config.c
219
config_free_policy(struct iked *env, struct iked_policy *pol)
sbin/iked/config.c
233
TAILQ_REMOVE(&env->sc_policies, pol, pol_entry);
sbin/iked/config.c
237
policy_ref(env, pol);
sbin/iked/config.c
256
config_free_flows(env, &pol->pol_flows);
sbin/iked/config.c
309
config_free_flows(struct iked *env, struct iked_flows *head)
sbin/iked/config.c
321
config_free_childsas(struct iked *env, struct iked_childsas *head,
sbin/iked/config.c
344
RB_REMOVE(iked_activesas, &env->sc_activesas, csa);
sbin/iked/config.c
345
(void)pfkey_sa_delete(env, csa);
sbin/iked/config.c
350
(void)pfkey_sa_delete(env, ipcomp);
sbin/iked/config.c
354
ikestat_inc(env, ikes_csa_removed);
sbin/iked/config.c
40
config_new_sa(struct iked *env, int initiator)
sbin/iked/config.c
467
config_new_user(struct iked *env, struct iked_user *new)
sbin/iked/config.c
476
if ((old = RB_INSERT(iked_users, &env->sc_users, usr)) != NULL) {
sbin/iked/config.c
495
config_setcoupled(struct iked *env, unsigned int couple)
sbin/iked/config.c
500
proc_compose(&env->sc_ps, PROC_IKEV2, type, NULL, 0);
sbin/iked/config.c
506
config_getcoupled(struct iked *env, unsigned int type)
sbin/iked/config.c
508
return (pfkey_couple(env, &env->sc_sas,
sbin/iked/config.c
513
config_setmode(struct iked *env, unsigned int passive)
sbin/iked/config.c
524
proc_compose(&env->sc_ps, PROC_CERT, type, NULL, 0);
sbin/iked/config.c
530
config_getmode(struct iked *env, unsigned int type)
sbin/iked/config.c
535
old = env->sc_passive ? 1 : 0;
sbin/iked/config.c
536
env->sc_passive = type == IMSG_CTL_PASSIVE ? 1 : 0;
sbin/iked/config.c
538
if (old == env->sc_passive)
sbin/iked/config.c
542
mode[old], mode[env->sc_passive]);
sbin/iked/config.c
548
config_setreset(struct iked *env, unsigned int mode, enum privsep_procid id)
sbin/iked/config.c
550
proc_compose(&env->sc_ps, id, IMSG_CTL_RESET, &mode, sizeof(mode));
sbin/iked/config.c
555
config_getreset(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
562
return (config_doreset(env, mode));
sbin/iked/config.c
566
config_doreset(struct iked *env, unsigned int mode)
sbin/iked/config.c
574
TAILQ_FOREACH_SAFE(pol, &env->sc_policies, pol_entry, poltmp) {
sbin/iked/config.c
575
config_free_policy(env, pol);
sbin/iked/config.c
581
while ((sa = RB_MIN(iked_sas, &env->sc_sas))) {
sbin/iked/config.c
584
ikev2_ike_sa_delete(env, sa) != 0) {
sbin/iked/config.c
585
RB_REMOVE(iked_sas, &env->sc_sas, sa);
sbin/iked/config.c
587
sa_dstid_remove(env, sa);
sbin/iked/config.c
588
config_free_sa(env, sa);
sbin/iked/config.c
595
while ((usr = RB_MIN(iked_users, &env->sc_users))) {
sbin/iked/config.c
596
RB_REMOVE(iked_users, &env->sc_users, usr);
sbin/iked/config.c
608
TAILQ_FOREACH_SAFE(rad, &env->sc_radauthservers, rs_entry,
sbin/iked/config.c
612
TAILQ_REMOVE(&env->sc_radauthservers, rad, rs_entry);
sbin/iked/config.c
614
iked_radius_request_free(env, req);
sbin/iked/config.c
617
TAILQ_FOREACH_SAFE(rad, &env->sc_radacctservers, rs_entry,
sbin/iked/config.c
621
TAILQ_REMOVE(&env->sc_radacctservers, rad, rs_entry);
sbin/iked/config.c
623
iked_radius_request_free(env, req);
sbin/iked/config.c
626
TAILQ_FOREACH_SAFE(cfg, &env->sc_radcfgmaps, entry, cfgt) {
sbin/iked/config.c
627
TAILQ_REMOVE(&env->sc_radcfgmaps, cfg, entry);
sbin/iked/config.c
63
ikestat_inc(env, ikes_sa_created);
sbin/iked/config.c
630
TAILQ_FOREACH_SAFE(dae, &env->sc_raddaes, rd_entry, daet) {
sbin/iked/config.c
633
TAILQ_REMOVE(&env->sc_raddaes, dae, rd_entry);
sbin/iked/config.c
636
TAILQ_FOREACH_SAFE(client, &env->sc_raddaeclients, rc_entry,
sbin/iked/config.c
638
TAILQ_REMOVE(&env->sc_raddaeclients, client, rc_entry);
sbin/iked/config.c
651
config_setsocket(struct iked *env, struct sockaddr_storage *ss,
sbin/iked/config.c
658
proc_compose_imsg(&env->sc_ps, id, -1,
sbin/iked/config.c
664
config_getsocket(struct iked *env, struct imsg *imsg,
sbin/iked/config.c
676
sock->sock_env = env;
sbin/iked/config.c
682
sock0 = &env->sc_sock4[0];
sbin/iked/config.c
683
sock1 = &env->sc_sock4[1];
sbin/iked/config.c
686
sock0 = &env->sc_sock6[0];
sbin/iked/config.c
687
sock1 = &env->sc_sock6[1];
sbin/iked/config.c
708
config_enablesocket(struct iked *env)
sbin/iked/config.c
713
for (i = 0; i < nitems(env->sc_sock4); i++)
sbin/iked/config.c
714
if ((sock = env->sc_sock4[i]) != NULL)
sbin/iked/config.c
716
for (i = 0; i < nitems(env->sc_sock6); i++)
sbin/iked/config.c
717
if ((sock = env->sc_sock6[i]) != NULL)
sbin/iked/config.c
722
config_setpfkey(struct iked *env)
sbin/iked/config.c
726
if ((s = pfkey_socket(env)) == -1)
sbin/iked/config.c
728
proc_compose_imsg(&env->sc_ps, PROC_IKEV2, -1,
sbin/iked/config.c
734
config_getpfkey(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
739
pfkey_init(env, fd);
sbin/iked/config.c
744
config_setuser(struct iked *env, struct iked_user *usr, enum privsep_procid id)
sbin/iked/config.c
746
if (env->sc_opts & IKED_OPT_NOACTION) {
sbin/iked/config.c
751
proc_compose(&env->sc_ps, id, IMSG_CFG_USER, usr, sizeof(*usr));
sbin/iked/config.c
756
config_getuser(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
764
if (config_new_user(env, &usr) != NULL) {
sbin/iked/config.c
774
config_setpolicy(struct iked *env, struct iked_policy *pol,
sbin/iked/config.c
809
if (env->sc_opts & IKED_OPT_NOACTION)
sbin/iked/config.c
812
if (proc_composev(&env->sc_ps, id, IMSG_CFG_POLICY, iov,
sbin/iked/config.c
822
config_setflow(struct iked *env, struct iked_policy *pol,
sbin/iked/config.c
828
if (env->sc_opts & IKED_OPT_NOACTION)
sbin/iked/config.c
837
if (proc_composev(&env->sc_ps, id, IMSG_CFG_FLOW,
sbin/iked/config.c
848
config_getpolicy(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
894
TAILQ_INSERT_TAIL(&env->sc_policies, pol, pol_entry);
sbin/iked/config.c
898
if (env->sc_defaultcon != NULL)
sbin/iked/config.c
899
config_free_policy(env, env->sc_defaultcon);
sbin/iked/config.c
900
env->sc_defaultcon = pol;
sbin/iked/config.c
907
config_getflow(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
921
TAILQ_FOREACH(pol, &env->sc_policies, pol_entry) {
sbin/iked/config.c
946
config_setcompile(struct iked *env, enum privsep_procid id)
sbin/iked/config.c
948
if (env->sc_opts & IKED_OPT_NOACTION)
sbin/iked/config.c
951
proc_compose(&env->sc_ps, id, IMSG_COMPILE, NULL, 0);
sbin/iked/config.c
956
config_getcompile(struct iked *env)
sbin/iked/config.c
962
policy_calc_skip_steps(&env->sc_policies);
sbin/iked/config.c
969
config_setstatic(struct iked *env)
sbin/iked/config.c
971
proc_compose(&env->sc_ps, PROC_IKEV2, IMSG_CTL_STATIC,
sbin/iked/config.c
972
&env->sc_static, sizeof(env->sc_static));
sbin/iked/config.c
973
proc_compose(&env->sc_ps, PROC_CERT, IMSG_CTL_STATIC,
sbin/iked/config.c
974
&env->sc_static, sizeof(env->sc_static));
sbin/iked/config.c
979
config_getstatic(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
981
IMSG_SIZE_CHECK(imsg, &env->sc_static);
sbin/iked/config.c
982
memcpy(&env->sc_static, imsg->data, sizeof(env->sc_static));
sbin/iked/config.c
984
log_debug("%s: dpd_check_interval %llu", __func__, env->sc_alive_timeout);
sbin/iked/config.c
986
env->sc_enforcesingleikesa ? "" : "no ");
sbin/iked/config.c
987
log_debug("%s: %sfragmentation", __func__, env->sc_frag ? "" : "no ");
sbin/iked/config.c
988
log_debug("%s: %smobike", __func__, env->sc_mobike ? "" : "no ");
sbin/iked/config.c
989
log_debug("%s: nattport %u", __func__, env->sc_nattport);
sbin/iked/config.c
991
env->sc_stickyaddress ? "" : "no ");
sbin/iked/config.c
993
ikev2_reset_alive_timer(env);
sbin/iked/config.c
999
config_setocsp(struct iked *env)
sbin/iked/control.c
132
cs->cs_env = env;
sbin/iked/control.c
258
struct iked *env = cs->cs_env;
sbin/iked/control.c
313
proc_forward_imsg(&env->sc_ps, &imsg, PROC_PARENT);
sbin/iked/control.c
321
proc_forward_imsg(&env->sc_ps, &imsg, PROC_PARENT);
sbin/iked/control.c
324
proc_forward_imsg(&env->sc_ps, &imsg, PROC_IKEV2);
sbin/iked/control.c
328
proc_forward_imsg(&env->sc_ps, &imsg, PROC_IKEV2);
sbin/iked/control.c
331
proc_forward_imsg(&env->sc_ps, &imsg, PROC_CERT);
sbin/iked/control.c
80
struct iked *env = iked_env;
sbin/iked/eap.c
181
ret = ikev2_msg_send_encrypt(env, sa, &e,
sbin/iked/eap.c
189
eap_challenge_request(struct iked *env, struct iked_sa *sa,
sbin/iked/eap.c
235
ret = ikev2_send_ike_e(env, sa, e,
sbin/iked/eap.c
243
eap_message_send(struct iked *env, struct iked_sa *sa, int eap_code, int eap_id)
sbin/iked/eap.c
258
ret = ikev2_send_ike_e(env, sa, e,
sbin/iked/eap.c
266
eap_success(struct iked *env, struct iked_sa *sa, int eap_id)
sbin/iked/eap.c
268
return (eap_message_send(env, sa, EAP_CODE_SUCCESS, eap_id));
sbin/iked/eap.c
272
eap_mschap_challenge(struct iked *env, struct iked_sa *sa, int eap_id,
sbin/iked/eap.c
305
ret = ikev2_send_ike_e(env, sa, eapmsg,
sbin/iked/eap.c
313
eap_mschap_success(struct iked *env, struct iked_sa *sa, int eap_id)
sbin/iked/eap.c
332
ret = ikev2_send_ike_e(env, sa, eapmsg,
sbin/iked/eap.c
340
eap_mschap(struct iked *env, const struct iked_sa *sa,
sbin/iked/eap.c
414
eap_parse(struct iked *env, const struct iked_sa *sa, struct iked_message *msg,
sbin/iked/eap.c
584
return (eap_mschap(env, sa, msg, eap));
sbin/iked/eap.c
89
eap_identity_request(struct iked *env, struct iked_sa *sa)
sbin/iked/iked.c
164
if ((env = calloc(1, sizeof(*env))) == NULL)
sbin/iked/iked.c
167
iked_env = env;
sbin/iked/iked.c
168
env->sc_opts = opts;
sbin/iked/iked.c
169
env->sc_nattmode = natt_mode;
sbin/iked/iked.c
170
env->sc_nattport = port;
sbin/iked/iked.c
172
ps = &env->sc_ps;
sbin/iked/iked.c
173
ps->ps_env = env;
sbin/iked/iked.c
175
if (strlcpy(env->sc_conffile, conffile, PATH_MAX) >= PATH_MAX)
sbin/iked/iked.c
179
policy_init(env);
sbin/iked/iked.c
224
vroute_init(env);
sbin/iked/iked.c
231
parent_shutdown(env);
sbin/iked/iked.c
239
struct iked *env = ps->ps_env;
sbin/iked/iked.c
241
if (parent_configure(env) == -1)
sbin/iked/iked.c
246
parent_configure(struct iked *env)
sbin/iked/iked.c
250
if (parse_config(env->sc_conffile, env) == -1) {
sbin/iked/iked.c
251
proc_kill(&env->sc_ps);
sbin/iked/iked.c
255
if (env->sc_opts & IKED_OPT_NOACTION) {
sbin/iked/iked.c
257
proc_kill(&env->sc_ps);
sbin/iked/iked.c
261
env->sc_pfkey = -1;
sbin/iked/iked.c
262
config_setpfkey(env);
sbin/iked/iked.c
265
if (config_setkeys(env) == -1)
sbin/iked/iked.c
267
config_setreset(env, RESET_CA, PROC_CERT);
sbin/iked/iked.c
270
config_setcompile(env, PROC_IKEV2);
sbin/iked/iked.c
276
if (env->sc_nattmode != NATT_FORCE)
sbin/iked/iked.c
277
config_setsocket(env, &ss, htons(IKED_IKE_PORT), PROC_IKEV2);
sbin/iked/iked.c
278
if (env->sc_nattmode != NATT_DISABLE)
sbin/iked/iked.c
279
config_setsocket(env, &ss, htons(env->sc_nattport), PROC_IKEV2);
sbin/iked/iked.c
284
if (env->sc_nattmode != NATT_FORCE)
sbin/iked/iked.c
285
config_setsocket(env, &ss, htons(IKED_IKE_PORT), PROC_IKEV2);
sbin/iked/iked.c
286
if (env->sc_nattmode != NATT_DISABLE)
sbin/iked/iked.c
287
config_setsocket(env, &ss, htons(env->sc_nattport), PROC_IKEV2);
sbin/iked/iked.c
308
config_setstatic(env);
sbin/iked/iked.c
309
config_setcoupled(env, env->sc_decoupled ? 0 : 1);
sbin/iked/iked.c
310
config_setocsp(env);
sbin/iked/iked.c
311
config_setradauth(env);
sbin/iked/iked.c
312
config_setradacct(env);
sbin/iked/iked.c
314
config_setmode(env, env->sc_passive ? 1 : 0);
sbin/iked/iked.c
320
parent_reload(struct iked *env, int reset, const char *filename)
sbin/iked/iked.c
324
filename = env->sc_conffile;
sbin/iked/iked.c
329
config_setreset(env, RESET_POLICY, PROC_IKEV2);
sbin/iked/iked.c
330
config_setreset(env, RESET_RADIUS, PROC_IKEV2);
sbin/iked/iked.c
331
if (config_setkeys(env) == -1)
sbin/iked/iked.c
333
config_setreset(env, RESET_CA, PROC_CERT);
sbin/iked/iked.c
335
if (parse_config(filename, env) == -1) {
sbin/iked/iked.c
341
config_setcompile(env, PROC_IKEV2);
sbin/iked/iked.c
343
config_setstatic(env);
sbin/iked/iked.c
344
config_setcoupled(env, env->sc_decoupled ? 0 : 1);
sbin/iked/iked.c
345
config_setocsp(env);
sbin/iked/iked.c
347
config_setmode(env, env->sc_passive ? 1 : 0);
sbin/iked/iked.c
349
config_setreset(env, reset, PROC_IKEV2);
sbin/iked/iked.c
350
config_setreset(env, reset, PROC_CERT);
sbin/iked/iked.c
432
struct iked *env = iked_env;
sbin/iked/iked.c
437
proc_forward_imsg(&env->sc_ps, imsg, PROC_IKEV2);
sbin/iked/iked.c
440
ocsp_connect(env, imsg);
sbin/iked/iked.c
452
struct iked *env = iked_env;
sbin/iked/iked.c
461
parent_reload(env, v, NULL);
sbin/iked/iked.c
467
proc_compose(&env->sc_ps, PROC_IKEV2, type, NULL, 0);
sbin/iked/iked.c
472
parent_reload(env, 0, str);
sbin/iked/iked.c
476
proc_forward_imsg(&env->sc_ps, imsg, PROC_IKEV2);
sbin/iked/iked.c
477
proc_forward_imsg(&env->sc_ps, imsg, PROC_CERT);
sbin/iked/iked.c
491
struct iked *env = iked_env;
sbin/iked/iked.c
496
return (vroute_getaddr(env, imsg));
sbin/iked/iked.c
499
return (vroute_getdns(env, imsg));
sbin/iked/iked.c
502
return (vroute_getroute(env, imsg));
sbin/iked/iked.c
504
return (vroute_getcloneroute(env, imsg));
sbin/iked/iked.c
513
parent_shutdown(struct iked *env)
sbin/iked/iked.c
515
proc_kill(&env->sc_ps);
sbin/iked/iked.c
517
vroute_cleanup(env);
sbin/iked/iked.c
518
free(env->sc_vroute);
sbin/iked/iked.c
519
free(env);
sbin/iked/iked.c
80
struct iked *env = NULL;
sbin/iked/iked.h
1028
int config_getsocket(struct iked *env, struct imsg *,
sbin/iked/iked.h
1030
void config_enablesocket(struct iked *env);
sbin/iked/iked.h
1176
void ikev2_ike_sa_timeout(struct iked *env, void *);
sbin/iked/iked.h
591
#define ikestat_add(env, c, n) do { env->sc_stats.c += (n); } while(0)
sbin/iked/iked.h
592
#define ikestat_inc(env, c) ikestat_add(env, c, 1)
sbin/iked/iked.h
593
#define ikestat_dec(env, c) ikestat_add(env, c, -1)
sbin/iked/ikev2.c
1002
ikev2_send_auth_failed(env, sa);
sbin/iked/ikev2.c
1009
if (ikev2_handle_certreq(env, msg) != 0)
sbin/iked/ikev2.c
1016
if (policy_lookup(env, msg, &sa->sa_proposals, &old->pol_flows,
sbin/iked/ikev2.c
1025
ikev2_send_auth_failed(env, sa);
sbin/iked/ikev2.c
1027
policy_unref(env, old);
sbin/iked/ikev2.c
1043
ikev2_send_auth_failed(env, sa);
sbin/iked/ikev2.c
1052
if ((authmsg = ikev2_msg_auth(env, sa,
sbin/iked/ikev2.c
1059
ca_setauth(env, sa, authmsg, PROC_CERT);
sbin/iked/ikev2.c
1094
ikestat_inc(env, ikes_sa_proposals_negotiate_failures);
sbin/iked/ikev2.c
1125
ikev2_auth_verify(env, sa);
sbin/iked/ikev2.c
1134
if (ca_setcert(env, &sa->sa_hdr, id, certtype, cert, certlen, PROC_CERT) == -1)
sbin/iked/ikev2.c
1150
return ikev2_ike_auth(env, sa);
sbin/iked/ikev2.c
1154
ikev2_ike_auth(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
1158
sa_state(env, sa, IKEV2_STATE_EAP_VALID);
sbin/iked/ikev2.c
1160
sa_state(env, sa, IKEV2_STATE_VALID);
sbin/iked/ikev2.c
1164
return (ikev2_init_done(env, sa));
sbin/iked/ikev2.c
1169
return (ikev2_init_ike_auth(env, sa));
sbin/iked/ikev2.c
1171
return (ikev2_resp_ike_auth(env, sa));
sbin/iked/ikev2.c
1175
ikev2_init_recv(struct iked *env, struct iked_message *msg,
sbin/iked/ikev2.c
1181
if (ikev2_msg_valid_ike_sa(env, hdr, msg) == -1) {
sbin/iked/ikev2.c
1190
if ((sa = sa_new(env,
sbin/iked/ikev2.c
1196
sa_free(env, sa);
sbin/iked/ikev2.c
1211
if (ikev2_pld_parse(env, hdr, msg, msg->msg_offset) != 0) {
sbin/iked/ikev2.c
1220
ikestat_inc(env, ikes_msg_rcvd_dropped);
sbin/iked/ikev2.c
1233
if (ikev2_handle_notifies(env, msg) != 0)
sbin/iked/ikev2.c
1237
ikev2_enable_natt(env, sa, msg, 1);
sbin/iked/ikev2.c
1243
if (ikev2_init_ike_sa_peer(env, pol,
sbin/iked/ikev2.c
1254
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
1258
if (ikev2_handle_certreq(env, msg) != 0)
sbin/iked/ikev2.c
1261
if (ikev2_init_auth(env, msg) != 0) {
sbin/iked/ikev2.c
1264
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
1278
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
1286
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
1291
(void)ikev2_ike_auth_recv(env, sa, msg);
sbin/iked/ikev2.c
1298
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
1302
(void)ikev2_init_create_child_sa(env, msg);
sbin/iked/ikev2.c
1315
ikev2_enable_natt(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
1321
sock = ikev2_msg_getsocket(env, sa->sa_local.addr_af, 1);
sbin/iked/ikev2.c
1348
ikev2_init_ike_sa(struct iked *env, void *arg)
sbin/iked/ikev2.c
1352
TAILQ_FOREACH(pol, &env->sc_policies, pol_entry) {
sbin/iked/ikev2.c
1363
if (ikev2_init_ike_sa_peer(env, pol, &pol->pol_peer, NULL))
sbin/iked/ikev2.c
1368
timer_set(env, &env->sc_inittmr, ikev2_init_ike_sa, NULL);
sbin/iked/ikev2.c
1369
timer_add(env, &env->sc_inittmr, IKED_INITIATOR_INTERVAL);
sbin/iked/ikev2.c
1373
ikev2_init_ike_sa_timeout(struct iked *env, void *arg)
sbin/iked/ikev2.c
1382
sa_free(env, sa);
sbin/iked/ikev2.c
1386
ikev2_init_ike_sa_peer(struct iked *env, struct iked_policy *pol,
sbin/iked/ikev2.c
1403
if ((sock = ikev2_msg_getsocket(env, peer->addr_af, 0)) == NULL)
sbin/iked/ikev2.c
1409
sa_state(env, sa, IKEV2_STATE_INIT);
sbin/iked/ikev2.c
1414
(sa = sa_new(env, 0, 0, 1, pol)) == NULL)
sbin/iked/ikev2.c
1426
if (ikev2_sa_initiator(env, sa, NULL, NULL) == -1)
sbin/iked/ikev2.c
1435
if ((buf = ikev2_msg_init(env, &req, &peer->addr, peer->addr.ss_len,
sbin/iked/ikev2.c
1447
req.msg_msgid = ikev2_msg_id(env, sa);
sbin/iked/ikev2.c
1479
if ((len = ikev2_add_proposals(env, sa, buf, &pol->pol_proposals,
sbin/iked/ikev2.c
1510
if (env->sc_vendorid != 0) {
sbin/iked/ikev2.c
1519
if (env->sc_frag) {
sbin/iked/ikev2.c
1525
if (env->sc_nattmode != NATT_DISABLE) {
sbin/iked/ikev2.c
1526
if (ntohs(port) == env->sc_nattport) {
sbin/iked/ikev2.c
1531
if ((len = ikev2_add_nat_detection(env, buf, &pld, &req, len))
sbin/iked/ikev2.c
1545
(void)ikev2_pld_parse(env, hdr, &req, 0);
sbin/iked/ikev2.c
1553
if ((ret = ikev2_msg_send(env, &req)) == 0)
sbin/iked/ikev2.c
1554
sa_state(env, sa, IKEV2_STATE_SA_INIT);
sbin/iked/ikev2.c
1557
timer_set(env, &sa->sa_timer, ikev2_init_ike_sa_timeout, sa);
sbin/iked/ikev2.c
1558
timer_add(env, &sa->sa_timer, IKED_IKE_SA_EXCHANGE_TIMEOUT);
sbin/iked/ikev2.c
1561
ikev2_msg_cleanup(env, &req);
sbin/iked/ikev2.c
1566
sa_free(env, sa);
sbin/iked/ikev2.c
1574
ikev2_init_auth(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2.c
1582
if (ikev2_sa_initiator(env, sa, NULL, msg) == -1) {
sbin/iked/ikev2.c
1587
if ((authmsg = ikev2_msg_auth(env, sa,
sbin/iked/ikev2.c
1593
if (ca_setauth(env, sa, authmsg, PROC_CERT) == -1) {
sbin/iked/ikev2.c
1600
return (ikev2_init_ike_auth(env, sa));
sbin/iked/ikev2.c
1604
ikev2_init_ike_auth(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
1689
len, env->sc_certreq, env->sc_certreqtype)) == -1)
sbin/iked/ikev2.c
1692
if (env->sc_certreqtype != pol->pol_certreqtype &&
sbin/iked/ikev2.c
1717
if ((len = ikev2_init_add_cp(env, sa, e)) == -1)
sbin/iked/ikev2.c
1722
(len = ikev2_add_ipcompnotify(env, e, &pld, len, sa, 1)) == -1)
sbin/iked/ikev2.c
1725
(len = ikev2_add_transport_mode(env, e, &pld, len, sa)) == -1)
sbin/iked/ikev2.c
1734
if ((len = ikev2_add_proposals(env, sa, e, &pol->pol_proposals, 0,
sbin/iked/ikev2.c
1744
ret = ikev2_msg_send_encrypt(env, sa, &e,
sbin/iked/ikev2.c
1755
ikev2_enable_timer(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
1758
timer_set(env, &sa->sa_timer, ikev2_ike_sa_alive, sa);
sbin/iked/ikev2.c
1759
if (env->sc_alive_timeout > 0)
sbin/iked/ikev2.c
1760
timer_add(env, &sa->sa_timer, env->sc_alive_timeout);
sbin/iked/ikev2.c
1761
timer_set(env, &sa->sa_keepalive, ikev2_ike_sa_keepalive, sa);
sbin/iked/ikev2.c
1763
timer_add(env, &sa->sa_keepalive,
sbin/iked/ikev2.c
1765
timer_set(env, &sa->sa_rekey, ikev2_ike_sa_rekey, sa);
sbin/iked/ikev2.c
1767
ikev2_ike_sa_rekey_schedule(env, sa);
sbin/iked/ikev2.c
1771
ikev2_reset_alive_timer(struct iked *env)
sbin/iked/ikev2.c
1775
RB_FOREACH(sa, iked_sas, &env->sc_sas) {
sbin/iked/ikev2.c
1778
timer_del(env, &sa->sa_timer);
sbin/iked/ikev2.c
1779
if (env->sc_alive_timeout > 0)
sbin/iked/ikev2.c
1780
timer_add(env, &sa->sa_timer, env->sc_alive_timeout);
sbin/iked/ikev2.c
1785
ikev2_disable_timer(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
1787
timer_del(env, &sa->sa_timer);
sbin/iked/ikev2.c
1788
timer_del(env, &sa->sa_keepalive);
sbin/iked/ikev2.c
1789
timer_del(env, &sa->sa_rekey);
sbin/iked/ikev2.c
1793
ikev2_init_done(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
1800
ret = ikev2_childsa_negotiate(env, sa, &sa->sa_kex, &sa->sa_proposals,
sbin/iked/ikev2.c
1803
ret = ikev2_childsa_enable(env, sa);
sbin/iked/ikev2.c
1805
sa_state(env, sa, IKEV2_STATE_ESTABLISHED);
sbin/iked/ikev2.c
1806
iked_radius_acct_start(env, sa);
sbin/iked/ikev2.c
1808
timer_del(env, &sa->sa_timer);
sbin/iked/ikev2.c
1809
ikev2_enable_timer(env, sa);
sbin/iked/ikev2.c
1811
ikev2_record_dstid(env, sa);
sbin/iked/ikev2.c
1812
sa_configure_iface(env, sa, 1);
sbin/iked/ikev2.c
1816
ikev2_childsa_delete(env, sa, 0, 0, NULL, 1);
sbin/iked/ikev2.c
2150
ikev2_add_ipcompnotify(struct iked *env, struct ibuf *e,
sbin/iked/ikev2.c
2172
if (pfkey_sa_init(env, &csa, &spi) == -1)
sbin/iked/ikev2.c
227
struct iked *env = iked_env;
sbin/iked/ikev2.c
229
ibuf_free(env->sc_certreq);
sbin/iked/ikev2.c
230
env->sc_certreq = NULL;
sbin/iked/ikev2.c
2302
ikev2_add_transport_mode(struct iked *env, struct ibuf *e,
sbin/iked/ikev2.c
231
config_doreset(env, RESET_ALL);
sbin/iked/ikev2.c
2329
ikev2_nat_detection(struct iked *env, struct iked_message *msg,
sbin/iked/ikev2.c
237
struct iked *env = iked_env;
sbin/iked/ikev2.c
2412
if (env->sc_nattmode == NATT_FORCE)
sbin/iked/ikev2.c
243
return (config_getreset(env, imsg));
sbin/iked/ikev2.c
2439
ikev2_add_nat_detection(struct iked *env, struct ibuf *buf,
sbin/iked/ikev2.c
2456
len = ikev2_nat_detection(env, msg, NULL, 0, 0, 0);
sbin/iked/ikev2.c
2459
if ((len = ikev2_nat_detection(env, msg, ptr, len,
sbin/iked/ikev2.c
246
return (config_getcoupled(env, imsg->hdr.type));
sbin/iked/ikev2.c
2472
len = ikev2_nat_detection(env, msg, NULL, 0, 0, 0);
sbin/iked/ikev2.c
2475
if ((len = ikev2_nat_detection(env, msg, ptr, len,
sbin/iked/ikev2.c
2483
ikev2_add_cp(struct iked *env, struct iked_sa *sa, int type, struct ibuf *buf)
sbin/iked/ikev2.c
249
if (config_getmode(env, imsg->hdr.type) == -1)
sbin/iked/ikev2.c
251
config_enablesocket(env);
sbin/iked/ikev2.c
252
timer_del(env, &env->sc_inittmr);
sbin/iked/ikev2.c
253
TAILQ_FOREACH(pol, &env->sc_policies, pol_entry) {
sbin/iked/ikev2.c
258
RB_FOREACH_SAFE(sa, iked_sas, &env->sc_sas, satmp) {
sbin/iked/ikev2.c
260
sa_state(env, sa, IKEV2_STATE_CLOSING);
sbin/iked/ikev2.c
262
sa_free(env, sa);
sbin/iked/ikev2.c
2647
ikev2_init_add_cp(struct iked *env, struct iked_sa *sa, struct ibuf *buf)
sbin/iked/ikev2.c
2649
return (ikev2_add_cp(env, sa, IKEV2_CP_REQUEST, buf));
sbin/iked/ikev2.c
2653
ikev2_resp_add_cp(struct iked *env, struct iked_sa *sa, struct ibuf *buf)
sbin/iked/ikev2.c
2659
ret = ikev2_add_cp(env, sa, IKEV2_CP_REPLY, buf);
sbin/iked/ikev2.c
267
if (policy_lookup_sa(env, sa) == -1) {
sbin/iked/ikev2.c
2672
ikev2_add_proposals(struct iked *env, struct iked_sa *sa, struct ibuf *buf,
sbin/iked/ikev2.c
2701
if (pfkey_sa_init(env, &csa, &spi) == -1)
sbin/iked/ikev2.c
271
ikev2_ikesa_delete(env, sa, sa->sa_hdr.sh_initiator);
sbin/iked/ikev2.c
276
policy_unref(env, old);
sbin/iked/ikev2.c
277
policy_ref(env, sa->sa_policy);
sbin/iked/ikev2.c
281
if (!env->sc_passive) {
sbin/iked/ikev2.c
282
timer_set(env, &env->sc_inittmr, ikev2_init_ike_sa,
sbin/iked/ikev2.c
284
timer_add(env, &env->sc_inittmr,
sbin/iked/ikev2.c
2867
ikev2_resp_informational(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
287
iked_radius_acct_on(env);
sbin/iked/ikev2.c
2884
if ((len = ikev2_handle_delete(env, msg, buf, &pld,
sbin/iked/ikev2.c
2895
len = ikev2_add_nat_detection(env, buf, &pld, msg, len);
sbin/iked/ikev2.c
290
return (config_getsocket(env, imsg, ikev2_msg_cb));
sbin/iked/ikev2.c
292
return (config_getpfkey(env, imsg));
sbin/iked/ikev2.c
2925
ret = ikev2_msg_send_encrypt(env, sa, &buf,
sbin/iked/ikev2.c
2936
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
294
return (config_getpolicy(env, imsg));
sbin/iked/ikev2.c
2944
ikev2_resp_recv(struct iked *env, struct iked_message *msg,
sbin/iked/ikev2.c
2955
if ((msg->msg_sa = sa_new(env,
sbin/iked/ikev2.c
296
return (config_getflow(env, imsg));
sbin/iked/ikev2.c
2962
timer_set(env, &msg->msg_sa->sa_timer,
sbin/iked/ikev2.c
2964
timer_add(env, &msg->msg_sa->sa_timer,
sbin/iked/ikev2.c
2968
if (ikev2_msg_valid_ike_sa(env, hdr, msg) == -1)
sbin/iked/ikev2.c
2977
if (ikev2_msg_valid_ike_sa(env, hdr, msg) == -1)
sbin/iked/ikev2.c
298
return (config_getuser(env, imsg));
sbin/iked/ikev2.c
2986
if (ikev2_pld_parse(env, hdr, msg, msg->msg_offset) != 0) {
sbin/iked/ikev2.c
2995
if (ikev2_handle_notifies(env, msg) != 0)
sbin/iked/ikev2.c
300
return (config_getradauth(env, imsg));
sbin/iked/ikev2.c
3005
ikestat_inc(env, ikes_msg_rcvd_dropped);
sbin/iked/ikev2.c
302
return (config_getradacct(env, imsg));
sbin/iked/ikev2.c
3024
if (ikev2_sa_responder(env, sa, NULL, msg) != 0) {
sbin/iked/ikev2.c
3029
ikev2_send_init_error(env, msg);
sbin/iked/ikev2.c
3031
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
3034
if (ikev2_resp_ike_sa_init(env, msg) != 0) {
sbin/iked/ikev2.c
3037
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
304
return (config_getradserver(env, imsg));
sbin/iked/ikev2.c
3045
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
3051
if (ikev2_resp_ike_eap(env, sa, msg)) {
sbin/iked/ikev2.c
3055
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
306
return (config_getradcfgmap(env, imsg));
sbin/iked/ikev2.c
3061
if (ikev2_ike_auth_recv(env, sa, msg) != 0) {
sbin/iked/ikev2.c
3063
ikev2_send_error(env, sa, msg, hdr->ike_exchange);
sbin/iked/ikev2.c
3065
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
3070
if (ikev2_resp_create_child_sa(env, msg) != 0) {
sbin/iked/ikev2.c
3073
ikev2_send_error(env, sa, msg, hdr->ike_exchange);
sbin/iked/ikev2.c
3078
ikev2_update_sa_addresses(env, sa);
sbin/iked/ikev2.c
3079
(void)ikev2_resp_informational(env, sa, msg);
sbin/iked/ikev2.c
308
return (config_getraddae(env, imsg));
sbin/iked/ikev2.c
3087
ikev2_handle_delete(struct iked *env, struct iked_message *msg,
sbin/iked/ikev2.c
310
return (config_getradclient(env, imsg));
sbin/iked/ikev2.c
312
return (config_getcompile(env));
sbin/iked/ikev2.c
3122
ikev2_ikesa_recv_delete(env, sa);
sbin/iked/ikev2.c
314
return (config_getstatic(env, imsg));
sbin/iked/ikev2.c
3171
if (ikev2_childsa_delete(env, sa, msg->msg_del_protoid, spi,
sbin/iked/ikev2.c
3244
ikev2_handle_notifies(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2.c
325
struct iked *env = iked_env;
sbin/iked/ikev2.c
3259
if ((msg->msg_flags & IKED_MSG_FLAGS_FRAGMENTATION) && env->sc_frag) {
sbin/iked/ikev2.c
3264
if ((msg->msg_flags & IKED_MSG_FLAGS_MOBIKE) && env->sc_mobike) {
sbin/iked/ikev2.c
3269
ikev2_enable_natt(env, sa, msg, 0);
sbin/iked/ikev2.c
3275
ikev2_disable_rekeying(env, sa);
sbin/iked/ikev2.c
3286
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
3299
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
3309
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
3315
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
3318
timer_set(env, &env->sc_inittmr, ikev2_init_ike_sa, NULL);
sbin/iked/ikev2.c
3319
timer_add(env, &env->sc_inittmr, IKED_INITIATOR_INITIAL);
sbin/iked/ikev2.c
3336
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
3345
(void)ikev2_send_create_child_sa(env, sa,
sbin/iked/ikev2.c
3353
timer_set(env, &sa->sa_rekey,
sbin/iked/ikev2.c
3355
timer_add(env, &sa->sa_rekey, 0);
sbin/iked/ikev2.c
3393
ikev2_resp_ike_sa_init(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2.c
3416
if ((buf = ikev2_msg_init(env, &resp,
sbin/iked/ikev2.c
343
ibuf_free(env->sc_certreq);
sbin/iked/ikev2.c
3436
if ((len = ikev2_add_proposals(env, sa, buf, &sa->sa_proposals,
sbin/iked/ikev2.c
344
env->sc_certreqtype = type;
sbin/iked/ikev2.c
345
env->sc_certreq = ibuf_new(ptr,
sbin/iked/ikev2.c
3467
if (env->sc_vendorid != 0) {
sbin/iked/ikev2.c
3482
if ((env->sc_nattmode != NATT_DISABLE) &&
sbin/iked/ikev2.c
3484
if ((len = ikev2_add_nat_detection(env, buf, &pld, &resp, len))
sbin/iked/ikev2.c
3491
len, env->sc_certreq, env->sc_certreqtype)) == -1)
sbin/iked/ikev2.c
3494
if (env->sc_certreqtype != sa->sa_policy->pol_certreqtype &&
sbin/iked/ikev2.c
350
ibuf_length(env->sc_certreq));
sbin/iked/ikev2.c
3510
(void)ikev2_pld_parse(env, hdr, &resp, 0);
sbin/iked/ikev2.c
3518
ret = ikev2_msg_send(env, &resp);
sbin/iked/ikev2.c
3522
ikev2_msg_cleanup(env, &resp);
sbin/iked/ikev2.c
3528
ikev2_send_auth_failed(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
3559
ret = ikev2_send_ike_e(env, sa, buf, IKEV2_PAYLOAD_NOTIFY,
sbin/iked/ikev2.c
356
if ((sa = ikev2_getimsgdata(env, imsg,
sbin/iked/ikev2.c
3567
sa_state(env, sa, IKEV2_STATE_CLOSING);
sbin/iked/ikev2.c
3568
timer_del(env, &sa->sa_timer);
sbin/iked/ikev2.c
3569
timer_set(env, &sa->sa_timer, ikev2_ike_sa_timeout, sa);
sbin/iked/ikev2.c
3570
timer_add(env, &sa->sa_timer, IKED_IKE_SA_DELETE_TIMEOUT);
sbin/iked/ikev2.c
3578
ikev2_add_error(struct iked *env, struct ibuf *buf, struct iked_message *msg)
sbin/iked/ikev2.c
3649
ikev2_record_dstid(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
3653
osa = sa_dstid_lookup(env, sa);
sbin/iked/ikev2.c
3657
sa_dstid_remove(env, osa);
sbin/iked/ikev2.c
3658
if (env->sc_enforcesingleikesa &&
sbin/iked/ikev2.c
3664
ikev2_disable_timer(env, osa);
sbin/iked/ikev2.c
3666
ikev2_ikesa_delete(env, osa, 0);
sbin/iked/ikev2.c
3667
timer_add(env, &osa->sa_timer,
sbin/iked/ikev2.c
3671
osa = sa_dstid_insert(env, sa);
sbin/iked/ikev2.c
3683
ikev2_send_error(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
3693
if (ikev2_add_error(env, buf, msg) == 0)
sbin/iked/ikev2.c
3695
ret = ikev2_send_ike_e(env, sa, buf, IKEV2_PAYLOAD_NOTIFY,
sbin/iked/ikev2.c
3707
ikev2_send_init_error(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2.c
3724
if ((buf = ikev2_msg_init(env, &resp,
sbin/iked/ikev2.c
3744
if ((len = ikev2_add_error(env, buf, msg)) == 0)
sbin/iked/ikev2.c
3751
(void)ikev2_pld_parse(env, hdr, &resp, 0);
sbin/iked/ikev2.c
3752
ret = ikev2_msg_send(env, &resp);
sbin/iked/ikev2.c
3755
ikev2_msg_cleanup(env, &resp);
sbin/iked/ikev2.c
3761
ikev2_handle_certreq(struct iked* env, struct iked_message *msg)
sbin/iked/ikev2.c
378
if (sa->sa_peerauth.id_type && ikev2_auth_verify(env, sa))
sbin/iked/ikev2.c
3790
crtype = env->sc_certreqtype;
sbin/iked/ikev2.c
3791
ca_setreq(env, sa, &sa->sa_policy->pol_localid,
sbin/iked/ikev2.c
3792
crtype, 0, ibuf_data(env->sc_certreq),
sbin/iked/ikev2.c
3793
ibuf_size(env->sc_certreq), PROC_CERT);
sbin/iked/ikev2.c
3801
ca_setreq(env, sa, &sa->sa_policy->pol_localid,
sbin/iked/ikev2.c
3816
ikev2_resp_ike_eap_mschap(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
3832
return (eap_challenge_request(env, sa, eap->eam_id));
sbin/iked/ikev2.c
384
if (ikev2_ike_auth(env, sa) != 0)
sbin/iked/ikev2.c
3844
if ((usr = user_lookup(env, name)) == NULL) {
sbin/iked/ikev2.c
3884
ret = eap_mschap_challenge(env, sa, eap->eam_id, eap->eam_msrid,
sbin/iked/ikev2.c
3887
sa_state(env, sa, IKEV2_STATE_AUTH_SUCCESS);
sbin/iked/ikev2.c
389
ikev2_send_auth_failed(env, sa);
sbin/iked/ikev2.c
3890
return (eap_mschap_success(env, sa, eap->eam_id));
sbin/iked/ikev2.c
3894
return (eap_success(env, sa, msg->msg_eap.eam_id));
sbin/iked/ikev2.c
3903
ikev2_resp_ike_eap(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
3911
return ikev2_resp_ike_eap_mschap(env, sa, msg);
sbin/iked/ikev2.c
3913
return iked_radius_request(env, sa, msg);
sbin/iked/ikev2.c
3919
ikev2_resp_ike_auth(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
393
if ((sa = ikev2_getimsgdata(env, imsg,
sbin/iked/ikev2.c
3935
return (eap_identity_request(env, sa));
sbin/iked/ikev2.c
3940
if (ikev2_cp_setaddr(env, sa, AF_INET) < 0 ||
sbin/iked/ikev2.c
3941
ikev2_cp_setaddr(env, sa, AF_INET6) < 0)
sbin/iked/ikev2.c
3944
if (ikev2_childsa_negotiate(env, sa, &sa->sa_kex, &sa->sa_proposals,
sbin/iked/ikev2.c
3954
sa_state(env, sa, IKEV2_STATE_AUTH_SUCCESS);
sbin/iked/ikev2.c
4031
if ((len = ikev2_resp_add_cp(env, sa, e)) == -1)
sbin/iked/ikev2.c
4036
(len = ikev2_add_ipcompnotify(env, e, &pld, len, sa, 0)) == -1)
sbin/iked/ikev2.c
4039
(len = ikev2_add_transport_mode(env, e, &pld, len, sa)) == -1)
sbin/iked/ikev2.c
4053
if ((len = ikev2_add_proposals(env, sa, e, &sa->sa_proposals, 0,
sbin/iked/ikev2.c
4063
ret = ikev2_msg_send_encrypt(env, sa, &e,
sbin/iked/ikev2.c
4066
ret = ikev2_childsa_enable(env, sa);
sbin/iked/ikev2.c
4068
sa_state(env, sa, IKEV2_STATE_ESTABLISHED);
sbin/iked/ikev2.c
4069
iked_radius_acct_start(env, sa);
sbin/iked/ikev2.c
4071
timer_del(env, &sa->sa_timer);
sbin/iked/ikev2.c
4072
ikev2_enable_timer(env, sa);
sbin/iked/ikev2.c
4074
ikev2_record_dstid(env, sa);
sbin/iked/ikev2.c
4079
ikev2_childsa_delete(env, sa, 0, 0, NULL, 1);
sbin/iked/ikev2.c
4085
ikev2_send_ike_e(struct iked *env, struct iked_sa *sa, struct ibuf *buf,
sbin/iked/ikev2.c
4108
ret = ikev2_msg_send_encrypt(env, sa, &e, exchange, firstpayload,
sbin/iked/ikev2.c
4145
ikev2_send_create_child_sa(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
4202
(len = ikev2_add_ipcompnotify(env, e, &pld, 0, sa, 1)) == -1)
sbin/iked/ikev2.c
4205
(len = ikev2_add_transport_mode(env, e, &pld, len, sa)) == -1)
sbin/iked/ikev2.c
4229
if ((len = ikev2_add_proposals(env, sa, e, &sa->sa_proposals,
sbin/iked/ikev2.c
4302
ret = ikev2_msg_send_encrypt(env, sa, &e,
sbin/iked/ikev2.c
432
if (ikev2_ike_auth(env, sa) != 0)
sbin/iked/ikev2.c
4323
ikev2_ike_sa_rekey(struct iked *env, void *arg)
sbin/iked/ikev2.c
4349
ikev2_ike_sa_rekey_schedule_fast(env, sa);
sbin/iked/ikev2.c
4354
timer_set(env, &sa->sa_rekey, ikev2_ike_sa_rekey_timeout, sa);
sbin/iked/ikev2.c
4355
timer_add(env, &sa->sa_rekey, IKED_IKE_SA_REKEY_TIMEOUT);
sbin/iked/ikev2.c
4357
if ((nsa = sa_new(env, 0, 0, 1, sa->sa_policy)) == NULL) {
sbin/iked/ikev2.c
436
if ((sa = ikev2_getimsgdata(env, imsg,
sbin/iked/ikev2.c
4362
if (ikev2_sa_initiator(env, nsa, sa, NULL)) {
sbin/iked/ikev2.c
4366
sa_state(env, nsa, IKEV2_STATE_AUTH_SUCCESS);
sbin/iked/ikev2.c
4377
if ((len = ikev2_add_proposals(env, nsa, e, &sa->sa_proposals,
sbin/iked/ikev2.c
4411
ret = ikev2_msg_send_encrypt(env, sa, &e,
sbin/iked/ikev2.c
4423
sa_free(env, nsa);
sbin/iked/ikev2.c
4450
ikev2_init_create_child_sa(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2.c
4473
sa_free(env, sa->sa_nexti);
sbin/iked/ikev2.c
4475
timer_set(env, &sa->sa_rekey, ikev2_ike_sa_rekey, sa);
sbin/iked/ikev2.c
4476
ikev2_ike_sa_rekey_schedule_fast(env, sa);
sbin/iked/ikev2.c
4490
ikestat_inc(env, ikes_sa_proposals_negotiate_failures);
sbin/iked/ikev2.c
4514
if ((nsa = sa_new(env, sa->sa_nexti->sa_hdr.sh_ispi,
sbin/iked/ikev2.c
4520
sa_free(env, nsa);
sbin/iked/ikev2.c
4523
sa_free(env, sa->sa_nexti);
sbin/iked/ikev2.c
4527
if (ikev2_sa_initiator(env, nsa, sa, msg) == -1) {
sbin/iked/ikev2.c
4573
ikev2_ikesa_delete(env, dsa, dsa->sa_hdr.sh_initiator);
sbin/iked/ikev2.c
4578
return (ikev2_ikesa_enable(env, sa, nsa));
sbin/iked/ikev2.c
4632
ret = ikev2_childsa_delete_proposed(env, sa,
sbin/iked/ikev2.c
4638
if (ikev2_childsa_negotiate(env, sa, &sa->sa_kex, &sa->sa_proposals, 1,
sbin/iked/ikev2.c
4661
if (ikev2_send_ike_e(env, sa, buf, IKEV2_PAYLOAD_DELETE,
sbin/iked/ikev2.c
4668
ret = ikev2_childsa_enable(env, sa);
sbin/iked/ikev2.c
4674
ikev2_childsa_delete(env, sa, 0, 0, NULL, 1);
sbin/iked/ikev2.c
4677
ikev2_childsa_delete(env, sa, csa->csa_saproto,
sbin/iked/ikev2.c
4685
ikev2_ikesa_enable(struct iked *env, struct iked_sa *sa, struct iked_sa *nsa)
sbin/iked/ikev2.c
4780
RB_REMOVE(iked_addrpool, &env->sc_addrpool, sa);
sbin/iked/ikev2.c
4783
RB_INSERT(iked_addrpool, &env->sc_addrpool, nsa);
sbin/iked/ikev2.c
4786
RB_REMOVE(iked_addrpool6, &env->sc_addrpool6, sa);
sbin/iked/ikev2.c
4789
RB_INSERT(iked_addrpool6, &env->sc_addrpool6, nsa);
sbin/iked/ikev2.c
4800
sa_dstid_remove(env, sa);
sbin/iked/ikev2.c
4801
sa_dstid_insert(env, nsa);
sbin/iked/ikev2.c
481
if ((sa = ikev2_getimsgdata(env, imsg,
sbin/iked/ikev2.c
4822
sa_state(env, nsa, IKEV2_STATE_ESTABLISHED);
sbin/iked/ikev2.c
4824
iked_radius_acct_start(env, nsa);
sbin/iked/ikev2.c
4825
ikev2_enable_timer(env, nsa);
sbin/iked/ikev2.c
4827
ikestat_inc(env, ikes_sa_rekeyed);
sbin/iked/ikev2.c
4833
ikev2_disable_timer(env, sa);
sbin/iked/ikev2.c
4836
ikev2_ikesa_delete(env, sa, nsa->sa_hdr.sh_initiator);
sbin/iked/ikev2.c
4841
ikev2_ikesa_delete(struct iked *env, struct iked_sa *sa, int initiator)
sbin/iked/ikev2.c
4858
if (ikev2_send_ike_e(env, sa, buf, IKEV2_PAYLOAD_DELETE,
sbin/iked/ikev2.c
4865
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
4867
sa_state(env, sa, IKEV2_STATE_CLOSING);
sbin/iked/ikev2.c
4871
timer_set(env, &sa->sa_timer, ikev2_ike_sa_timeout, sa);
sbin/iked/ikev2.c
4872
timer_add(env, &sa->sa_timer, IKED_IKE_SA_DELETE_TIMEOUT);
sbin/iked/ikev2.c
4877
ikev2_ikesa_recv_delete(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
4890
ikev2_ikesa_enable(env, sa, sa->sa_nextr);
sbin/iked/ikev2.c
4897
sa_free(env, sa->sa_nexti);
sbin/iked/ikev2.c
4901
if (env->sc_stickyaddress) {
sbin/iked/ikev2.c
4903
sa_state(env, sa, IKEV2_STATE_CLOSING);
sbin/iked/ikev2.c
4904
timer_del(env, &sa->sa_timer);
sbin/iked/ikev2.c
4905
timer_set(env, &sa->sa_timer, ikev2_ike_sa_timeout, sa);
sbin/iked/ikev2.c
4906
timer_add(env, &sa->sa_timer, 3 * IKED_RETRANSMIT_TIMEOUT);
sbin/iked/ikev2.c
4908
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
4913
ikev2_resp_create_child_sa(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2.c
4982
sa_lookup(env, spi->spi, 0, 0) != NULL) {
sbin/iked/ikev2.c
4988
if ((nsa = sa_new(env, spi->spi, 0, 0,
sbin/iked/ikev2.c
4994
if (ikev2_sa_responder(env, nsa, sa, msg)) {
sbin/iked/ikev2.c
4999
sa_state(env, nsa, IKEV2_STATE_AUTH_SUCCESS);
sbin/iked/ikev2.c
5016
ikestat_inc(env, ikes_sa_proposals_negotiate_failures);
sbin/iked/ikev2.c
5084
if (ikev2_childsa_negotiate(env, sa, kex, &proposals, 0, pfs)) {
sbin/iked/ikev2.c
5112
(len = ikev2_add_ipcompnotify(env, e, &pld, 0, sa, 0)) == -1)
sbin/iked/ikev2.c
5115
(len = ikev2_add_transport_mode(env, e, &pld, len, sa)) == -1)
sbin/iked/ikev2.c
512
if (ikev2_ike_auth(env, sa) != 0)
sbin/iked/ikev2.c
5129
if ((len = ikev2_add_proposals(env, nsa ? nsa : sa, e,
sbin/iked/ikev2.c
5171
if ((ret = ikev2_msg_send_encrypt(env, sa, &e,
sbin/iked/ikev2.c
5190
ret = ikev2_ikesa_enable(env, sa, nsa);
sbin/iked/ikev2.c
5192
ret = ikev2_childsa_enable(env, sa);
sbin/iked/ikev2.c
5197
sa_free(env, nsa);
sbin/iked/ikev2.c
5205
ikev2_childsa_delete(env, sa, 0, 0, NULL, 1);
sbin/iked/ikev2.c
5226
ikev2_ike_sa_timeout(struct iked *env, void *arg)
sbin/iked/ikev2.c
5232
sa_free(env, sa);
sbin/iked/ikev2.c
5236
ikev2_ike_sa_rekey_timeout(struct iked *env, void *arg)
sbin/iked/ikev2.c
5242
sa_free(env, sa);
sbin/iked/ikev2.c
5246
ikev2_ike_sa_rekey_schedule(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
5248
timer_add(env, &sa->sa_rekey, (sa->sa_policy->pol_rekey * 850 +
sbin/iked/ikev2.c
525
struct iked *env = iked_env;
sbin/iked/ikev2.c
5254
ikev2_ike_sa_rekey_schedule_fast(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
5262
timer_add(env, &sa->sa_rekey, timeout);
sbin/iked/ikev2.c
5266
ikev2_ike_sa_alive(struct iked *env, void *arg)
sbin/iked/ikev2.c
5274
if (env->sc_alive_timeout == 0)
sbin/iked/ikev2.c
5281
if (pfkey_sa_last_used(env, csa, &last_used) != 0)
sbin/iked/ikev2.c
5288
if (diff < env->sc_alive_timeout) {
sbin/iked/ikev2.c
529
ikev2_ctl_reset_id(env, imsg, imsg->hdr.type);
sbin/iked/ikev2.c
5315
ikev2_send_ike_e(env, sa, NULL, IKEV2_PAYLOAD_NONE,
sbin/iked/ikev2.c
5318
ikestat_inc(env, ikes_dpd_sent);
sbin/iked/ikev2.c
532
ikev2_ctl_show_sa(env, imsg);
sbin/iked/ikev2.c
5322
timer_add(env, &sa->sa_timer, env->sc_alive_timeout);
sbin/iked/ikev2.c
5326
ikev2_ike_sa_keepalive(struct iked *env, void *arg)
sbin/iked/ikev2.c
5342
ikestat_inc(env, ikes_keepalive_sent);
sbin/iked/ikev2.c
5343
timer_add(env, &sa->sa_keepalive, IKED_IKE_SA_KEEPALIVE_TIMEOUT);
sbin/iked/ikev2.c
5347
ikev2_send_informational(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2.c
535
ikev2_ctl_show_stats(env, imsg);
sbin/iked/ikev2.c
5360
if ((buf = ikev2_msg_init(env, &resp,
sbin/iked/ikev2.c
5397
resp.msg_msgid = ikev2_msg_id(env, sa);
sbin/iked/ikev2.c
5409
if ((e = ikev2_msg_encrypt(env, sa, e, buf)) == NULL) {
sbin/iked/ikev2.c
5423
if (ikev2_msg_integr(env, sa, buf) != 0) {
sbin/iked/ikev2.c
5437
resp.msg_msgid = ikev2_msg_id(env, &sah);
sbin/iked/ikev2.c
5454
ret = ikev2_msg_send(env, &resp);
sbin/iked/ikev2.c
5458
ikev2_msg_cleanup(env, &resp);
sbin/iked/ikev2.c
546
ikev2_ike_sa_delete(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
552
ikev2_disable_timer(env, sa);
sbin/iked/ikev2.c
5535
ikev2_sa_negotiate_common(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
554
ikev2_ikesa_delete(env, sa, 1);
sbin/iked/ikev2.c
5544
ikestat_inc(env, ikes_sa_proposals_negotiate_failures);
sbin/iked/ikev2.c
555
timer_add(env, &sa->sa_timer, 0);
sbin/iked/ikev2.c
560
ikev2_ctl_reset_id(struct iked *env, struct imsg *imsg, unsigned int type)
sbin/iked/ikev2.c
5608
ikev2_sa_initiator(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
5636
if (ikev2_sa_negotiate_common(env, sa, msg, -1) != 0)
sbin/iked/ikev2.c
5646
return (ikev2_sa_keys(env, sa, osa ? osa->sa_key_d : NULL));
sbin/iked/ikev2.c
570
RB_FOREACH(sa, iked_sas, &env->sc_sas) {
sbin/iked/ikev2.c
5701
ikev2_sa_responder(struct iked *env, struct iked_sa *sa, struct iked_sa *osa,
sbin/iked/ikev2.c
5710
if (policy_lookup(env, msg, &msg->msg_proposals,
sbin/iked/ikev2.c
5722
policy_unref(env, old);
sbin/iked/ikev2.c
5723
policy_ref(env, sa->sa_policy);
sbin/iked/ikev2.c
5726
sa_state(env, sa, IKEV2_STATE_SA_INIT);
sbin/iked/ikev2.c
5748
if (ikev2_sa_negotiate_common(env, sa, msg, msg->msg_dhgroup) != 0)
sbin/iked/ikev2.c
5754
return (ikev2_sa_keys(env, sa, osa ? osa->sa_key_d : NULL));
sbin/iked/ikev2.c
5758
ikev2_sa_keys(struct iked *env, struct iked_sa *sa, struct ibuf *key)
sbin/iked/ikev2.c
578
ikev2_disable_timer(env, sa);
sbin/iked/ikev2.c
584
ikev2_ikesa_delete(env, sa, 1);
sbin/iked/ikev2.c
586
timer_add(env, &sa->sa_timer, 3 * IKED_RETRANSMIT_TIMEOUT);
sbin/iked/ikev2.c
592
ikev2_ctl_show_sa(struct iked *env, struct imsg *imsg)
sbin/iked/ikev2.c
594
ikev2_info(env, imsg, 0);
sbin/iked/ikev2.c
598
ikev2_ctl_show_stats(struct iked *env, struct imsg *imsg)
sbin/iked/ikev2.c
600
proc_compose_imsg(&env->sc_ps, PROC_CONTROL, -1,
sbin/iked/ikev2.c
602
&env->sc_stats, sizeof(env->sc_stats));
sbin/iked/ikev2.c
606
ikev2_getimsgdata(struct iked *env, struct imsg *imsg, struct iked_sahdr *sh,
sbin/iked/ikev2.c
6150
ikev2_childsa_delete_proposed(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
6189
if (ikev2_send_ike_e(env, sa, buf, IKEV2_PAYLOAD_DELETE,
sbin/iked/ikev2.c
6201
ikev2_childsa_negotiate(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
626
sa = sa_lookup(env, sh->sh_ispi, sh->sh_rspi, sh->sh_initiator);
sbin/iked/ikev2.c
6391
if ((ret = pfkey_sa_init(env, csa,
sbin/iked/ikev2.c
6471
if ((ret = pfkey_sa_init(env, csa2,
sbin/iked/ikev2.c
6505
ikestat_add(env, ikes_csa_created, 2);
sbin/iked/ikev2.c
6528
ikev2_childsa_enable(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
654
ikev2_recv(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2.c
6565
if (pfkey_sa_add(env, csa, NULL) != 0) {
sbin/iked/ikev2.c
6572
if (pfkey_sa_add(env, ipcomp, csa) != 0) {
sbin/iked/ikev2.c
6580
if ((ocsa = RB_FIND(iked_activesas, &env->sc_activesas, csa))
sbin/iked/ikev2.c
6587
RB_REMOVE(iked_activesas, &env->sc_activesas, ocsa);
sbin/iked/ikev2.c
6590
RB_INSERT(iked_activesas, &env->sc_activesas, csa);
sbin/iked/ikev2.c
6634
RB_REMOVE(iked_flows, &env->sc_activeflows, flow);
sbin/iked/ikev2.c
6635
(void)pfkey_flow_delete(env, flow);
sbin/iked/ikev2.c
6640
if (pfkey_flow_add(env, flow) != 0) {
sbin/iked/ikev2.c
6645
if ((oflow = RB_FIND(iked_flows, &env->sc_activeflows, flow))
sbin/iked/ikev2.c
6650
RB_REMOVE(iked_flows, &env->sc_activeflows, oflow);
sbin/iked/ikev2.c
6653
RB_INSERT(iked_flows, &env->sc_activeflows, flow);
sbin/iked/ikev2.c
668
ikestat_inc(env, ikes_msg_rcvd);
sbin/iked/ikev2.c
6720
ikev2_childsa_delete(struct iked *env, struct iked_sa *sa, uint8_t saproto,
sbin/iked/ikev2.c
673
msg->msg_sa = sa_lookup(env,
sbin/iked/ikev2.c
6735
RB_REMOVE(iked_activesas, &env->sc_activesas, csa);
sbin/iked/ikev2.c
6737
if (pfkey_sa_delete(env, csa) != 0)
sbin/iked/ikev2.c
6753
if (pfkey_sa_delete(env, ipcomp) != 0)
sbin/iked/ikev2.c
6767
ikestat_inc(env, ikes_csa_removed);
sbin/iked/ikev2.c
677
if (policy_lookup(env, msg, NULL, NULL, 0) != 0) {
sbin/iked/ikev2.c
679
ikestat_inc(env, ikes_msg_rcvd_dropped);
sbin/iked/ikev2.c
6827
ikev2_child_sa_acquire(struct iked *env, struct iked_flow *acquire)
sbin/iked/ikev2.c
6833
if (env->sc_passive)
sbin/iked/ikev2.c
6837
flow = RB_FIND(iked_flows, &env->sc_activeflows, acquire);
sbin/iked/ikev2.c
6849
if ((p = policy_test(env, &pol)) == NULL) {
sbin/iked/ikev2.c
6857
if (ikev2_init_ike_sa_peer(env, p,
sbin/iked/ikev2.c
6871
if (ikev2_send_create_child_sa(env, sa, NULL,
sbin/iked/ikev2.c
6880
ikev2_disable_rekeying(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
6889
(void)ikev2_childsa_delete(env, sa, 0, 0, NULL, 1);
sbin/iked/ikev2.c
6894
ikev2_child_sa_rekey(struct iked *env, struct iked_spi *rekey)
sbin/iked/ikev2.c
6900
csa = RB_FIND(iked_activesas, &env->sc_activesas, &key);
sbin/iked/ikev2.c
6928
if (ikev2_send_create_child_sa(env, sa, rekey, rekey->spi_protoid, 0))
sbin/iked/ikev2.c
6936
ikev2_child_sa_drop(struct iked *env, struct iked_spi *drop)
sbin/iked/ikev2.c
6945
csa = RB_FIND(iked_activesas, &env->sc_activesas, &key);
sbin/iked/ikev2.c
6956
RB_REMOVE(iked_activesas, &env->sc_activesas, csa);
sbin/iked/ikev2.c
6969
if (ikev2_childsa_delete(env, sa, csa->csa_saproto,
sbin/iked/ikev2.c
6986
if (ikev2_send_ike_e(env, sa, buf, IKEV2_PAYLOAD_DELETE,
sbin/iked/ikev2.c
711
ikestat_inc(env, ikes_msg_rcvd_dropped);
sbin/iked/ikev2.c
7112
ikev2_cp_setaddr(struct iked *env, struct iked_sa *sa, sa_family_t family)
sbin/iked/ikev2.c
7164
if ((ret = ikev2_cp_setaddr_pool(env, sa,
sbin/iked/ikev2.c
717
ikestat_inc(env, ikes_msg_rcvd_dropped);
sbin/iked/ikev2.c
7188
ikev2_cp_setaddr_pool(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
720
mr = ikev2_msg_lookup(env, &sa->sa_requests, msg,
sbin/iked/ikev2.c
7214
if (env->sc_stickyaddress &&
sbin/iked/ikev2.c
7215
(osa = sa_dstid_lookup(env, sa)) != NULL &&
sbin/iked/ikev2.c
7220
if (RB_REMOVE(iked_addrpool, &env->sc_addrpool, osa)
sbin/iked/ikev2.c
7228
if (RB_REMOVE(iked_addrpool6, &env->sc_addrpool6, osa)
sbin/iked/ikev2.c
7235
sa_dstid_remove(env, osa);
sbin/iked/ikev2.c
724
ikestat_inc(env, ikes_msg_rcvd_dropped);
sbin/iked/ikev2.c
7242
ikev2_disable_timer(env, osa);
sbin/iked/ikev2.c
7245
ikev2_ikesa_delete(env, osa, 1);
sbin/iked/ikev2.c
7246
timer_add(env, &osa->sa_timer,
sbin/iked/ikev2.c
7250
RB_INSERT(iked_addrpool, &env->sc_addrpool, sa);
sbin/iked/ikev2.c
7258
RB_INSERT(iked_addrpool6, &env->sc_addrpool6, sa);
sbin/iked/ikev2.c
729
ikestat_inc(env, ikes_msg_rcvd_dropped);
sbin/iked/ikev2.c
7290
if (RB_FIND(iked_addrpool, &env->sc_addrpool,
sbin/iked/ikev2.c
7306
RB_INSERT(iked_addrpool, &env->sc_addrpool, sa);
sbin/iked/ikev2.c
7365
!RB_FIND(iked_addrpool, &env->sc_addrpool, &key)) ||
sbin/iked/ikev2.c
7367
!RB_FIND(iked_addrpool6, &env->sc_addrpool6, &key)))
sbin/iked/ikev2.c
7388
RB_INSERT(iked_addrpool, &env->sc_addrpool, sa);
sbin/iked/ikev2.c
7396
RB_INSERT(iked_addrpool6, &env->sc_addrpool6, sa);
sbin/iked/ikev2.c
742
ikev2_msg_dispose(env, &sa->sa_requests, mr);
sbin/iked/ikev2.c
7501
ikev2_update_sa_addresses(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
7518
if (pfkey_sa_update_addresses(env, csa) != 0)
sbin/iked/ikev2.c
7522
if (pfkey_sa_update_addresses(env, ipcomp)
sbin/iked/ikev2.c
7530
RB_REMOVE(iked_flows, &env->sc_activeflows, flow);
sbin/iked/ikev2.c
7531
(void)pfkey_flow_delete(env, flow);
sbin/iked/ikev2.c
7534
if (pfkey_flow_add(env, flow) != 0)
sbin/iked/ikev2.c
7538
if ((oflow = RB_FIND(iked_flows, &env->sc_activeflows, flow))
sbin/iked/ikev2.c
7543
RB_REMOVE(iked_flows, &env->sc_activeflows, oflow);
sbin/iked/ikev2.c
7545
RB_INSERT(iked_flows, &env->sc_activeflows, flow);
sbin/iked/ikev2.c
7573
ikev2_info_sa(struct iked *env, struct imsg *imsg, int dolog, const char *msg,
sbin/iked/ikev2.c
758
sa_free(env, sa);
sbin/iked/ikev2.c
7606
proc_compose_imsg(&env->sc_ps, PROC_CONTROL, -1,
sbin/iked/ikev2.c
7613
ikev2_info_csa(struct iked *env, struct imsg *imsg, int dolog, const char *msg,
sbin/iked/ikev2.c
763
ikestat_inc(env, ikes_msg_rcvd_dropped);
sbin/iked/ikev2.c
7642
proc_compose_imsg(&env->sc_ps, PROC_CONTROL, -1,
sbin/iked/ikev2.c
7649
ikev2_info_flow(struct iked *env, struct imsg *imsg, int dolog, const char *msg,
sbin/iked/ikev2.c
7689
proc_compose_imsg(&env->sc_ps, PROC_CONTROL, -1,
sbin/iked/ikev2.c
7696
ikev2_info(struct iked *env, struct imsg *imsg, int dolog)
sbin/iked/ikev2.c
7704
RB_FOREACH(sa, iked_sas, &env->sc_sas) {
sbin/iked/ikev2.c
7705
ikev2_info_sa(env, imsg, dolog, "iked_sas", sa);
sbin/iked/ikev2.c
7707
ikev2_info_csa(env, imsg, dolog, " sa_childsas", csa);
sbin/iked/ikev2.c
7709
ikev2_info_csa(env, imsg, dolog, " ",
sbin/iked/ikev2.c
7713
ikev2_info_flow(env, imsg, dolog, " sa_flows", flow);
sbin/iked/ikev2.c
7716
RB_FOREACH(csa, iked_activesas, &env->sc_activesas) {
sbin/iked/ikev2.c
7717
ikev2_info_csa(env, imsg, dolog, "iked_activesas", csa);
sbin/iked/ikev2.c
7719
ikev2_info_csa(env, imsg, dolog, " ", ipcomp);
sbin/iked/ikev2.c
772
if ((r = ikev2_msg_retransmit_response(env, sa, msg, hdr))
sbin/iked/ikev2.c
7721
RB_FOREACH(flow, iked_flows, &env->sc_activeflows) {
sbin/iked/ikev2.c
7722
ikev2_info_flow(env, imsg, dolog, "iked_flows", flow);
sbin/iked/ikev2.c
7724
RB_FOREACH(sa, iked_dstid_sas, &env->sc_dstid_sas) {
sbin/iked/ikev2.c
7725
ikev2_info_sa(env, imsg, dolog, "iked_dstid_sas", sa);
sbin/iked/ikev2.c
7730
proc_compose_imsg(&env->sc_ps, PROC_CONTROL, -1, IMSG_CTL_SHOW_SA,
sbin/iked/ikev2.c
779
sa_free(env, sa);
sbin/iked/ikev2.c
787
ikestat_inc(env, ikes_msg_rcvd_busy);
sbin/iked/ikev2.c
795
ikev2_init_recv(env, msg, hdr);
sbin/iked/ikev2.c
797
ikev2_resp_recv(env, msg, hdr);
sbin/iked/ikev2.c
808
ikev2_msg_prevail(env, &sa->sa_responses, msg);
sbin/iked/ikev2.c
814
sa_free(env, sa);
sbin/iked/ikev2.c
856
ikev2_auth_verify(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
880
ikev2_send_auth_failed(env, sa);
sbin/iked/ikev2.c
896
ikev2_send_auth_failed(env, sa);
sbin/iked/ikev2.c
902
if ((authmsg = ikev2_msg_auth(env, sa,
sbin/iked/ikev2.c
906
ikev2_send_auth_failed(env, sa);
sbin/iked/ikev2.c
911
ret = ikev2_msg_authverify(env, sa, &ikeauth,
sbin/iked/ikev2.c
919
ikev2_send_auth_failed(env, sa);
sbin/iked/ikev2.c
924
if ((authmsg = ikev2_msg_auth(env, sa,
sbin/iked/ikev2.c
933
ret = ikev2_msg_authsign(env, sa, &ikeauth, authmsg);
sbin/iked/ikev2.c
936
ikev2_send_auth_failed(env, sa);
sbin/iked/ikev2.c
944
sa_state(env, sa, IKEV2_STATE_EAP_SUCCESS);
sbin/iked/ikev2.c
952
ikev2_ike_auth_recv(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
966
sa_state(env, sa, IKEV2_STATE_AUTH_REQUEST);
sbin/iked/ikev2.c
971
sa_state(env, sa, IKEV2_STATE_EAP);
sbin/iked/ikev2.c
983
if (policy_lookup(env, msg, &sa->sa_proposals, NULL, 0) != 0 ||
sbin/iked/ikev2.c
987
ikev2_send_auth_failed(env, sa);
sbin/iked/ikev2.c
989
policy_unref(env, old);
sbin/iked/ikev2.c
995
policy_unref(env, old);
sbin/iked/ikev2.c
998
if (sa_new(env, sa->sa_hdr.sh_ispi,
sbin/iked/ikev2_msg.c
1003
ikev2_msg_authverify(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2_msg.c
103
ikev1_recv(env, &msg);
sbin/iked/ikev2_msg.c
105
ikev2_recv(env, &msg);
sbin/iked/ikev2_msg.c
1061
sa_state(env, sa, IKEV2_STATE_AUTH_SUCCESS);
sbin/iked/ikev2_msg.c
1065
sa_state(env, sa, IKEV2_STATE_AUTH_REQUEST);
sbin/iked/ikev2_msg.c
107
ikev2_msg_cleanup(env, &msg);
sbin/iked/ikev2_msg.c
1076
ikev2_msg_authsign(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2_msg.c
111
ikev1_recv(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2_msg.c
1186
ikev2_msg_getsocket(struct iked *env, int af, int natt)
sbin/iked/ikev2_msg.c
1190
return (env->sc_sock4[natt ? 1 : 0]);
sbin/iked/ikev2_msg.c
1192
return (env->sc_sock6[natt ? 1 : 0]);
sbin/iked/ikev2_msg.c
1200
ikev2_msg_enqueue(struct iked *env, struct iked_msgqueue *queue,
sbin/iked/ikev2_msg.c
1205
if ((mr = ikev2_msg_lookup(env, queue, msg, msg->msg_exchange)) ==
sbin/iked/ikev2_msg.c
1212
timer_set(env, &mr->mrt_timer, msg->msg_response ?
sbin/iked/ikev2_msg.c
1215
timer_add(env, &mr->mrt_timer, timeout);
sbin/iked/ikev2_msg.c
1226
ikev2_msg_prevail(struct iked *env, struct iked_msgqueue *queue,
sbin/iked/ikev2_msg.c
1233
ikev2_msg_dispose(env, queue, mr);
sbin/iked/ikev2_msg.c
1238
ikev2_msg_dispose(struct iked *env, struct iked_msgqueue *queue,
sbin/iked/ikev2_msg.c
1245
ikev2_msg_cleanup(env, m);
sbin/iked/ikev2_msg.c
1249
timer_del(env, &mr->mrt_timer);
sbin/iked/ikev2_msg.c
1255
ikev2_msg_flushqueue(struct iked *env, struct iked_msgqueue *queue)
sbin/iked/ikev2_msg.c
1260
ikev2_msg_dispose(env, queue, mr);
sbin/iked/ikev2_msg.c
1264
ikev2_msg_lookup(struct iked *env, struct iked_msgqueue *queue,
sbin/iked/ikev2_msg.c
1280
ikev2_msg_retransmit_response(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2_msg.c
1286
if ((mr = ikev2_msg_lookup(env, &sa->sa_responses, msg,
sbin/iked/ikev2_msg.c
1292
if (ikev2_pld_parse_quick(env, hdr, msg,
sbin/iked/ikev2_msg.c
1306
ikestat_inc(env, ikes_msg_send_failures);
sbin/iked/ikev2_msg.c
1317
timer_add(env, &mr->mrt_timer, IKED_RESPONSE_TIMEOUT);
sbin/iked/ikev2_msg.c
1318
ikestat_inc(env, ikes_retransmit_response);
sbin/iked/ikev2_msg.c
1323
ikev2_msg_response_timeout(struct iked *env, void *arg)
sbin/iked/ikev2_msg.c
1329
ikev2_msg_dispose(env, &sa->sa_responses, mr);
sbin/iked/ikev2_msg.c
1333
ikev2_msg_retransmit_timeout(struct iked *env, void *arg)
sbin/iked/ikev2_msg.c
1348
sa_free(env, sa);
sbin/iked/ikev2_msg.c
1349
ikestat_inc(env, ikes_msg_send_failures);
sbin/iked/ikev2_msg.c
1360
timer_add(env, &mr->mrt_timer,
sbin/iked/ikev2_msg.c
1362
ikestat_inc(env, ikes_retransmit_request);
sbin/iked/ikev2_msg.c
1367
ikestat_inc(env, ikes_retransmit_limit);
sbin/iked/ikev2_msg.c
1368
sa_free(env, sa);
sbin/iked/ikev2_msg.c
138
ikev2_msg_init(struct iked *env, struct iked_message *msg,
sbin/iked/ikev2_msg.c
158
ikev2_msg_copy(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2_msg.c
173
(buf = ikev2_msg_init(env, m, &msg->msg_peer, msg->msg_peerlen,
sbin/iked/ikev2_msg.c
189
ikev2_msg_cleanup(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2_msg.c
245
ikev2_msg_valid_ike_sa(struct iked *env, struct ike_header *oldhdr,
sbin/iked/ikev2_msg.c
272
ikev2_msg_send(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2_msg.c
320
sa_state(env, sa, IKEV2_STATE_CLOSING);
sbin/iked/ikev2_msg.c
321
timer_del(env, &sa->sa_timer);
sbin/iked/ikev2_msg.c
322
timer_set(env, &sa->sa_timer,
sbin/iked/ikev2_msg.c
324
timer_add(env, &sa->sa_timer,
sbin/iked/ikev2_msg.c
327
ikestat_inc(env, ikes_msg_send_failures);
sbin/iked/ikev2_msg.c
329
ikestat_inc(env, ikes_msg_sent);
sbin/iked/ikev2_msg.c
334
if ((m = ikev2_msg_copy(env, msg)) == NULL) {
sbin/iked/ikev2_msg.c
341
if (ikev2_msg_enqueue(env, &sa->sa_responses, m,
sbin/iked/ikev2_msg.c
343
ikev2_msg_cleanup(env, m);
sbin/iked/ikev2_msg.c
348
if (ikev2_msg_enqueue(env, &sa->sa_requests, m,
sbin/iked/ikev2_msg.c
350
ikev2_msg_cleanup(env, m);
sbin/iked/ikev2_msg.c
360
ikev2_msg_id(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2_msg.c
409
ikev2_msg_encrypt(struct iked *env, struct iked_sa *sa, struct ibuf *src,
sbin/iked/ikev2_msg.c
508
ikev2_msg_integr(struct iked *env, struct iked_sa *sa, struct ibuf *src)
sbin/iked/ikev2_msg.c
573
ikev2_msg_decrypt(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2_msg.c
60
struct iked *env = sock->sock_env;
sbin/iked/ikev2_msg.c
749
ikev2_msg_send_encrypt(struct iked *env, struct iked_sa *sa, struct ibuf **ep,
sbin/iked/ikev2_msg.c
760
return ikev2_send_encrypted_fragments(env, sa, e, exchange,
sbin/iked/ikev2_msg.c
764
if ((buf = ikev2_msg_init(env, &resp, &sa->sa_peer.addr,
sbin/iked/ikev2_msg.c
769
resp.msg_msgid = response ? sa->sa_msgid_current : ikev2_msg_id(env, sa);
sbin/iked/ikev2_msg.c
783
if ((e = ikev2_msg_encrypt(env, sa, e, buf)) == NULL) {
sbin/iked/ikev2_msg.c
791
if (ikev2_msg_integr(env, sa, buf) != 0) {
sbin/iked/ikev2_msg.c
801
(void)ikev2_pld_parse(env, hdr, &resp, 0);
sbin/iked/ikev2_msg.c
803
ret = ikev2_msg_send(env, &resp);
sbin/iked/ikev2_msg.c
808
ikev2_msg_cleanup(env, &resp);
sbin/iked/ikev2_msg.c
814
ikev2_send_encrypted_fragments(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2_msg.c
83
env->sc_nattport) {
sbin/iked/ikev2_msg.c
833
ikestat_inc(env, ikes_frag_send_failures);
sbin/iked/ikev2_msg.c
852
msgid = response ? sa->sa_msgid_current : ikev2_msg_id(env, sa);
sbin/iked/ikev2_msg.c
855
if ((buf = ikev2_msg_init(env, &resp, &sa->sa_peer.addr,
sbin/iked/ikev2_msg.c
891
if ((e = ikev2_msg_encrypt(env, sa, e, buf)) == NULL) {
sbin/iked/ikev2_msg.c
899
if (ikev2_msg_integr(env, sa, buf) != 0) {
sbin/iked/ikev2_msg.c
914
if (ikev2_msg_send(env, &resp) == -1)
sbin/iked/ikev2_msg.c
917
ikestat_inc(env, ikes_frag_sent);
sbin/iked/ikev2_msg.c
926
ikev2_msg_cleanup(env, &resp);
sbin/iked/ikev2_msg.c
933
ikev2_msg_cleanup(env, &resp);
sbin/iked/ikev2_msg.c
935
ikestat_inc(env, ikes_frag_send_failures);
sbin/iked/ikev2_msg.c
940
ikev2_msg_auth(struct iked *env, struct iked_sa *sa, int response)
sbin/iked/ikev2_pld.c
104
int ikev2_pld_ef(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
1046
ikev2_pld_notify(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
106
int ikev2_frags_reassemble(struct iked *env,
sbin/iked/ikev2_pld.c
1084
if (ikev2_nat_detection(env, msg, md, sizeof(md), type,
sbin/iked/ikev2_pld.c
118
ikev2_pld_parse(struct iked *env, struct ike_header *hdr,
sbin/iked/ikev2_pld.c
1405
ikev2_pld_delete(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
141
return (ikev2_pld_payloads(env, msg, offset,
sbin/iked/ikev2_pld.c
1471
ikev2_pld_tss(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
1502
if (ikev2_pld_ts(env, pld, msg, offset, ts_len, ts.ts_type))
sbin/iked/ikev2_pld.c
1542
ikev2_pld_ts(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
1631
ikev2_pld_ef(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
1657
ikestat_inc(env, ikes_frag_rcvd);
sbin/iked/ikev2_pld.c
1683
if ((e = ikev2_msg_decrypt(env, msg->msg_sa, msg->msg_data, e))
sbin/iked/ikev2_pld.c
1740
ret = ikev2_frags_reassemble(env, pld, msg);
sbin/iked/ikev2_pld.c
1748
ikestat_inc(env, ikes_frag_rcvd_drop);
sbin/iked/ikev2_pld.c
1752
ikestat_add(env, ikes_frag_rcvd_drop, sa_frag->frag_count + 1);
sbin/iked/ikev2_pld.c
1759
ikev2_frags_reassemble(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
1798
ikev2_msg_flushqueue(env, &msg->msg_sa->sa_requests);
sbin/iked/ikev2_pld.c
1810
ret = ikev2_pld_payloads(env, &emsg, 0, ibuf_size(e),
sbin/iked/ikev2_pld.c
1815
ikestat_add(env, ikes_frag_reass_ok, sa_frag->frag_total);
sbin/iked/ikev2_pld.c
1817
ikestat_add(env, ikes_frag_reass_drop, sa_frag->frag_total);
sbin/iked/ikev2_pld.c
1825
ikev2_pld_e(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
1850
e = ikev2_msg_decrypt(env, msg->msg_sa, msg->msg_data, e);
sbin/iked/ikev2_pld.c
1853
e = ikev2_msg_decrypt(env, msg->msg_sa, msg->msg_data, e);
sbin/iked/ikev2_pld.c
186
ikev2_pld_payloads(struct iked *env, struct iked_message *msg,
sbin/iked/ikev2_pld.c
1870
ret = ikev2_pld_payloads(env, &emsg, 0, ibuf_size(e),
sbin/iked/ikev2_pld.c
1896
ikev2_pld_cp(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
2086
ikev2_pld_eap(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
2120
if (eap_parse(env, sa, msg, eap, msg->msg_response) == -1)
sbin/iked/ikev2_pld.c
2139
ikev2_pld_parse_quick(struct iked *env, struct ike_header *hdr,
sbin/iked/ikev2_pld.c
222
ret = ikev2_pld_sa(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
226
ret = ikev2_pld_ke(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
230
ret = ikev2_pld_id(env, &pld, msg, offset, left,
sbin/iked/ikev2_pld.c
234
ret = ikev2_pld_cert(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
238
ret = ikev2_pld_certreq(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
241
ret = ikev2_pld_auth(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
245
ret = ikev2_pld_nonce(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
249
ret = ikev2_pld_notify(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
252
ret = ikev2_pld_delete(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
256
ret = ikev2_pld_tss(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
259
ret = ikev2_pld_e(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
262
ret = ikev2_pld_ef(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
265
ret = ikev2_pld_cp(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
268
ret = ikev2_pld_eap(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
277
(void)ikev2_send_informational(env, msg);
sbin/iked/ikev2_pld.c
343
ikev2_pld_sa(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
438
r = ikev2_pld_xform(env, msg, offset, total);
sbin/iked/ikev2_pld.c
490
ikev2_pld_xform(struct iked *env, struct iked_message *msg,
sbin/iked/ikev2_pld.c
540
if (ikev2_pld_attr(env, &xfrm, msg,
sbin/iked/ikev2_pld.c
594
ikev2_pld_attr(struct iked *env, struct ikev2_transform *xfrm,
sbin/iked/ikev2_pld.c
662
ikev2_pld_ke(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
725
ikev2_pld_id(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
808
ikev2_pld_cert(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
883
ikev2_pld_certreq(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
957
ikev2_pld_auth(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
997
ikev2_pld_nonce(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ocsp.c
103
else if (env->sc_ocsp_url)
sbin/iked/ocsp.c
104
url = env->sc_ocsp_url;
sbin/iked/ocsp.c
149
oc->oc_sock.sock_env = env;
sbin/iked/ocsp.c
173
ocsp_connect_finish(env, fd, oc, &sh);
sbin/iked/ocsp.c
184
ocsp_connect_finish(env, -1, oc, &sh);
sbin/iked/ocsp.c
225
ocsp_connect_finish(struct iked *env, int fd, struct ocsp_connect *oc,
sbin/iked/ocsp.c
240
ret = proc_composev_imsg(&env->sc_ps, PROC_CERT, -1,
sbin/iked/ocsp.c
249
ret = proc_composev_imsg(&env->sc_ps, PROC_CERT, -1,
sbin/iked/ocsp.c
267
ocsp_validate_cert(struct iked *env, void *data, size_t len,
sbin/iked/ocsp.c
289
ocsp->ocsp_env = env;
sbin/iked/ocsp.c
308
TAILQ_INSERT_TAIL(&env->sc_ocsp, ioe, ioe_entry);
sbin/iked/ocsp.c
324
ret = proc_composev(&env->sc_ps, PROC_PARENT, IMSG_OCSP_FD,
sbin/iked/ocsp.c
359
ocsp_receive_fd(struct iked *env, struct imsg *imsg)
sbin/iked/ocsp.c
381
TAILQ_FOREACH(ioe, &env->sc_ocsp, ioe_entry) {
sbin/iked/ocsp.c
392
TAILQ_REMOVE(&env->sc_ocsp, ioe, ioe_entry);
sbin/iked/ocsp.c
404
sock->sock_env = env;
sbin/iked/ocsp.c
515
struct iked *env = ocsp->ocsp_env;
sbin/iked/ocsp.c
575
if (env->sc_ocsp_tolerate &&
sbin/iked/ocsp.c
576
!OCSP_check_validity(thisupd, nextupd, env->sc_ocsp_tolerate,
sbin/iked/ocsp.c
577
env->sc_ocsp_maxage)) {
sbin/iked/ocsp.c
607
struct iked *env = ocsp->ocsp_env;
sbin/iked/ocsp.c
617
ret = proc_composev(&env->sc_ps, PROC_IKEV2, cmd, iov, iovcnt);
sbin/iked/ocsp.c
79
ocsp_connect(struct iked *env, struct imsg *imsg)
sbin/iked/parse.y
1302
if ((ret = config_setradserver(env, ai->ai_addr,
sbin/iked/parse.y
1356
config_setradcfgmap(env, cfgtype, $5.vendorid,
sbin/iked/parse.y
1379
if ((ret = config_setraddae(env, ai->ai_addr,
sbin/iked/parse.y
1405
config_setradclient(env, ai->ai_addr, ai->ai_addrlen,
sbin/iked/parse.y
2013
env = x_env;
sbin/iked/parse.y
2037
if (env->sc_opts & IKED_OPT_PASSIVE)
sbin/iked/parse.y
2044
env->sc_passive = passive ? 1 : 0;
sbin/iked/parse.y
2045
env->sc_decoupled = decouple ? 1 : 0;
sbin/iked/parse.y
2046
env->sc_mobike = mobike;
sbin/iked/parse.y
2047
env->sc_enforcesingleikesa = enforcesingleikesa;
sbin/iked/parse.y
2048
env->sc_stickyaddress = stickyaddress;
sbin/iked/parse.y
2049
env->sc_frag = fragmentation;
sbin/iked/parse.y
2050
env->sc_alive_timeout = dpd_interval;
sbin/iked/parse.y
2051
env->sc_ocsp_url = ocsp_url;
sbin/iked/parse.y
2052
env->sc_ocsp_tolerate = ocsp_tolerate;
sbin/iked/parse.y
2053
env->sc_ocsp_maxage = ocsp_maxage;
sbin/iked/parse.y
2054
env->sc_cert_partial_chain = cert_partial_chain;
sbin/iked/parse.y
2055
env->sc_vendorid = vendorid;
sbin/iked/parse.y
2056
env->sc_radauth = radauth;
sbin/iked/parse.y
2057
env->sc_radacct = radacct;
sbin/iked/parse.y
2738
pol.pol_certreqtype = env->sc_certreqtype;
sbin/iked/parse.y
3152
config_setpolicy(env, &pol, PROC_IKEV2);
sbin/iked/parse.y
3153
config_setflow(env, &pol, PROC_IKEV2);
sbin/iked/parse.y
3365
config_setuser(env, &usr, PROC_IKEV2);
sbin/iked/parse.y
98
static struct iked *env = NULL;
sbin/iked/pfkey.c
1042
pfkey_sa_last_used(struct iked *env, struct iked_childsa *sa, uint64_t *last_used)
sbin/iked/pfkey.c
1044
return pfkey_sa_lookup(env, sa, last_used, NULL);
sbin/iked/pfkey.c
1048
pfkey_sa_check_exists(struct iked *env, struct iked_childsa *sa)
sbin/iked/pfkey.c
1050
return pfkey_sa_lookup(env, sa, NULL, NULL);
sbin/iked/pfkey.c
1054
pfkey_sa_sastats(struct iked *env, struct iked_childsa *sa,
sbin/iked/pfkey.c
1057
return pfkey_sa_lookup(env, sa, NULL, stats);
sbin/iked/pfkey.c
1061
pfkey_sa_getspi(struct iked *env, uint8_t satype, struct iked_childsa *sa,
sbin/iked/pfkey.c
1157
if ((ret = pfkey_write(env, &smsg, iov, iov_cnt, &data, &n)) != 0)
sbin/iked/pfkey.c
1182
pfkey_sagroup(struct iked *env, uint8_t satype1, uint8_t action,
sbin/iked/pfkey.c
128
pfkey_couple(struct iked *env, struct iked_sas *sas, int couple)
sbin/iked/pfkey.c
1338
return (pfkey_write(env, &smsg, iov, iov_cnt, NULL, NULL));
sbin/iked/pfkey.c
1342
pfkey_write(struct iked *env, struct sadb_msg *smsg, struct iovec *iov, int iov_cnt,
sbin/iked/pfkey.c
136
if (env->sc_pfkey == -1)
sbin/iked/pfkey.c
1364
event_del(&env->sc_pfkeyev);
sbin/iked/pfkey.c
1366
if ((n = writev(env->sc_pfkey, iov, iov_cnt)) == -1) {
sbin/iked/pfkey.c
1375
ret = pfkey_reply(env->sc_pfkey, datap, lenp);
sbin/iked/pfkey.c
1377
event_add(&env->sc_pfkeyev, NULL);
sbin/iked/pfkey.c
1481
pfkey_flow_add(struct iked *env, struct iked_flow *flow)
sbin/iked/pfkey.c
1491
if (pfkey_flow(env, satype, SADB_X_ADDFLOW, flow) == -1)
sbin/iked/pfkey.c
1500
pfkey_flow_delete(struct iked *env, struct iked_flow *flow)
sbin/iked/pfkey.c
151
(void)pfkey_sa_add(env, csa, NULL);
sbin/iked/pfkey.c
1510
if (pfkey_flow(env, satype, SADB_X_DELFLOW, flow) == -1)
sbin/iked/pfkey.c
1519
pfkey_sa_init(struct iked *env, struct iked_childsa *sa, uint32_t *spi)
sbin/iked/pfkey.c
1526
if (pfkey_sa_getspi(env, satype, sa, spi) == -1)
sbin/iked/pfkey.c
153
(void)pfkey_sa_delete(env, csa);
sbin/iked/pfkey.c
1535
pfkey_sa_add(struct iked *env, struct iked_childsa *sa, struct iked_childsa *last)
sbin/iked/pfkey.c
1552
rval = pfkey_sa(env, satype, cmd, sa);
sbin/iked/pfkey.c
1557
if (pfkey_sa_check_exists(env, sa) == 0) {
sbin/iked/pfkey.c
156
(void)pfkey_sa_add(env, ipcomp, csa);
sbin/iked/pfkey.c
1563
(void)pfkey_sa_delete(env, sa);
sbin/iked/pfkey.c
1570
if (pfkey_sa(env, satype, SADB_ADD, sa) == -1)
sbin/iked/pfkey.c
1579
if (pfkey_sagroup(env, satype,
sbin/iked/pfkey.c
158
(void)pfkey_sa_delete(env, ipcomp);
sbin/iked/pfkey.c
1581
(void)pfkey_sa_delete(env, sa);
sbin/iked/pfkey.c
1591
pfkey_sa_update_addresses(struct iked *env, struct iked_childsa *sa)
sbin/iked/pfkey.c
1605
return pfkey_sa(env, satype, IKED_SADB_UPDATE_SA_ADDRESSES, sa);
sbin/iked/pfkey.c
1609
pfkey_sa_delete(struct iked *env, struct iked_childsa *sa)
sbin/iked/pfkey.c
1622
pfkey_sa_sastats(env, sa, &sas);
sbin/iked/pfkey.c
1624
if (pfkey_sa(env, satype, SADB_DELETE, sa) == -1 &&
sbin/iked/pfkey.c
1625
pfkey_sa_check_exists(env, sa) == 0)
sbin/iked/pfkey.c
163
(void)pfkey_flow_add(env, flow);
sbin/iked/pfkey.c
1641
pfkey_flush(struct iked *env)
sbin/iked/pfkey.c
165
(void)pfkey_flow_delete(env, flow);
sbin/iked/pfkey.c
1661
return (pfkey_write(env, &smsg, iov, iov_cnt, NULL, NULL));
sbin/iked/pfkey.c
1712
pfkey_socket(struct iked *env)
sbin/iked/pfkey.c
1726
pfkey_init(struct iked *env, int fd)
sbin/iked/pfkey.c
1736
evtimer_set(&pfkey_timer_ev, pfkey_timer_cb, env);
sbin/iked/pfkey.c
1739
env->sc_pfkey = fd;
sbin/iked/pfkey.c
1740
event_set(&env->sc_pfkeyev, env->sc_pfkey,
sbin/iked/pfkey.c
1741
EV_READ|EV_PERSIST, pfkey_dispatch, env);
sbin/iked/pfkey.c
1742
event_add(&env->sc_pfkeyev, NULL);
sbin/iked/pfkey.c
1744
pfkey_flush(env);
sbin/iked/pfkey.c
1758
if (pfkey_write(env, &smsg, &iov, 1, NULL, NULL))
sbin/iked/pfkey.c
1772
if (pfkey_write(env, &smsg, &iov, 1, NULL, NULL))
sbin/iked/pfkey.c
1797
struct iked *env = (struct iked *)arg;
sbin/iked/pfkey.c
1828
pfkey_timer_cb(0, 0, env);
sbin/iked/pfkey.c
1833
if (pfkey_process(env, &pm) == -1 &&
sbin/iked/pfkey.c
1848
struct iked *env = arg;
sbin/iked/pfkey.c
1855
if (pfkey_process(env, pm) == -1) {
sbin/iked/pfkey.c
1875
pfkey_process(struct iked *env, struct pfkey_message *pm)
sbin/iked/pfkey.c
188
pfkey_flow(struct iked *env, uint8_t satype, uint8_t action, struct iked_flow *flow)
sbin/iked/pfkey.c
1897
if (!env || !data || !len)
sbin/iked/pfkey.c
1954
if (pfkey_write(env, &smsg, iov, iov_cnt, &reply, &rlen)) {
sbin/iked/pfkey.c
2071
ret = ikev2_child_sa_acquire(env, &flow);
sbin/iked/pfkey.c
2118
ret = ikev2_child_sa_rekey(env, &spi);
sbin/iked/pfkey.c
2120
ret = ikev2_child_sa_drop(env, &spi);
sbin/iked/pfkey.c
449
ret = pfkey_write(env, &smsg, iov, iov_cnt, NULL, NULL);
sbin/iked/pfkey.c
458
pfkey_sa(struct iked *env, uint8_t satype, uint8_t action, struct iked_childsa *sa)
sbin/iked/pfkey.c
869
ret = pfkey_write(env, &smsg, iov, iov_cnt, NULL, NULL);
sbin/iked/pfkey.c
878
pfkey_sa_lookup(struct iked *env, struct iked_childsa *sa, uint64_t *last_used,
sbin/iked/pfkey.c
997
if ((ret = pfkey_write(env, &smsg, iov, iov_cnt, &data, &n)) != 0)
sbin/iked/policy.c
131
if ((msg->msg_policy = policy_test(env, &pol)) != NULL) {
sbin/iked/policy.c
138
if ((msg->msg_policy = env->sc_defaultcon) != NULL)
sbin/iked/policy.c
153
policy_lookup_sa(struct iked *env, struct iked_sa *sa)
sbin/iked/policy.c
208
if ((pol_found = policy_test(env, &pol)) != NULL) {
sbin/iked/policy.c
227
policy_test(struct iked *env, struct iked_policy *key)
sbin/iked/policy.c
231
p = TAILQ_FIRST(&env->sc_policies);
sbin/iked/policy.c
359
policy_ref(struct iked *env, struct iked_policy *pol)
sbin/iked/policy.c
366
policy_unref(struct iked *env, struct iked_policy *pol)
sbin/iked/policy.c
371
config_free_policy(env, pol);
sbin/iked/policy.c
385
sa_state(struct iked *env, struct iked_sa *sa, int state)
sbin/iked/policy.c
421
ikestat_inc(env, ikes_sa_established_total);
sbin/iked/policy.c
422
ikestat_inc(env, ikes_sa_established_current);
sbin/iked/policy.c
428
ikestat_dec(env, ikes_sa_established_current);
sbin/iked/policy.c
434
ikestat_inc(env, ikes_sa_established_failures);
sbin/iked/policy.c
488
sa_new(struct iked *env, uint64_t ispi, uint64_t rspi,
sbin/iked/policy.c
497
(sa = sa_lookup(env, ispi, rspi, initiator)) == NULL) {
sbin/iked/policy.c
504
sa = config_new_sa(env, initiator);
sbin/iked/policy.c
511
old = RB_INSERT(iked_sas, &env->sc_sas, sa);
sbin/iked/policy.c
514
config_free_sa(env, sa);
sbin/iked/policy.c
525
policy_ref(env, pol);
sbin/iked/policy.c
552
sa_free(env, sa);
sbin/iked/policy.c
59
policy_init(struct iked *env)
sbin/iked/policy.c
602
sa_free(struct iked *env, struct iked_sa *sa)
sbin/iked/policy.c
61
TAILQ_INIT(&env->sc_policies);
sbin/iked/policy.c
615
RB_REMOVE(iked_sas, &env->sc_sas, sa->sa_nexti);
sbin/iked/policy.c
619
sa_dstid_remove(env, sa->sa_nexti);
sbin/iked/policy.c
62
TAILQ_INIT(&env->sc_ocsp);
sbin/iked/policy.c
621
config_free_sa(env, sa->sa_nexti);
sbin/iked/policy.c
624
RB_REMOVE(iked_sas, &env->sc_sas, sa->sa_nextr);
sbin/iked/policy.c
628
sa_dstid_remove(env, sa->sa_nextr);
sbin/iked/policy.c
63
TAILQ_INIT(&env->sc_radauthservers);
sbin/iked/policy.c
630
config_free_sa(env, sa->sa_nextr);
sbin/iked/policy.c
64
TAILQ_INIT(&env->sc_radacctservers);
sbin/iked/policy.c
65
TAILQ_INIT(&env->sc_radcfgmaps);
sbin/iked/policy.c
657
RB_REMOVE(iked_sas, &env->sc_sas, sa);
sbin/iked/policy.c
659
sa_dstid_remove(env, sa);
sbin/iked/policy.c
66
TAILQ_INIT(&env->sc_raddaes);
sbin/iked/policy.c
660
config_free_sa(env, sa);
sbin/iked/policy.c
664
sa_free_flows(struct iked *env, struct iked_saflows *head)
sbin/iked/policy.c
67
TAILQ_INIT(&env->sc_raddaeclients);
sbin/iked/policy.c
672
RB_REMOVE(iked_flows, &env->sc_activeflows, flow);
sbin/iked/policy.c
674
(void)pfkey_flow_delete(env, flow);
sbin/iked/policy.c
68
RB_INIT(&env->sc_users);
sbin/iked/policy.c
69
RB_INIT(&env->sc_sas);
sbin/iked/policy.c
695
sa_configure_iface(struct iked *env, struct iked_sa *sa, int add)
sbin/iked/policy.c
70
RB_INIT(&env->sc_dstid_sas);
sbin/iked/policy.c
705
if (vroute_setdns(env, add,
sbin/iked/policy.c
71
RB_INIT(&env->sc_activesas);
sbin/iked/policy.c
715
if (vroute_setaddr(env, add,
sbin/iked/policy.c
72
RB_INIT(&env->sc_activeflows);
sbin/iked/policy.c
721
if (vroute_setaddr(env, add,
sbin/iked/policy.c
729
if (vroute_setcloneroute(env, getrtable(),
sbin/iked/policy.c
733
if (vroute_setdelroute(env, getrtable(),
sbin/iked/policy.c
762
if (vroute_setaddroute(env, rdomain,
sbin/iked/policy.c
767
if (vroute_setdelroute(env, rdomain,
sbin/iked/policy.c
822
sa_lookup(struct iked *env, uint64_t ispi, uint64_t rspi,
sbin/iked/policy.c
830
if ((sa = RB_FIND(iked_sas, &env->sc_sas, &key)) != NULL) {
sbin/iked/policy.c
86
policy_lookup(struct iked *env, struct iked_message *msg,
sbin/iked/policy.c
874
sa_dstid_lookup(struct iked *env, struct iked_sa *key)
sbin/iked/policy.c
880
sa = RB_FIND(iked_dstid_sas, &env->sc_dstid_sas, key);
sbin/iked/policy.c
887
sa_dstid_insert(struct iked *env, struct iked_sa *sa)
sbin/iked/policy.c
895
osa = RB_FIND(iked_dstid_sas, &env->sc_dstid_sas, sa);
sbin/iked/policy.c
897
osa = RB_INSERT(iked_dstid_sas, &env->sc_dstid_sas, sa);
sbin/iked/policy.c
911
sa_dstid_remove(struct iked *env, struct iked_sa *sa)
sbin/iked/policy.c
917
RB_REMOVE(iked_dstid_sas, &env->sc_dstid_sas, sa);
sbin/iked/policy.c
970
user_lookup(struct iked *env, const char *user)
sbin/iked/policy.c
978
return (RB_FIND(iked_users, &env->sc_users, &key));
sbin/iked/radius.c
126
iked_radius_request_send(env, sa->sa_radreq);
sbin/iked/radius.c
132
iked_radius_request_free(struct iked *env, struct iked_radserver_req *req)
sbin/iked/radius.c
136
timer_del(env, &req->rr_timer);
sbin/iked/radius.c
151
struct iked *env;
sbin/iked/radius.c
166
env = server->rs_env;
sbin/iked/radius.c
204
iked_radius_request_free(env, req);
sbin/iked/radius.c
216
timer_del(env, &req->rr_timer);
sbin/iked/radius.c
285
sa_state(env, req->rr_sa, IKEV2_STATE_AUTH_SUCCESS);
sbin/iked/radius.c
288
if (TAILQ_EMPTY(&env->sc_radcfgmaps)) {
sbin/iked/radius.c
295
TAILQ_FOREACH(cfgmap, &env->sc_radcfgmaps, entry)
sbin/iked/radius.c
335
ikev2_send_ike_e(env, req->rr_sa, e, IKEV2_PAYLOAD_EAP,
sbin/iked/radius.c
348
sa_free(env, req->rr_sa);
sbin/iked/radius.c
353
iked_radius_request_send(struct iked *env, void *ctx)
sbin/iked/radius.c
366
max_tries = env->sc_radauth.max_tries;
sbin/iked/radius.c
367
max_failovers = env->sc_radauth.max_failovers;
sbin/iked/radius.c
368
radservers = &env->sc_radauthservers;
sbin/iked/radius.c
370
max_tries = env->sc_radacct.max_tries;
sbin/iked/radius.c
371
max_failovers = env->sc_radacct.max_failovers;
sbin/iked/radius.c
372
radservers = &env->sc_radacctservers;
sbin/iked/radius.c
496
timer_add(env, &req->rr_timer, timeouts[nitems(timeouts) - 1]);
sbin/iked/radius.c
498
timer_add(env, &req->rr_timer, timeouts[req->rr_ntry]);
sbin/iked/radius.c
507
sa_free(env, req->rr_sa);
sbin/iked/radius.c
665
iked_radius_acct_on(struct iked *env)
sbin/iked/radius.c
667
if (TAILQ_EMPTY(&env->sc_radacctservers))
sbin/iked/radius.c
669
if (env->sc_radaccton == 0) { /* trigger once */
sbin/iked/radius.c
670
iked_radius_acct_request(env, NULL,
sbin/iked/radius.c
672
env->sc_radaccton = 1;
sbin/iked/radius.c
677
iked_radius_acct_off(struct iked *env)
sbin/iked/radius.c
679
iked_radius_acct_request(env, NULL, RADIUS_ACCT_STATUS_TYPE_ACCT_OFF);
sbin/iked/radius.c
68
iked_radius_request(struct iked *env, struct iked_sa *sa,
sbin/iked/radius.c
683
iked_radius_acct_start(struct iked *env, struct iked_sa *sa)
sbin/iked/radius.c
685
iked_radius_acct_request(env, sa, RADIUS_ACCT_STATUS_TYPE_START);
sbin/iked/radius.c
689
iked_radius_acct_stop(struct iked *env, struct iked_sa *sa)
sbin/iked/radius.c
691
iked_radius_acct_request(env, sa, RADIUS_ACCT_STATUS_TYPE_STOP);
sbin/iked/radius.c
695
iked_radius_acct_request(struct iked *env, struct iked_sa *sa, uint8_t stype)
sbin/iked/radius.c
707
if (TAILQ_EMPTY(&env->sc_radacctservers))
sbin/iked/radius.c
729
timer_set(env, &req->rr_timer, iked_radius_request_send, req);
sbin/iked/radius.c
746
iked_radius_request_send(env, req);
sbin/iked/radius.c
828
iked_radius_request_send(env, req);
sbin/iked/radius.c
835
struct iked *env = dae->rd_env;
sbin/iked/radius.c
857
TAILQ_FOREACH(client, &env->sc_raddaeclients, rc_entry) {
sbin/iked/radius.c
91
timer_set(env, &sa->sa_radreq->rr_timer,
sbin/iked/radius.c
914
RB_FOREACH(sa, iked_sas, &env->sc_sas) {
sbin/iked/radius.c
928
ikev2_ike_sa_delete(env, sa);
sbin/iked/radius.c
931
RB_FOREACH(sa, iked_sas, &env->sc_sas) {
sbin/iked/radius.c
935
ikev2_ike_sa_delete(env, sa);
sbin/iked/radius.c
941
RB_FOREACH(sa, iked_sas, &env->sc_sas) {
sbin/iked/radius.c
947
ikev2_ike_sa_delete(env, sa);
sbin/iked/timer.c
37
timer_set(struct iked *env, struct iked_timer *tmr,
sbin/iked/timer.c
44
tmr->tmr_env = env;
sbin/iked/timer.c
51
timer_add(struct iked *env, struct iked_timer *tmr, int timeout)
sbin/iked/timer.c
59
timer_del(struct iked *env, struct iked_timer *tmr)
sbin/iked/timer.c
61
if (tmr->tmr_env == env && tmr->tmr_cb &&
sbin/iked/vroute.c
106
struct iked *env = (struct iked *) arg;
sbin/iked/vroute.c
107
struct iked_vroute_sc *ivr = env->sc_vroute;
sbin/iked/vroute.c
142
vroute_dodns(env, (struct sockaddr *) &dns->vd_addr,
sbin/iked/vroute.c
154
vroute_init(struct iked *env)
sbin/iked/vroute.c
183
env->sc_vroute = ivr;
sbin/iked/vroute.c
186
vroute_rtmsg_cb, env);
sbin/iked/vroute.c
191
vroute_cleanup(struct iked *env)
sbin/iked/vroute.c
194
struct iked_vroute_sc *ivr = env->sc_vroute;
sbin/iked/vroute.c
201
vroute_doaddr(env, ifname,
sbin/iked/vroute.c
209
vroute_doroute(env, RTF_UP | RTF_GATEWAY | RTF_STATIC,
sbin/iked/vroute.c
219
vroute_dodns(env, (struct sockaddr *)&dns->vd_addr, 0,
sbin/iked/vroute.c
227
vroute_setaddr(struct iked *env, int add, struct sockaddr *addr,
sbin/iked/vroute.c
269
return (proc_composev(&env->sc_ps, PROC_PARENT,
sbin/iked/vroute.c
274
vroute_getaddr(struct iked *env, struct imsg *imsg)
sbin/iked/vroute.c
317
vroute_insertaddr(env, ifidx, addr, mask);
sbin/iked/vroute.c
319
vroute_removeaddr(env, ifidx, addr, mask);
sbin/iked/vroute.c
322
return (vroute_doaddr(env, ifname, addr, mask, add));
sbin/iked/vroute.c
326
vroute_setdns(struct iked *env, int add, struct sockaddr *addr,
sbin/iked/vroute.c
337
return (proc_composev(&env->sc_ps, PROC_PARENT,
sbin/iked/vroute.c
342
vroute_getdns(struct iked *env, struct imsg *imsg)
sbin/iked/vroute.c
370
vroute_insertdns(env, ifidx, dns);
sbin/iked/vroute.c
372
vroute_removedns(env, ifidx, dns);
sbin/iked/vroute.c
375
return (vroute_dodns(env, dns, add, ifidx));
sbin/iked/vroute.c
379
vroute_insertroute(struct iked *env, int rdomain, struct sockaddr *dest,
sbin/iked/vroute.c
382
struct iked_vroute_sc *ivr = env->sc_vroute;
sbin/iked/vroute.c
403
vroute_removeroute(struct iked *env, int rdomain, struct sockaddr *dest,
sbin/iked/vroute.c
406
struct iked_vroute_sc *ivr = env->sc_vroute;
sbin/iked/vroute.c
425
vroute_insertdns(struct iked *env, int ifidx, struct sockaddr *addr)
sbin/iked/vroute.c
427
struct iked_vroute_sc *ivr = env->sc_vroute;
sbin/iked/vroute.c
441
vroute_removedns(struct iked *env, int ifidx, struct sockaddr *addr)
sbin/iked/vroute.c
443
struct iked_vroute_sc *ivr = env->sc_vroute;
sbin/iked/vroute.c
458
vroute_insertaddr(struct iked *env, int ifidx, struct sockaddr *addr,
sbin/iked/vroute.c
461
struct iked_vroute_sc *ivr = env->sc_vroute;
sbin/iked/vroute.c
476
vroute_removeaddr(struct iked *env, int ifidx, struct sockaddr *addr,
sbin/iked/vroute.c
479
struct iked_vroute_sc *ivr = env->sc_vroute;
sbin/iked/vroute.c
495
vroute_setaddroute(struct iked *env, uint8_t rdomain, struct sockaddr *dst,
sbin/iked/vroute.c
498
return (vroute_setroute(env, rdomain, dst, mask, ifa,
sbin/iked/vroute.c
503
vroute_setcloneroute(struct iked *env, uint8_t rdomain, struct sockaddr *dst,
sbin/iked/vroute.c
506
return (vroute_setroute(env, rdomain, dst, mask, addr,
sbin/iked/vroute.c
511
vroute_setdelroute(struct iked *env, uint8_t rdomain, struct sockaddr *dst,
sbin/iked/vroute.c
514
return (vroute_setroute(env, rdomain, dst, mask, addr,
sbin/iked/vroute.c
519
vroute_setroute(struct iked *env, uint32_t rdomain, struct sockaddr *dst,
sbin/iked/vroute.c
570
return (proc_composev(&env->sc_ps, PROC_PARENT, type, iov, iovcnt));
sbin/iked/vroute.c
574
vroute_getroute(struct iked *env, struct imsg *imsg)
sbin/iked/vroute.c
639
vroute_insertroute(env, rdomain, dest, mask);
sbin/iked/vroute.c
641
vroute_removeroute(env, rdomain, dest, mask);
sbin/iked/vroute.c
642
return (vroute_doroute(env, flags, addrs, rdomain, type,
sbin/iked/vroute.c
647
vroute_getcloneroute(struct iked *env, struct imsg *imsg)
sbin/iked/vroute.c
684
if (vroute_doroute(env, flags, RTA_DST, rdomain, RTM_GET,
sbin/iked/vroute.c
694
vroute_insertroute(env, rdomain, (struct sockaddr *)&dest, NULL);
sbin/iked/vroute.c
698
return (vroute_doroute(env, flags, addrs, rdomain, RTM_ADD,
sbin/iked/vroute.c
704
vroute_dodns(struct iked *env, struct sockaddr *dns, int add,
sbin/iked/vroute.c
711
struct iked_vroute_sc *ivr = env->sc_vroute;
sbin/iked/vroute.c
771
vroute_doroute(struct iked *env, int flags, int addrs, int rdomain, uint8_t type,
sbin/iked/vroute.c
776
struct iked_vroute_sc *ivr = env->sc_vroute;
sbin/iked/vroute.c
862
return (vroute_process(env, len, &m_rtmsg, dest, mask, addr, need_gw));
sbin/iked/vroute.c
870
vroute_process(struct iked *env, int msglen, struct vroute_msg *m_rtmsg,
sbin/iked/vroute.c
937
vroute_doaddr(struct iked *env, char *ifname, struct sockaddr *addr,
sbin/iked/vroute.c
940
struct iked_vroute_sc *ivr = env->sc_vroute;
sbin/unwind/libunbound/daemon/worker.h
130
struct module_env env;
sbin/unwind/libunbound/dns64/dns64.c
1012
!dns_cache_store(super->env, &super->qinfo, super->return_msg->rep,
sbin/unwind/libunbound/dns64/dns64.c
1039
dns64_get_mem(struct module_env* env, int id)
sbin/unwind/libunbound/dns64/dns64.c
1041
struct dns64_env* dns64_env = (struct dns64_env*)env->modinfo[id];
sbin/unwind/libunbound/dns64/dns64.c
403
dns64_init(struct module_env* env, int id)
sbin/unwind/libunbound/dns64/dns64.c
411
env->modinfo[id] = (void*)dns64_env;
sbin/unwind/libunbound/dns64/dns64.c
413
if (!dns64_apply_cfg(dns64_env, env->cfg)) {
sbin/unwind/libunbound/dns64/dns64.c
437
dns64_deinit(struct module_env* env, int id)
sbin/unwind/libunbound/dns64/dns64.c
440
if (!env)
sbin/unwind/libunbound/dns64/dns64.c
442
dns64_env = (struct dns64_env*)env->modinfo[id];
sbin/unwind/libunbound/dns64/dns64.c
447
free(env->modinfo[id]);
sbin/unwind/libunbound/dns64/dns64.c
448
env->modinfo[id] = NULL;
sbin/unwind/libunbound/dns64/dns64.c
463
struct dns64_env* dns64_env = (struct dns64_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/dns64/dns64.c
499
fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
sbin/unwind/libunbound/dns64/dns64.c
500
if(!(*qstate->env->attach_sub)(qstate, &qinfo, qstate->client_info,
sbin/unwind/libunbound/dns64/dns64.c
525
fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
sbin/unwind/libunbound/dns64/dns64.c
526
if(!(*qstate->env->attach_sub)(qstate, &qinfo, qstate->client_info,
sbin/unwind/libunbound/dns64/dns64.c
552
struct dns64_env* dns64_env = (struct dns64_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/dns64/dns64.c
577
int synth_all_cfg = qstate->env->cfg->dns64_synthall;
sbin/unwind/libunbound/dns64/dns64.c
660
qstate->env, &qstate->qinfo, qstate->return_msg->rep,
sbin/unwind/libunbound/dns64/dns64.c
823
struct dns64_env* dns64_env = (struct dns64_env*)super->env->modinfo[id];
sbin/unwind/libunbound/dns64/dns64.c
878
rrset_cache_remove(super->env->rrset_cache, dk->rk.dname,
sbin/unwind/libunbound/dns64/dns64.c
884
msg_cache_remove(super->env, dk->rk.dname,
sbin/unwind/libunbound/dns64/dns64.h
53
int dns64_init(struct module_env* env, int id);
sbin/unwind/libunbound/dns64/dns64.h
56
void dns64_deinit(struct module_env* env, int id);
sbin/unwind/libunbound/dns64/dns64.h
69
size_t dns64_get_mem(struct module_env* env, int id);
sbin/unwind/libunbound/dnscrypt/dnscrypt.h
107
int dnsc_apply_cfg(struct dnsc_env *env, struct config_file *cfg);
sbin/unwind/libunbound/dnscrypt/dnscrypt.h
113
void dnsc_delete(struct dnsc_env *env);
sbin/unwind/libunbound/dnstap/dnstap.h
107
dt_apply_cfg(struct dt_env *env, struct config_file *cfg);
sbin/unwind/libunbound/dnstap/dnstap.h
114
void dt_apply_logcfg(struct dt_env *env, struct config_file *cfg);
sbin/unwind/libunbound/dnstap/dnstap.h
123
dt_init(struct dt_env *env, struct comm_base* base);
sbin/unwind/libunbound/dnstap/dnstap.h
128
void dt_deinit(struct dt_env *env);
sbin/unwind/libunbound/dnstap/dnstap.h
135
dt_delete(struct dt_env *env);
sbin/unwind/libunbound/dnstap/dnstap.h
147
dt_msg_send_client_query(struct dt_env *env,
sbin/unwind/libunbound/dnstap/dnstap.h
164
dt_msg_send_client_response(struct dt_env *env,
sbin/unwind/libunbound/dnstap/dnstap.h
184
dt_msg_send_outside_query(struct dt_env *env,
sbin/unwind/libunbound/dnstap/dnstap.h
209
dt_msg_send_outside_response(struct dt_env *env,
sbin/unwind/libunbound/iterator/iter_scrub.c
1071
} else if(!env->cfg->harden_glue && (
sbin/unwind/libunbound/iterator/iter_scrub.c
1077
store_rrset(pkt, msg, env, rrset);
sbin/unwind/libunbound/iterator/iter_scrub.c
1110
if(env->cfg->harden_unverified_glue && ns_rrset_dname &&
sbin/unwind/libunbound/iterator/iter_scrub.c
1125
store_rrset(pkt, msg, env, rrset);
sbin/unwind/libunbound/iterator/iter_scrub.c
1139
struct module_env* env, struct module_qstate* qstate,
sbin/unwind/libunbound/iterator/iter_scrub.c
1170
if(!scrub_normalize(pkt, msg, qinfo, region, env, zonename))
sbin/unwind/libunbound/iterator/iter_scrub.c
1173
if(!scrub_sanitize(pkt, msg, qinfo, zonename, env, ie, qstate))
sbin/unwind/libunbound/iterator/iter_scrub.c
475
struct module_env* env, uint8_t* zonename)
sbin/unwind/libunbound/iterator/iter_scrub.c
496
if((int)rrset->rrsig_count > env->cfg->iter_scrub_rrsig)
sbin/unwind/libunbound/iterator/iter_scrub.c
497
shorten_rrsig(pkt, rrset, env->cfg->iter_scrub_rrsig);
sbin/unwind/libunbound/iterator/iter_scrub.c
498
if(cname_length > env->cfg->iter_scrub_cname) {
sbin/unwind/libunbound/iterator/iter_scrub.c
622
rrset->rr_count > env->cfg->iter_scrub_ns) {
sbin/unwind/libunbound/iterator/iter_scrub.c
623
shorten_rrset(pkt, rrset, env->cfg->iter_scrub_ns);
sbin/unwind/libunbound/iterator/iter_scrub.c
641
rrset->rr_count > env->cfg->iter_scrub_ns) {
sbin/unwind/libunbound/iterator/iter_scrub.c
642
shorten_rrset(pkt, rrset, env->cfg->iter_scrub_ns);
sbin/unwind/libunbound/iterator/iter_scrub.c
667
if(env->cfg->harden_unknown_additional &&
sbin/unwind/libunbound/iterator/iter_scrub.c
673
if((int)rrset->rrsig_count > env->cfg->iter_scrub_rrsig)
sbin/unwind/libunbound/iterator/iter_scrub.c
674
shorten_rrsig(pkt, rrset, env->cfg->iter_scrub_rrsig);
sbin/unwind/libunbound/iterator/iter_scrub.c
707
env->cfg->iter_scrub_promiscuous) {
sbin/unwind/libunbound/iterator/iter_scrub.c
714
&& env->cfg->iter_scrub_promiscuous) {
sbin/unwind/libunbound/iterator/iter_scrub.c
730
&& env->cfg->iter_scrub_promiscuous) {
sbin/unwind/libunbound/iterator/iter_scrub.c
742
if(rrset->rr_count > env->cfg->iter_scrub_ns) {
sbin/unwind/libunbound/iterator/iter_scrub.c
758
shorten_rrset(pkt, rrset, env->cfg->iter_scrub_ns);
sbin/unwind/libunbound/iterator/iter_scrub.c
817
if(env->cfg->harden_unknown_additional &&
sbin/unwind/libunbound/iterator/iter_scrub.c
823
if((int)rrset->rrsig_count > env->cfg->iter_scrub_rrsig)
sbin/unwind/libunbound/iterator/iter_scrub.c
824
shorten_rrsig(pkt, rrset, env->cfg->iter_scrub_rrsig);
sbin/unwind/libunbound/iterator/iter_scrub.c
843
store_rrset(sldns_buffer* pkt, struct msg_parse* msg, struct module_env* env,
sbin/unwind/libunbound/iterator/iter_scrub.c
849
time_t now = *env->now;
sbin/unwind/libunbound/iterator/iter_scrub.c
851
k = alloc_special_obtain(env->alloc);
sbin/unwind/libunbound/iterator/iter_scrub.c
856
alloc_special_release(env->alloc, k);
sbin/unwind/libunbound/iterator/iter_scrub.c
864
(void)rrset_cache_update(env->rrset_cache, &ref, env->alloc, now);
sbin/unwind/libunbound/iterator/iter_scrub.c
975
struct query_info* qinfo, uint8_t* zonename, struct module_env* env,
sbin/unwind/libunbound/iterator/iter_scrub.h
69
struct module_env* env, struct module_qstate* qstate,
sbin/unwind/libunbound/iterator/iter_utils.c
1205
iter_store_parentside_rrset(struct module_env* env,
sbin/unwind/libunbound/iterator/iter_utils.c
1209
rrset = packed_rrset_copy_alloc(rrset, env->alloc, *env->now);
sbin/unwind/libunbound/iterator/iter_utils.c
1219
(void)rrset_cache_update(env->rrset_cache, &ref, env->alloc, *env->now);
sbin/unwind/libunbound/iterator/iter_utils.c
1236
iter_store_parentside_NS(struct module_env* env, struct reply_info* rep)
sbin/unwind/libunbound/iterator/iter_utils.c
1241
iter_store_parentside_rrset(env, rrset);
sbin/unwind/libunbound/iterator/iter_utils.c
1245
void iter_store_parentside_neg(struct module_env* env,
sbin/unwind/libunbound/iterator/iter_utils.c
1260
neg = (struct ub_packed_rrset_key*)regional_alloc(env->scratch,
sbin/unwind/libunbound/iterator/iter_utils.c
1271
neg->rk.dname = regional_alloc_init(env->scratch, qinfo->qname,
sbin/unwind/libunbound/iterator/iter_utils.c
1279
newd = (struct packed_rrset_data*)regional_alloc_zero(env->scratch,
sbin/unwind/libunbound/iterator/iter_utils.c
1301
iter_store_parentside_rrset(env, neg);
sbin/unwind/libunbound/iterator/iter_utils.c
1305
iter_lookup_parent_NS_from_cache(struct module_env* env, struct delegpt* dp,
sbin/unwind/libunbound/iterator/iter_utils.c
1309
akey = rrset_cache_lookup(env->rrset_cache, dp->name,
sbin/unwind/libunbound/iterator/iter_utils.c
1311
PACKED_RRSET_PARENT_SIDE, *env->now, 0);
sbin/unwind/libunbound/iterator/iter_utils.c
1325
int iter_lookup_parent_glue_from_cache(struct module_env* env,
sbin/unwind/libunbound/iterator/iter_utils.c
1336
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
sbin/unwind/libunbound/iterator/iter_utils.c
1338
PACKED_RRSET_PARENT_SIDE, *env->now, 0);
sbin/unwind/libunbound/iterator/iter_utils.c
1348
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
sbin/unwind/libunbound/iterator/iter_utils.c
1350
PACKED_RRSET_PARENT_SIDE, *env->now, 0);
sbin/unwind/libunbound/iterator/iter_utils.c
1558
lock_rw_rdlock(&qstate->env->fwds->lock);
sbin/unwind/libunbound/iterator/iter_utils.c
1559
lock_rw_rdlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iter_utils.c
1560
stub = hints_lookup_stub(qstate->env->hints, qinf->qname,
sbin/unwind/libunbound/iterator/iter_utils.c
1562
dp = forwards_lookup(qstate->env->fwds, qinf->qname, qinf->qclass,
sbin/unwind/libunbound/iterator/iter_utils.c
1579
lock_rw_unlock(&qstate->env->fwds->lock);
sbin/unwind/libunbound/iterator/iter_utils.c
1590
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iter_utils.c
1600
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iter_utils.c
1608
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iter_utils.c
1619
lock_rw_unlock(&qstate->env->fwds->lock);
sbin/unwind/libunbound/iterator/iter_utils.c
1628
lock_rw_unlock(&qstate->env->fwds->lock);
sbin/unwind/libunbound/iterator/iter_utils.c
1631
lock_rw_unlock(&qstate->env->fwds->lock);
sbin/unwind/libunbound/iterator/iter_utils.c
1632
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iter_utils.c
1641
struct module_env* env, struct outside_network* outnet)
sbin/unwind/libunbound/iterator/iter_utils.c
1647
ie = (struct iter_env*)env->modinfo[m];
sbin/unwind/libunbound/iterator/iter_utils.c
303
iter_filter_unsuitable(struct iter_env* iter_env, struct module_env* env,
sbin/unwind/libunbound/iterator/iter_utils.c
358
if(infra_get_lame_rtt(env->infra_cache, &a->addr, a->addrlen,
sbin/unwind/libunbound/iterator/iter_utils.c
397
iter_fill_rtt(struct iter_env* iter_env, struct module_env* env,
sbin/unwind/libunbound/iterator/iter_utils.c
409
a->sel_rtt = iter_filter_unsuitable(iter_env, env,
sbin/unwind/libunbound/iterator/iter_utils.c
476
iter_filter_order(struct iter_env* iter_env, struct module_env* env,
sbin/unwind/libunbound/iterator/iter_utils.c
487
got_num = iter_fill_rtt(iter_env, env, name, namelen, qtype, now, dp,
sbin/unwind/libunbound/iterator/iter_utils.c
501
if(env->cfg->fast_server_permil != 0 && prefetch == 0 &&
sbin/unwind/libunbound/iterator/iter_utils.c
502
num_results > env->cfg->fast_server_num &&
sbin/unwind/libunbound/iterator/iter_utils.c
503
ub_random_max(env->rnd, 1000) < env->cfg->fast_server_permil) {
sbin/unwind/libunbound/iterator/iter_utils.c
508
env->cfg->fast_server_num);
sbin/unwind/libunbound/iterator/iter_utils.c
548
if (env->cfg->prefer_ip6) {
sbin/unwind/libunbound/iterator/iter_utils.c
606
} else if (env->cfg->prefer_ip4) {
sbin/unwind/libunbound/iterator/iter_utils.c
670
struct module_env* env, struct delegpt* dp,
sbin/unwind/libunbound/iterator/iter_utils.c
678
int num = iter_filter_order(iter_env, env, name, namelen, qtype,
sbin/unwind/libunbound/iterator/iter_utils.c
679
*env->now, dp, &selrtt, open_target, blacklist, prefetch);
sbin/unwind/libunbound/iterator/iter_utils.c
722
sel = ub_random_max(env->rnd, num);
sbin/unwind/libunbound/iterator/iter_utils.c
774
iter_dns_store(struct module_env* env, struct query_info* msgqinf,
sbin/unwind/libunbound/iterator/iter_utils.c
779
if(!dns_cache_store(env, msgqinf, msgrep, is_referral, leeway,
sbin/unwind/libunbound/iterator/iter_utils.c
808
qstate->env->detect_cycle));
sbin/unwind/libunbound/iterator/iter_utils.c
809
return (*qstate->env->detect_cycle)(qstate, &qinf,
sbin/unwind/libunbound/iterator/iter_utils.c
916
iter_qname_indicates_dnssec(struct module_env* env, struct query_info *qinfo)
sbin/unwind/libunbound/iterator/iter_utils.c
919
if(!env || !env->anchors || !qinfo || !qinfo->qname)
sbin/unwind/libunbound/iterator/iter_utils.c
922
if((a=anchors_lookup(env->anchors, qinfo->qname, qinfo->qname_len,
sbin/unwind/libunbound/iterator/iter_utils.c
937
iter_indicates_dnssec(struct module_env* env, struct delegpt* dp,
sbin/unwind/libunbound/iterator/iter_utils.c
942
if(!env || !env->anchors || !dp || !dp->name)
sbin/unwind/libunbound/iterator/iter_utils.c
945
if((a=anchor_find(env->anchors, dp->name, dp->namelabs, dp->namelen,
sbin/unwind/libunbound/iterator/iter_utils.c
961
if(env->key_cache) {
sbin/unwind/libunbound/iterator/iter_utils.c
962
struct key_entry_key* kk = key_cache_obtain(env->key_cache,
sbin/unwind/libunbound/iterator/iter_utils.c
963
dp->name, dp->namelen, dclass, env->scratch, *env->now);
sbin/unwind/libunbound/iterator/iter_utils.c
967
regional_free_all(env->scratch);
sbin/unwind/libunbound/iterator/iter_utils.c
970
regional_free_all(env->scratch);
sbin/unwind/libunbound/iterator/iter_utils.c
974
regional_free_all(env->scratch);
sbin/unwind/libunbound/iterator/iter_utils.h
111
struct module_env* env, struct delegpt* dp, uint8_t* name,
sbin/unwind/libunbound/iterator/iter_utils.h
154
void iter_dns_store(struct module_env* env, struct query_info* qinf,
sbin/unwind/libunbound/iterator/iter_utils.h
212
int iter_qname_indicates_dnssec(struct module_env* env,
sbin/unwind/libunbound/iterator/iter_utils.h
225
int iter_indicates_dnssec(struct module_env* env, struct delegpt* dp,
sbin/unwind/libunbound/iterator/iter_utils.h
289
void iter_store_parentside_rrset(struct module_env* env,
sbin/unwind/libunbound/iterator/iter_utils.h
298
void iter_store_parentside_NS(struct module_env* env, struct reply_info* rep);
sbin/unwind/libunbound/iterator/iter_utils.h
308
void iter_store_parentside_neg(struct module_env* env,
sbin/unwind/libunbound/iterator/iter_utils.h
323
int iter_lookup_parent_NS_from_cache(struct module_env* env,
sbin/unwind/libunbound/iterator/iter_utils.h
337
int iter_lookup_parent_glue_from_cache(struct module_env* env,
sbin/unwind/libunbound/iterator/iter_utils.h
433
struct module_env* env, struct outside_network* outnet);
sbin/unwind/libunbound/iterator/iterator.c
1008
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
1019
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
103
if(!iter_apply_cfg(iter_env, env->cfg)) {
sbin/unwind/libunbound/iterator/iterator.c
1040
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
1053
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
1057
qstate->env->kill_sub));
sbin/unwind/libunbound/iterator/iterator.c
1058
(*qstate->env->kill_sub)(subq);
sbin/unwind/libunbound/iterator/iterator.c
1069
qstate->env, subiq->dp, NULL, subq->qinfo.qclass);
sbin/unwind/libunbound/iterator/iterator.c
1071
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
1094
lock_rw_rdlock(&qstate->env->auth_zones->lock);
sbin/unwind/libunbound/iterator/iterator.c
1095
z = auth_zones_find_zone(qstate->env->auth_zones, delname, delnamelen,
sbin/unwind/libunbound/iterator/iterator.c
1098
lock_rw_unlock(&qstate->env->auth_zones->lock);
sbin/unwind/libunbound/iterator/iterator.c
1102
lock_rw_unlock(&qstate->env->auth_zones->lock);
sbin/unwind/libunbound/iterator/iterator.c
112
iter_deinit(struct module_env* env, int id)
sbin/unwind/libunbound/iterator/iterator.c
115
if(!env || !env->modinfo[id])
sbin/unwind/libunbound/iterator/iterator.c
117
iter_env = (struct iter_env*)env->modinfo[id];
sbin/unwind/libunbound/iterator/iterator.c
1183
struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/iterator/iterator.c
1237
struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/iterator/iterator.c
124
env->modinfo[id] = NULL;
sbin/unwind/libunbound/iterator/iterator.c
1243
if(!can_have_last_resort(qstate->env, iq->dp->name, iq->dp->namelen,
sbin/unwind/libunbound/iterator/iterator.c
1277
qstate->env->kill_sub));
sbin/unwind/libunbound/iterator/iterator.c
1278
(*qstate->env->kill_sub)(subq);
sbin/unwind/libunbound/iterator/iterator.c
1320
if(mesh_jostle_exceeded(qstate->env->mesh))
sbin/unwind/libunbound/iterator/iterator.c
1366
dp = forwards_lookup(qstate->env->fwds, delname, iq->qchase.qclass,
sbin/unwind/libunbound/iterator/iterator.c
1372
lock_rw_unlock(&qstate->env->fwds->lock);
sbin/unwind/libunbound/iterator/iterator.c
1446
!can_have_last_resort(qstate->env, iq->dp->name,
sbin/unwind/libunbound/iterator/iterator.c
1457
if(qstate->env->auth_zones) {
sbin/unwind/libunbound/iterator/iterator.c
1502
if(qstate->env->cfg->qname_minimisation)
sbin/unwind/libunbound/iterator/iterator.c
1521
msg = dns_cache_lookup(qstate->env, iq->qchase.qname,
sbin/unwind/libunbound/iterator/iterator.c
1524
qstate->region, qstate->env->scratch, 0, dpname,
sbin/unwind/libunbound/iterator/iterator.c
1526
if(!msg && qstate->env->neg_cache &&
sbin/unwind/libunbound/iterator/iterator.c
1527
iter_qname_indicates_dnssec(qstate->env, &iq->qchase)) {
sbin/unwind/libunbound/iterator/iterator.c
1530
msg = val_neg_getmsg(qstate->env->neg_cache, &iq->qchase,
sbin/unwind/libunbound/iterator/iterator.c
1531
qstate->region, qstate->env->rrset_cache,
sbin/unwind/libunbound/iterator/iterator.c
1532
qstate->env->scratch_buffer,
sbin/unwind/libunbound/iterator/iterator.c
1533
*qstate->env->now, 1/*add SOA*/, NULL,
sbin/unwind/libunbound/iterator/iterator.c
1534
qstate->env->cfg);
sbin/unwind/libunbound/iterator/iterator.c
1576
if(qstate->env->cfg->qname_minimisation)
sbin/unwind/libunbound/iterator/iterator.c
1599
if(!cache_fill_missing(qstate->env, iq->qchase.qclass,
sbin/unwind/libunbound/iterator/iterator.c
163
if (qstate->env->cfg->qname_minimisation)
sbin/unwind/libunbound/iterator/iterator.c
1645
&& can_have_last_resort(qstate->env, delname, delnamelen, iq->qchase.qclass, NULL, NULL, NULL))) {
sbin/unwind/libunbound/iterator/iterator.c
1663
iq->dp = dns_cache_find_delegation(qstate->env, delname,
sbin/unwind/libunbound/iterator/iterator.c
1666
*qstate->env->now+qstate->prefetch_leeway, 1,
sbin/unwind/libunbound/iterator/iterator.c
1688
if(forwards_lookup_root(qstate->env->fwds,
sbin/unwind/libunbound/iterator/iterator.c
1690
lock_rw_unlock(&qstate->env->fwds->lock);
sbin/unwind/libunbound/iterator/iterator.c
1693
iq->dp = hints_find_root(qstate->env->hints,
sbin/unwind/libunbound/iterator/iterator.c
1702
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
1743
if(!can_have_last_resort(qstate->env, iq->dp->name, iq->dp->namelen, iq->qchase.qclass, &have_dp, &iq->dp, qstate->region)) {
sbin/unwind/libunbound/iterator/iterator.c
1771
iq->dp = hints_find_root(qstate->env->hints,
sbin/unwind/libunbound/iterator/iterator.c
1781
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
1846
qstate->env->hints, iq->qchase.qname, iq->qchase.qclass,
sbin/unwind/libunbound/iterator/iterator.c
1854
if(stub) { lock_rw_unlock(&qstate->env->hints->lock); }
sbin/unwind/libunbound/iterator/iterator.c
1896
iq->dnssec_expected = iter_indicates_dnssec(qstate->env, iq->dp,
sbin/unwind/libunbound/iterator/iterator.c
1915
if(iq->dnssec_expected && qstate->env->cfg->prefetch_key &&
sbin/unwind/libunbound/iterator/iterator.c
1919
qstate->env->detach_subs));
sbin/unwind/libunbound/iterator/iterator.c
1920
(*qstate->env->detach_subs)(qstate);
sbin/unwind/libunbound/iterator/iterator.c
1959
qstate->env, subiq->dp, NULL,
sbin/unwind/libunbound/iterator/iterator.c
1963
subiq->dp = dns_cache_find_delegation(qstate->env,
sbin/unwind/libunbound/iterator/iterator.c
1966
*qstate->env->now+subq->prefetch_leeway,
sbin/unwind/libunbound/iterator/iterator.c
1971
qstate->env, subiq->dp, NULL,
sbin/unwind/libunbound/iterator/iterator.c
2076
if(!iter_ns_probability(qstate->env->rnd, toget, missing)) {
sbin/unwind/libunbound/iterator/iterator.c
2102
if(mesh_jostle_exceeded(qstate->env->mesh)) {
sbin/unwind/libunbound/iterator/iterator.c
2127
if(mesh_jostle_exceeded(qstate->env->mesh)) {
sbin/unwind/libunbound/iterator/iterator.c
2171
if(!can_have_last_resort(qstate->env, iq->dp->name, iq->dp->namelen,
sbin/unwind/libunbound/iterator/iterator.c
2182
if(qstate->env->cfg->harden_unverified_glue) {
sbin/unwind/libunbound/iterator/iterator.c
2183
if(!cache_fill_missing(qstate->env, iq->qchase.qclass,
sbin/unwind/libunbound/iterator/iterator.c
2194
dp = hints_find_root(qstate->env->hints,
sbin/unwind/libunbound/iterator/iterator.c
2209
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
2217
if(!iter_lookup_parent_NS_from_cache(qstate->env, iq->dp,
sbin/unwind/libunbound/iterator/iterator.c
2230
if(qstate->env->cfg->qname_minimisation)
sbin/unwind/libunbound/iterator/iterator.c
2236
if(!cache_fill_missing(qstate->env, iq->qchase.qclass,
sbin/unwind/libunbound/iterator/iterator.c
224
struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/iterator/iterator.c
2244
if(iter_lookup_parent_glue_from_cache(qstate->env, iq->dp,
sbin/unwind/libunbound/iterator/iterator.c
2292
!can_have_last_resort(qstate->env, ns->name, ns->namelen,
sbin/unwind/libunbound/iterator/iterator.c
2313
if(mesh_jostle_exceeded(qstate->env->mesh)) {
sbin/unwind/libunbound/iterator/iterator.c
2348
iter_store_parentside_neg(qstate->env, &qstate->qinfo,
sbin/unwind/libunbound/iterator/iterator.c
246
if(!cache_fill_missing(super->env, super_iq->qchase.qclass,
sbin/unwind/libunbound/iterator/iterator.c
2679
struct dns_msg* msg = dns_cache_lookup(qstate->env,
sbin/unwind/libunbound/iterator/iterator.c
2683
qstate->env->scratch, 0, iq->dp->name,
sbin/unwind/libunbound/iterator/iterator.c
2692
qstate->env->need_to_validate &&
sbin/unwind/libunbound/iterator/iterator.c
2693
qstate->env->cfg->harden_below_nxdomain) {
sbin/unwind/libunbound/iterator/iterator.c
2727
else if(!qstate->env->cfg->qname_minimisation_strict)
sbin/unwind/libunbound/iterator/iterator.c
2740
if(auth_zones_can_fallback(qstate->env->auth_zones,
sbin/unwind/libunbound/iterator/iterator.c
2751
} else if(auth_zones_lookup(qstate->env->auth_zones, &iq->qinfo_out,
sbin/unwind/libunbound/iterator/iterator.c
2762
qstate->env->mesh->num_query_authzone_up++;
sbin/unwind/libunbound/iterator/iterator.c
2801
&& !mesh_jostle_exceeded(qstate->env->mesh)) {
sbin/unwind/libunbound/iterator/iterator.c
2873
if(qstate->env->auth_zones) {
sbin/unwind/libunbound/iterator/iterator.c
2908
if(qstate->env->cfg->qname_minimisation)
sbin/unwind/libunbound/iterator/iterator.c
2913
qstate->env->detach_subs));
sbin/unwind/libunbound/iterator/iterator.c
2914
(*qstate->env->detach_subs)(qstate);
sbin/unwind/libunbound/iterator/iterator.c
2934
target = iter_server_selection(ie, qstate->env, iq->dp,
sbin/unwind/libunbound/iterator/iterator.c
3041
&& !ub_random_max(qstate->env->rnd, 10)) {
sbin/unwind/libunbound/iterator/iterator.c
307
if(dns_cache_prefetch_adjust(qstate->env, &qstate->qinfo,
sbin/unwind/libunbound/iterator/iterator.c
3087
fptr_ok(fptr_whitelist_modenv_send_query(qstate->env->send_query));
sbin/unwind/libunbound/iterator/iterator.c
3088
outq = (*qstate->env->send_query)(&iq->qinfo_out,
sbin/unwind/libunbound/iterator/iterator.c
3093
(qstate->env->cfg->disable_edns_do?0:EDNS_DO)|
sbin/unwind/libunbound/iterator/iterator.c
3095
!qstate->blacklist&&(!iter_qname_indicates_dnssec(qstate->env,
sbin/unwind/libunbound/iterator/iterator.c
3100
(iq->dp->tcp_upstream || qstate->env->cfg->tcp_upstream),
sbin/unwind/libunbound/iterator/iterator.c
3101
(iq->dp->ssl_upstream || qstate->env->cfg->ssl_upstream),
sbin/unwind/libunbound/iterator/iterator.c
3116
if(qstate->env->cfg->qname_minimisation)
sbin/unwind/libunbound/iterator/iterator.c
312
if((msg=msg_cache_lookup(qstate->env,
sbin/unwind/libunbound/iterator/iterator.c
316
qstate->env->cfg->serve_expired)) != NULL) {
sbin/unwind/libunbound/iterator/iterator.c
3164
if(!inplace_cb_query_response_call(qstate->env, qstate, iq->response))
sbin/unwind/libunbound/iterator/iterator.c
3169
if(qstate->env->cfg->qname_minimisation) {
sbin/unwind/libunbound/iterator/iterator.c
318
if(qstate->env->cfg->serve_expired && rep) {
sbin/unwind/libunbound/iterator/iterator.c
319
if(qstate->env->cfg->serve_expired_ttl_reset &&
sbin/unwind/libunbound/iterator/iterator.c
320
*qstate->env->now + qstate->env->cfg->serve_expired_ttl
sbin/unwind/libunbound/iterator/iterator.c
3204
if(!qstate->env->cfg->disable_dnssec_lame_check && iq->dnssec_expected
sbin/unwind/libunbound/iterator/iterator.c
324
rep->serve_expired_ttl = *qstate->env->now +
sbin/unwind/libunbound/iterator/iterator.c
325
qstate->env->cfg->serve_expired_ttl;
sbin/unwind/libunbound/iterator/iterator.c
330
*qstate->env->now;
sbin/unwind/libunbound/iterator/iterator.c
3317
qstate->env->detach_subs));
sbin/unwind/libunbound/iterator/iterator.c
3318
(*qstate->env->detach_subs)(qstate);
sbin/unwind/libunbound/iterator/iterator.c
3333
iter_dns_store(qstate->env, &iq->response->qinfo,
sbin/unwind/libunbound/iterator/iterator.c
3344
qstate->env->detach_subs));
sbin/unwind/libunbound/iterator/iterator.c
3345
(*qstate->env->detach_subs)(qstate);
sbin/unwind/libunbound/iterator/iterator.c
3355
if(qstate->env->cfg->qname_minimisation_strict) {
sbin/unwind/libunbound/iterator/iterator.c
338
(qstate->env->cfg->serve_expired ||
sbin/unwind/libunbound/iterator/iterator.c
3383
if(qstate->env->cfg->harden_below_nxdomain &&
sbin/unwind/libunbound/iterator/iterator.c
3384
qstate->env->need_to_validate) {
sbin/unwind/libunbound/iterator/iterator.c
339
*qstate->env->now <= rep->ttl)) {
sbin/unwind/libunbound/iterator/iterator.c
3413
(!qstate->env->cfg->harden_referral_path ||
sbin/unwind/libunbound/iterator/iterator.c
3431
iter_dns_store(qstate->env, &iq->response->qinfo,
sbin/unwind/libunbound/iterator/iterator.c
3435
iter_store_parentside_NS(qstate->env,
sbin/unwind/libunbound/iterator/iterator.c
3437
if(qstate->env->neg_cache)
sbin/unwind/libunbound/iterator/iterator.c
3438
val_neg_addreferral(qstate->env->neg_cache,
sbin/unwind/libunbound/iterator/iterator.c
3450
iter_store_parentside_rrset(qstate->env,
sbin/unwind/libunbound/iterator/iterator.c
3461
if (qstate->env->cfg->qname_minimisation)
sbin/unwind/libunbound/iterator/iterator.c
3476
rrset_cache_remove_above(qstate->env->rrset_cache,
sbin/unwind/libunbound/iterator/iterator.c
3478
iq->qchase.qclass, *qstate->env->now,
sbin/unwind/libunbound/iterator/iterator.c
3481
if(!cache_fill_missing(qstate->env, iq->qchase.qclass,
sbin/unwind/libunbound/iterator/iterator.c
3497
iq->dnssec_expected = iter_indicates_dnssec(qstate->env,
sbin/unwind/libunbound/iterator/iterator.c
3500
if(iq->dnssec_expected && qstate->env->cfg->prefetch_key &&
sbin/unwind/libunbound/iterator/iterator.c
3508
if(qstate->env->cfg->harden_referral_path)
sbin/unwind/libunbound/iterator/iterator.c
3518
qstate->env->detach_subs));
sbin/unwind/libunbound/iterator/iterator.c
3519
(*qstate->env->detach_subs)(qstate);
sbin/unwind/libunbound/iterator/iterator.c
3544
qstate->env->detach_subs));
sbin/unwind/libunbound/iterator/iterator.c
3545
(*qstate->env->detach_subs)(qstate);
sbin/unwind/libunbound/iterator/iterator.c
3569
iter_dns_store(qstate->env, &iq->response->qinfo,
sbin/unwind/libunbound/iterator/iterator.c
3577
if(qstate->env->auth_zones) {
sbin/unwind/libunbound/iterator/iterator.c
361
iter_dns_store(qstate->env, &qstate->qinfo, &err, 0, 0, 0, NULL,
sbin/unwind/libunbound/iterator/iterator.c
3621
if(qstate->env->cfg->qname_minimisation)
sbin/unwind/libunbound/iterator/iterator.c
3631
qstate->env->detach_subs));
sbin/unwind/libunbound/iterator/iterator.c
3632
(*qstate->env->detach_subs)(qstate);
sbin/unwind/libunbound/iterator/iterator.c
3651
if(!infra_set_lame(qstate->env->infra_cache,
sbin/unwind/libunbound/iterator/iterator.c
3655
*qstate->env->now, dnsseclame, 0,
sbin/unwind/libunbound/iterator/iterator.c
3670
if(!infra_set_lame(qstate->env->infra_cache,
sbin/unwind/libunbound/iterator/iterator.c
3674
*qstate->env->now, 0, 1, iq->qchase.qtype))
sbin/unwind/libunbound/iterator/iterator.c
3691
if (qstate->env->cfg->qname_minimisation &&
sbin/unwind/libunbound/iterator/iterator.c
3692
!qstate->env->cfg->qname_minimisation_strict)
sbin/unwind/libunbound/iterator/iterator.c
3697
if(!auth_zones_can_fallback(qstate->env->auth_zones,
sbin/unwind/libunbound/iterator/iterator.c
3803
if(qstate->env->cfg->harden_referral_path) {
sbin/unwind/libunbound/iterator/iterator.c
3839
struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/iterator/iterator.c
4088
while(iter_get_next_root(qstate->env->hints,
sbin/unwind/libunbound/iterator/iterator.c
4089
qstate->env->fwds, &c)) {
sbin/unwind/libunbound/iterator/iterator.c
4141
iter_store_parentside_neg(qstate->env, &qstate->qinfo,
sbin/unwind/libunbound/iterator/iterator.c
4164
if((qstate->env->cfg->val_log_level >= 2 ||
sbin/unwind/libunbound/iterator/iterator.c
4165
qstate->env->cfg->log_servfail) && qstate->errinf &&
sbin/unwind/libunbound/iterator/iterator.c
4166
!qstate->env->cfg->val_log_squelch) {
sbin/unwind/libunbound/iterator/iterator.c
4194
iter_dns_store(qstate->env, &qstate->qinfo,
sbin/unwind/libunbound/iterator/iterator.c
4324
qstate->env->cfg->use_caps_bits_for_id &&
sbin/unwind/libunbound/iterator/iterator.c
4354
prs = (struct msg_parse*)regional_alloc(qstate->env->scratch,
sbin/unwind/libunbound/iterator/iterator.c
4365
if(parse_packet(pkt, prs, qstate->env->scratch) != LDNS_RCODE_NOERROR) {
sbin/unwind/libunbound/iterator/iterator.c
4371
if(parse_extract_edns_from_response_msg(prs, &edns, qstate->env->scratch) !=
sbin/unwind/libunbound/iterator/iterator.c
4388
if(!inplace_cb_edns_back_parsed_call(qstate->env, qstate)) {
sbin/unwind/libunbound/iterator/iterator.c
4398
qstate->env->scratch, qstate->env, qstate, ie)) {
sbin/unwind/libunbound/iterator/iterator.c
4425
if(qstate->env->cfg->aggressive_nsec) {
sbin/unwind/libunbound/iterator/iterator.c
4429
if(qstate->env->cfg->qname_minimisation &&
sbin/unwind/libunbound/iterator/iterator.c
4480
qstate->env->scratch)) {
sbin/unwind/libunbound/iterator/iterator.c
4509
struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/iterator/iterator.c
4572
iter_get_mem(struct module_env* env, int id)
sbin/unwind/libunbound/iterator/iterator.c
4574
struct iter_env* ie = (struct iter_env*)env->modinfo[id];
sbin/unwind/libunbound/iterator/iterator.c
634
if(qstate->env->cfg->val_log_level < 2 && !qstate->env->cfg->log_servfail)
sbin/unwind/libunbound/iterator/iterator.c
686
can_have_last_resort(struct module_env* env, uint8_t* nm, size_t ATTR_UNUSED(nmlen),
sbin/unwind/libunbound/iterator/iterator.c
696
(dp = hints_find(env->hints, nm, qclass, nolock)) &&
sbin/unwind/libunbound/iterator/iterator.c
701
lock_rw_unlock(&env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
706
lock_rw_unlock(&env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
709
if((dp = forwards_find(env->fwds, nm, qclass, nolock)) &&
sbin/unwind/libunbound/iterator/iterator.c
714
lock_rw_unlock(&env->fwds->lock);
sbin/unwind/libunbound/iterator/iterator.c
719
if(dp) { lock_rw_unlock(&env->fwds->lock); }
sbin/unwind/libunbound/iterator/iterator.c
857
qstate->env->add_sub));
sbin/unwind/libunbound/iterator/iterator.c
858
if(!(*qstate->env->add_sub)(qstate, &qinf, NULL,
sbin/unwind/libunbound/iterator/iterator.c
866
qstate->env->attach_sub));
sbin/unwind/libunbound/iterator/iterator.c
867
if(!(*qstate->env->attach_sub)(qstate, &qinf, NULL, qflags,
sbin/unwind/libunbound/iterator/iterator.c
88
iter_init(struct module_env* env, int id)
sbin/unwind/libunbound/iterator/iterator.c
882
qstate->env->kill_sub));
sbin/unwind/libunbound/iterator/iterator.c
883
(*qstate->env->kill_sub)(subq);
sbin/unwind/libunbound/iterator/iterator.c
904
if(qstate->env->cfg->qname_minimisation)
sbin/unwind/libunbound/iterator/iterator.c
931
dp = hints_find_root(qstate->env->hints, qclass, nolock);
sbin/unwind/libunbound/iterator/iterator.c
941
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
952
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
956
qstate->env->kill_sub));
sbin/unwind/libunbound/iterator/iterator.c
957
(*qstate->env->kill_sub)(subq);
sbin/unwind/libunbound/iterator/iterator.c
96
env->modinfo[id] = (void*)iter_env;
sbin/unwind/libunbound/iterator/iterator.c
963
qstate->env, subiq->dp, NULL, subq->qinfo.qclass);
sbin/unwind/libunbound/iterator/iterator.c
965
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
999
stub = hints_lookup_stub(qstate->env->hints, qname, qclass, iq->dp,
sbin/unwind/libunbound/iterator/iterator.h
514
int iter_init(struct module_env* env, int id);
sbin/unwind/libunbound/iterator/iterator.h
517
void iter_deinit(struct module_env* env, int id);
sbin/unwind/libunbound/iterator/iterator.h
540
size_t iter_get_mem(struct module_env* env, int id);
sbin/unwind/libunbound/libunbound/context.c
100
if(!slabhash_is_size(ctx->env->msg_cache, cfg->msg_cache_size,
sbin/unwind/libunbound/libunbound/context.c
102
slabhash_delete(ctx->env->msg_cache);
sbin/unwind/libunbound/libunbound/context.c
103
ctx->env->msg_cache = slabhash_create(cfg->msg_cache_slabs,
sbin/unwind/libunbound/libunbound/context.c
107
if(!ctx->env->msg_cache)
sbin/unwind/libunbound/libunbound/context.c
110
ctx->env->rrset_cache = rrset_cache_adjust(ctx->env->rrset_cache,
sbin/unwind/libunbound/libunbound/context.c
111
ctx->env->cfg, ctx->env->alloc);
sbin/unwind/libunbound/libunbound/context.c
112
if(!ctx->env->rrset_cache)
sbin/unwind/libunbound/libunbound/context.c
114
ctx->env->infra_cache = infra_adjust(ctx->env->infra_cache, cfg);
sbin/unwind/libunbound/libunbound/context.c
115
if(!ctx->env->infra_cache)
sbin/unwind/libunbound/libunbound/context.c
63
struct config_file* cfg = ctx->env->cfg;
sbin/unwind/libunbound/libunbound/context.c
78
if(!modstack_call_startup(&ctx->mods, cfg->module_conf, ctx->env))
sbin/unwind/libunbound/libunbound/context.c
80
if(!modstack_call_init(&ctx->mods, cfg->module_conf, ctx->env))
sbin/unwind/libunbound/libunbound/context.c
83
log_edns_known_options(VERB_ALGO, ctx->env);
sbin/unwind/libunbound/libunbound/context.c
89
if(!auth_zones_apply_cfg(ctx->env->auth_zones, cfg, 1, &is_rpz,
sbin/unwind/libunbound/libunbound/context.c
90
ctx->env, &ctx->mods))
sbin/unwind/libunbound/libunbound/context.c
92
if(!(ctx->env->fwds = forwards_create()) ||
sbin/unwind/libunbound/libunbound/context.c
93
!forwards_apply_cfg(ctx->env->fwds, cfg))
sbin/unwind/libunbound/libunbound/context.c
95
if(!(ctx->env->hints = hints_create()) ||
sbin/unwind/libunbound/libunbound/context.c
96
!hints_apply_cfg(ctx->env->hints, cfg))
sbin/unwind/libunbound/libunbound/context.c
98
if(!edns_strings_apply_cfg(ctx->env->edns_strings, cfg))
sbin/unwind/libunbound/libunbound/context.h
118
struct module_env* env;
sbin/unwind/libunbound/libunbound/libunbound.c
1010
if(!ctx->env->cfg->forwards ||
sbin/unwind/libunbound/libunbound/libunbound.c
1011
(ctx->env->cfg->forwards->name &&
sbin/unwind/libunbound/libunbound/libunbound.c
1012
strcmp(ctx->env->cfg->forwards->name, ".") != 0)) {
sbin/unwind/libunbound/libunbound/libunbound.c
1026
s->next = ctx->env->cfg->forwards;
sbin/unwind/libunbound/libunbound/libunbound.c
1027
ctx->env->cfg->forwards = s;
sbin/unwind/libunbound/libunbound/libunbound.c
1029
log_assert(ctx->env->cfg->forwards);
sbin/unwind/libunbound/libunbound/libunbound.c
1030
log_assert(ctx->env->cfg->forwards->name);
sbin/unwind/libunbound/libunbound/libunbound.c
1031
s = ctx->env->cfg->forwards;
sbin/unwind/libunbound/libunbound/libunbound.c
1056
ctx->env->cfg->ssl_upstream = tls;
sbin/unwind/libunbound/libunbound/libunbound.c
1099
prev = &ctx->env->cfg->stubs;
sbin/unwind/libunbound/libunbound/libunbound.c
1121
elem->next = ctx->env->cfg->stubs;
sbin/unwind/libunbound/libunbound/libunbound.c
1122
ctx->env->cfg->stubs = elem;
sbin/unwind/libunbound/libunbound/libunbound.c
126
ctx->env = (struct module_env*)calloc(1, sizeof(*ctx->env));
sbin/unwind/libunbound/libunbound/libunbound.c
127
if(!ctx->env) {
sbin/unwind/libunbound/libunbound/libunbound.c
1318
if(!cfg_strlist_insert(&ctx->env->cfg->local_data,
sbin/unwind/libunbound/libunbound/libunbound.c
133
ctx->env->cfg = config_create_forlib();
sbin/unwind/libunbound/libunbound/libunbound.c
134
if(!ctx->env->cfg) {
sbin/unwind/libunbound/libunbound/libunbound.c
135
free(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
142
if(!edns_known_options_init(ctx->env)) {
sbin/unwind/libunbound/libunbound/libunbound.c
143
config_delete(ctx->env->cfg);
sbin/unwind/libunbound/libunbound/libunbound.c
144
free(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
150
ctx->env->auth_zones = auth_zones_create();
sbin/unwind/libunbound/libunbound/libunbound.c
151
if(!ctx->env->auth_zones) {
sbin/unwind/libunbound/libunbound/libunbound.c
152
edns_known_options_delete(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
153
config_delete(ctx->env->cfg);
sbin/unwind/libunbound/libunbound/libunbound.c
154
free(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
160
ctx->env->edns_strings = edns_strings_create();
sbin/unwind/libunbound/libunbound/libunbound.c
161
if(!ctx->env->edns_strings) {
sbin/unwind/libunbound/libunbound/libunbound.c
162
auth_zones_delete(ctx->env->auth_zones);
sbin/unwind/libunbound/libunbound/libunbound.c
163
edns_known_options_delete(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
164
config_delete(ctx->env->cfg);
sbin/unwind/libunbound/libunbound/libunbound.c
165
free(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
172
ctx->env->alloc = &ctx->superalloc;
sbin/unwind/libunbound/libunbound/libunbound.c
173
ctx->env->worker = NULL;
sbin/unwind/libunbound/libunbound/libunbound.c
174
ctx->env->need_to_validate = 0;
sbin/unwind/libunbound/libunbound/libunbound.c
176
ctx->env->modstack = &ctx->mods;
sbin/unwind/libunbound/libunbound/libunbound.c
190
config_delete(ctx->env->cfg);
sbin/unwind/libunbound/libunbound/libunbound.c
191
modstack_call_deinit(&ctx->mods, ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
192
modstack_call_destartup(&ctx->mods, ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
195
edns_known_options_delete(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
196
edns_strings_delete(ctx->env->edns_strings);
sbin/unwind/libunbound/libunbound/libunbound.c
197
free(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
206
config_delete(ctx->env->cfg);
sbin/unwind/libunbound/libunbound/libunbound.c
207
modstack_call_deinit(&ctx->mods, ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
208
modstack_call_destartup(&ctx->mods, ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
211
edns_known_options_delete(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
212
edns_strings_delete(ctx->env->edns_strings);
sbin/unwind/libunbound/libunbound/libunbound.c
213
free(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
367
modstack_call_deinit(&ctx->mods, ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
368
modstack_call_destartup(&ctx->mods, ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
384
if(ctx->env) {
sbin/unwind/libunbound/libunbound/libunbound.c
385
slabhash_delete(ctx->env->msg_cache);
sbin/unwind/libunbound/libunbound/libunbound.c
386
rrset_cache_delete(ctx->env->rrset_cache);
sbin/unwind/libunbound/libunbound/libunbound.c
387
infra_delete(ctx->env->infra_cache);
sbin/unwind/libunbound/libunbound/libunbound.c
388
config_delete(ctx->env->cfg);
sbin/unwind/libunbound/libunbound/libunbound.c
389
edns_known_options_delete(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
390
edns_strings_delete(ctx->env->edns_strings);
sbin/unwind/libunbound/libunbound/libunbound.c
391
forwards_delete(ctx->env->fwds);
sbin/unwind/libunbound/libunbound/libunbound.c
392
hints_delete(ctx->env->hints);
sbin/unwind/libunbound/libunbound/libunbound.c
393
auth_zones_delete(ctx->env->auth_zones);
sbin/unwind/libunbound/libunbound/libunbound.c
394
free(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
420
if(!config_set_option(ctx->env->cfg, opt, val)) {
sbin/unwind/libunbound/libunbound/libunbound.c
433
r = config_get_option_collate(ctx->env->cfg, opt, str);
sbin/unwind/libunbound/libunbound/libunbound.c
449
if(!config_read(ctx->env->cfg, fname, NULL)) {
sbin/unwind/libunbound/libunbound/libunbound.c
468
if(!cfg_strlist_insert(&ctx->env->cfg->trust_anchor_list, dup)) {
sbin/unwind/libunbound/libunbound/libunbound.c
487
if(!cfg_strlist_insert(&ctx->env->cfg->trust_anchor_file_list, dup)) {
sbin/unwind/libunbound/libunbound/libunbound.c
505
if(!cfg_strlist_insert(&ctx->env->cfg->auto_trust_anchor_file_list,
sbin/unwind/libunbound/libunbound/libunbound.c
525
if(!cfg_strlist_insert(&ctx->env->cfg->trusted_keys_file_list, dup)) {
sbin/unwind/libunbound/libunbound/libunbound.c
538
ctx->env->cfg->verbosity = d;
sbin/unwind/libunbound/libunbound/libunbound.c
989
if(ctx->env->cfg->forwards &&
sbin/unwind/libunbound/libunbound/libunbound.c
990
(ctx->env->cfg->forwards->name &&
sbin/unwind/libunbound/libunbound/libunbound.c
991
strcmp(ctx->env->cfg->forwards->name, ".") == 0)) {
sbin/unwind/libunbound/libunbound/libunbound.c
992
s = ctx->env->cfg->forwards;
sbin/unwind/libunbound/libunbound/libunbound.c
993
ctx->env->cfg->forwards = s->next;
sbin/unwind/libunbound/libunbound/libworker.c
100
regional_destroy(w->env->scratch);
sbin/unwind/libunbound/libunbound/libworker.c
101
ub_randfree(w->env->rnd);
sbin/unwind/libunbound/libunbound/libworker.c
102
free(w->env);
sbin/unwind/libunbound/libunbound/libworker.c
135
struct config_file* cfg = ctx->env->cfg;
sbin/unwind/libunbound/libunbound/libworker.c
141
w->env = (struct module_env*)malloc(sizeof(*w->env));
sbin/unwind/libunbound/libunbound/libworker.c
142
if(!w->env) {
sbin/unwind/libunbound/libunbound/libworker.c
146
*w->env = *ctx->env;
sbin/unwind/libunbound/libunbound/libworker.c
147
w->env->alloc = context_obtain_alloc(ctx, !w->is_bg || w->is_bg_thread);
sbin/unwind/libunbound/libunbound/libworker.c
148
if(!w->env->alloc) {
sbin/unwind/libunbound/libunbound/libworker.c
152
w->thread_num = w->env->alloc->thread_num;
sbin/unwind/libunbound/libunbound/libworker.c
153
alloc_set_id_cleanup(w->env->alloc, &libworker_alloc_cleanup, w);
sbin/unwind/libunbound/libunbound/libworker.c
157
w->env->scratch = regional_create_custom(cfg->msg_buffer_size);
sbin/unwind/libunbound/libunbound/libworker.c
158
w->env->scratch_buffer = sldns_buffer_new(cfg->msg_buffer_size);
sbin/unwind/libunbound/libunbound/libworker.c
164
sldns_buffer_free(w->env->scratch_buffer);
sbin/unwind/libunbound/libunbound/libworker.c
165
w->env->scratch_buffer = NULL;
sbin/unwind/libunbound/libunbound/libworker.c
171
if(!w->env->scratch || !w->env->scratch_buffer) {
sbin/unwind/libunbound/libunbound/libworker.c
175
w->env->worker = (struct worker*)w;
sbin/unwind/libunbound/libunbound/libworker.c
176
w->env->probe_timer = NULL;
sbin/unwind/libunbound/libunbound/libworker.c
180
if(!(w->env->rnd = ub_initstate(ctx->seed_rnd))) {
sbin/unwind/libunbound/libunbound/libworker.c
200
hash_set_raninit((uint32_t)ub_random(w->env->rnd));
sbin/unwind/libunbound/libunbound/libworker.c
211
w->env->worker_base = w->base;
sbin/unwind/libunbound/libunbound/libworker.c
235
w->env->infra_cache, w->env->rnd, cfg->use_caps_bits_for_id,
sbin/unwind/libunbound/libunbound/libworker.c
242
w->env->outnet = w->back;
sbin/unwind/libunbound/libunbound/libworker.c
251
w->env->mesh = mesh_create(&ctx->mods, w->env);
sbin/unwind/libunbound/libunbound/libworker.c
252
if(!w->env->mesh) {
sbin/unwind/libunbound/libunbound/libworker.c
256
w->env->send_query = &libworker_send_query;
sbin/unwind/libunbound/libunbound/libworker.c
257
w->env->detach_subs = &mesh_detach_subs;
sbin/unwind/libunbound/libunbound/libworker.c
258
w->env->attach_sub = &mesh_attach_sub;
sbin/unwind/libunbound/libunbound/libworker.c
259
w->env->add_sub = &mesh_add_sub;
sbin/unwind/libunbound/libunbound/libworker.c
260
w->env->kill_sub = &mesh_state_delete;
sbin/unwind/libunbound/libunbound/libworker.c
261
w->env->detect_cycle = &mesh_detect_cycle;
sbin/unwind/libunbound/libunbound/libworker.c
262
comm_base_timept(w->base, &w->env->now, &w->env->now_tv);
sbin/unwind/libunbound/libunbound/libworker.c
571
libworker_enter_result(q->res, buf, q->w->env->scratch, s);
sbin/unwind/libunbound/libunbound/libworker.c
632
if(local_zones_answer(ctx->local_zones, w->env, &qinfo, &edns,
sbin/unwind/libunbound/libunbound/libworker.c
633
w->back->udp_buff, w->env->scratch, NULL, NULL, 0, NULL, 0,
sbin/unwind/libunbound/libunbound/libworker.c
635
regional_free_all(w->env->scratch);
sbin/unwind/libunbound/libunbound/libworker.c
642
if(ctx->env->auth_zones && auth_zones_downstream_answer(
sbin/unwind/libunbound/libunbound/libworker.c
643
ctx->env->auth_zones, w->env, &qinfo, &edns, NULL,
sbin/unwind/libunbound/libunbound/libworker.c
644
w->back->udp_buff, w->env->scratch)) {
sbin/unwind/libunbound/libunbound/libworker.c
645
regional_free_all(w->env->scratch);
sbin/unwind/libunbound/libunbound/libworker.c
653
if(!mesh_new_callback(w->env->mesh, &qinfo, qflags, &edns,
sbin/unwind/libunbound/libunbound/libworker.c
713
if(local_zones_answer(ctx->local_zones, w->env, &qinfo, &edns,
sbin/unwind/libunbound/libunbound/libworker.c
714
w->back->udp_buff, w->env->scratch, NULL, NULL, 0, NULL, 0,
sbin/unwind/libunbound/libunbound/libworker.c
716
regional_free_all(w->env->scratch);
sbin/unwind/libunbound/libunbound/libworker.c
722
if(ctx->env->auth_zones && auth_zones_downstream_answer(
sbin/unwind/libunbound/libunbound/libworker.c
723
ctx->env->auth_zones, w->env, &qinfo, &edns, NULL,
sbin/unwind/libunbound/libunbound/libworker.c
724
w->back->udp_buff, w->env->scratch)) {
sbin/unwind/libunbound/libunbound/libworker.c
725
regional_free_all(w->env->scratch);
sbin/unwind/libunbound/libunbound/libworker.c
734
if(!mesh_new_callback(w->env->mesh, &qinfo, qflags, &edns,
sbin/unwind/libunbound/libunbound/libworker.c
814
buf = q->w->env->scratch_buffer;
sbin/unwind/libunbound/libunbound/libworker.c
852
if(local_zones_answer(w->ctx->local_zones, w->env, &qinfo, &edns,
sbin/unwind/libunbound/libunbound/libworker.c
853
w->back->udp_buff, w->env->scratch, NULL, NULL, 0, NULL, 0,
sbin/unwind/libunbound/libunbound/libworker.c
855
regional_free_all(w->env->scratch);
sbin/unwind/libunbound/libunbound/libworker.c
861
if(w->ctx->env->auth_zones && auth_zones_downstream_answer(
sbin/unwind/libunbound/libunbound/libworker.c
862
w->ctx->env->auth_zones, w->env, &qinfo, &edns, NULL,
sbin/unwind/libunbound/libunbound/libworker.c
863
w->back->udp_buff, w->env->scratch)) {
sbin/unwind/libunbound/libunbound/libworker.c
864
regional_free_all(w->env->scratch);
sbin/unwind/libunbound/libunbound/libworker.c
872
if(!mesh_new_callback(w->env->mesh, &qinfo, qflags, &edns,
sbin/unwind/libunbound/libunbound/libworker.c
882
slabhash_clear(&w->env->rrset_cache->table);
sbin/unwind/libunbound/libunbound/libworker.c
883
slabhash_clear(w->env->msg_cache);
sbin/unwind/libunbound/libunbound/libworker.c
893
struct libworker* w = (struct libworker*)q->env->worker;
sbin/unwind/libunbound/libunbound/libworker.c
902
libworker_handle_service_reply, e, w->back->udp_buff, q->env,
sbin/unwind/libunbound/libunbound/libworker.c
915
struct libworker* lw = (struct libworker*)e->qstate->env->worker;
sbin/unwind/libunbound/libunbound/libworker.c
918
mesh_report_reply(lw->env->mesh, e, reply_info, error);
sbin/unwind/libunbound/libunbound/libworker.c
928
mesh_report_reply(lw->env->mesh, e, reply_info,
sbin/unwind/libunbound/libunbound/libworker.c
932
mesh_report_reply(lw->env->mesh, e, reply_info, NETEVENT_NOERROR);
sbin/unwind/libunbound/libunbound/libworker.c
94
if(w->env) {
sbin/unwind/libunbound/libunbound/libworker.c
96
mesh_delete(w->env->mesh);
sbin/unwind/libunbound/libunbound/libworker.c
97
context_release_alloc(w->ctx, w->env->alloc,
sbin/unwind/libunbound/libunbound/libworker.c
99
sldns_buffer_free(w->env->scratch_buffer);
sbin/unwind/libunbound/libunbound/libworker.h
83
struct module_env* env;
sbin/unwind/libunbound/respip/respip.c
1079
fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
sbin/unwind/libunbound/respip/respip.c
1080
return (*qstate->env->attach_sub)(qstate, &subqi,
sbin/unwind/libunbound/respip/respip.c
1118
!(qstate->env->need_to_validate &&
sbin/unwind/libunbound/respip/respip.c
1120
|| qstate->env->cfg->ignore_cd) &&
sbin/unwind/libunbound/respip/respip.c
1132
qstate->region, qstate->env->auth_zones,
sbin/unwind/libunbound/respip/respip.c
1133
&qstate->rpz_passthru, qstate->env->views,
sbin/unwind/libunbound/respip/respip.c
1134
qstate->env->respip_set)) {
sbin/unwind/libunbound/respip/respip.c
1263
super->env->need_to_validate, &new_rep, super->region,
sbin/unwind/libunbound/respip/respip.c
1264
qstate->env->auth_zones, qstate->env->views,
sbin/unwind/libunbound/respip/respip.c
1265
qstate->env->respip_set))
sbin/unwind/libunbound/respip/respip.c
1283
respip_get_mem(struct module_env* env, int id)
sbin/unwind/libunbound/respip/respip.c
1285
(void)env;
sbin/unwind/libunbound/respip/respip.c
558
respip_init(struct module_env* env, int id)
sbin/unwind/libunbound/respip/respip.c
560
(void)env;
sbin/unwind/libunbound/respip/respip.c
566
respip_deinit(struct module_env* env, int id)
sbin/unwind/libunbound/respip/respip.c
568
(void)env;
sbin/unwind/libunbound/respip/respip.h
207
int respip_init(struct module_env* env, int id);
sbin/unwind/libunbound/respip/respip.h
210
void respip_deinit(struct module_env* env, int id);
sbin/unwind/libunbound/respip/respip.h
242
size_t respip_get_mem(struct module_env* env, int id);
sbin/unwind/libunbound/services/authzone.c
100
static void xfr_set_timeout(struct auth_xfer* xfr, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
104
struct module_env* env);
sbin/unwind/libunbound/services/authzone.c
107
static int xfr_start_probe(struct auth_xfer* xfr, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
1764
struct module_env env;
sbin/unwind/libunbound/services/authzone.c
1768
env = *env_for_val;
sbin/unwind/libunbound/services/authzone.c
1769
env.scratch_buffer = sldns_buffer_new(env.cfg->msg_buffer_size);
sbin/unwind/libunbound/services/authzone.c
1770
if(!env.scratch_buffer) {
sbin/unwind/libunbound/services/authzone.c
1774
env.scratch = regional_create();
sbin/unwind/libunbound/services/authzone.c
1775
if(!env.now) {
sbin/unwind/libunbound/services/authzone.c
1776
env.now = &now;
sbin/unwind/libunbound/services/authzone.c
1779
if(!env.scratch) {
sbin/unwind/libunbound/services/authzone.c
1783
auth_zone_verify_zonemd(z, &env, mods, NULL, 1, 0);
sbin/unwind/libunbound/services/authzone.c
1787
sldns_buffer_free(env.scratch_buffer);
sbin/unwind/libunbound/services/authzone.c
1788
regional_destroy(env.scratch);
sbin/unwind/libunbound/services/authzone.c
1794
struct module_env* env, struct module_stack* mods)
sbin/unwind/libunbound/services/authzone.c
1805
if(z->zonefile && z->zonefile[0]!=0 && env)
sbin/unwind/libunbound/services/authzone.c
1806
zonemd_offline_verify(z, env, mods);
sbin/unwind/libunbound/services/authzone.c
1883
struct module_env* env, char** reason)
sbin/unwind/libunbound/services/authzone.c
1895
region = env->scratch;
sbin/unwind/libunbound/services/authzone.c
1897
buf = env->scratch_buffer;
sbin/unwind/libunbound/services/authzone.c
2271
int setup, int* is_rpz, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
2288
if(!auth_zones_read_zones(az, cfg, env, mods))
sbin/unwind/libunbound/services/authzone.c
3541
auth_answer_encode(struct query_info* qinfo, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
3552
if(!inplace_cb_reply_local_call(env, qinfo, NULL, msg->rep,
sbin/unwind/libunbound/services/authzone.c
3553
(int)FLAGS_GET_RCODE(msg->rep->flags), edns, repinfo, temp, env->now_tv)
sbin/unwind/libunbound/services/authzone.c
3567
auth_error_encode(struct query_info* qinfo, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
3576
if(!inplace_cb_reply_local_call(env, qinfo, NULL, NULL,
sbin/unwind/libunbound/services/authzone.c
3577
rcode, edns, repinfo, temp, env->now_tv))
sbin/unwind/libunbound/services/authzone.c
3584
int auth_zones_downstream_answer(struct auth_zones* az, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
3636
env->mesh->num_query_authzone_down++;
sbin/unwind/libunbound/services/authzone.c
3637
auth_error_encode(qinfo, env, edns, repinfo, buf, temp,
sbin/unwind/libunbound/services/authzone.c
3649
env->mesh->num_query_authzone_down++;
sbin/unwind/libunbound/services/authzone.c
3653
auth_error_encode(qinfo, env, edns, repinfo, buf, temp,
sbin/unwind/libunbound/services/authzone.c
3655
else auth_answer_encode(qinfo, env, edns, repinfo, buf, temp, msg);
sbin/unwind/libunbound/services/authzone.c
3836
xfr_process_notify(struct auth_xfer* xfr, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
3846
if(!xfr_start_probe(xfr, env, fromhost)) {
sbin/unwind/libunbound/services/authzone.c
3854
int auth_zones_notify(struct auth_zones* az, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
3882
xfr_process_notify(xfr, env, has_serial, serial, fromhost);
sbin/unwind/libunbound/services/authzone.c
3887
struct module_env* env, uint8_t* nm, size_t nmlen, uint16_t dclass)
sbin/unwind/libunbound/services/authzone.c
3899
xfr_process_notify(xfr, env, 0, 0, NULL);
sbin/unwind/libunbound/services/authzone.c
3905
auth_xfer_set_expired(struct auth_xfer* xfr, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
3916
lock_rw_rdlock(&env->auth_zones->lock);
sbin/unwind/libunbound/services/authzone.c
3917
z = auth_zone_find(env->auth_zones, xfr->name, xfr->namelen,
sbin/unwind/libunbound/services/authzone.c
3920
lock_rw_unlock(&env->auth_zones->lock);
sbin/unwind/libunbound/services/authzone.c
3924
lock_rw_unlock(&env->auth_zones->lock);
sbin/unwind/libunbound/services/authzone.c
4084
xfr_transfer_move_to_next_lookup(struct auth_xfer* xfr, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
4088
if(!xfr->task_transfer->lookup_aaaa && env->cfg->do_ip6) {
sbin/unwind/libunbound/services/authzone.c
4096
if(!env->cfg->do_ip4 && xfr->task_transfer->lookup_target!=NULL)
sbin/unwind/libunbound/services/authzone.c
4115
xfr_probe_move_to_next_lookup(struct auth_xfer* xfr, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
4119
if(!xfr->task_probe->lookup_aaaa && env->cfg->do_ip6) {
sbin/unwind/libunbound/services/authzone.c
4126
if(!env->cfg->do_ip4 && xfr->task_probe->lookup_target!=NULL)
sbin/unwind/libunbound/services/authzone.c
5249
xfr_write_after_update(struct auth_xfer* xfr, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
5251
struct config_file* cfg = env->cfg;
sbin/unwind/libunbound/services/authzone.c
5259
lock_rw_rdlock(&env->auth_zones->lock);
sbin/unwind/libunbound/services/authzone.c
5260
z = auth_zone_find(env->auth_zones, xfr->name, xfr->namelen,
sbin/unwind/libunbound/services/authzone.c
5263
lock_rw_unlock(&env->auth_zones->lock);
sbin/unwind/libunbound/services/authzone.c
5270
lock_rw_unlock(&env->auth_zones->lock);
sbin/unwind/libunbound/services/authzone.c
5324
struct module_env* env, struct auth_zone** z)
sbin/unwind/libunbound/services/authzone.c
5328
lock_rw_rdlock(&env->auth_zones->lock);
sbin/unwind/libunbound/services/authzone.c
5329
*z = auth_zone_find(env->auth_zones, xfr->name, xfr->namelen,
sbin/unwind/libunbound/services/authzone.c
5332
lock_rw_unlock(&env->auth_zones->lock);
sbin/unwind/libunbound/services/authzone.c
5339
lock_rw_unlock(&env->auth_zones->lock);
sbin/unwind/libunbound/services/authzone.c
5346
xfr_process_chunk_list(struct auth_xfer* xfr, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
5353
if(!xfr_process_reacquire_locks(xfr, env, &z)) {
sbin/unwind/libunbound/services/authzone.c
5361
if(!apply_http(xfr, z, env->scratch_buffer)) {
sbin/unwind/libunbound/services/authzone.c
5369
if(!apply_ixfr(xfr, z, env->scratch_buffer)) {
sbin/unwind/libunbound/services/authzone.c
5377
if(!apply_axfr(xfr, z, env->scratch_buffer)) {
sbin/unwind/libunbound/services/authzone.c
5392
z->soa_zone_acquired = *env->now;
sbin/unwind/libunbound/services/authzone.c
5393
xfr->soa_zone_acquired = *env->now;
sbin/unwind/libunbound/services/authzone.c
5399
auth_zone_verify_zonemd(z, env, &env->mesh->mods, NULL, 0, 0);
sbin/unwind/libunbound/services/authzone.c
5407
if(!xfr_process_reacquire_locks(xfr, env, &z))
sbin/unwind/libunbound/services/authzone.c
5419
if(!xfr_process_reacquire_locks(xfr, env, &z))
sbin/unwind/libunbound/services/authzone.c
5424
xfr->lease_time = *env->now;
sbin/unwind/libunbound/services/authzone.c
5439
xfr_write_after_update(xfr, env);
sbin/unwind/libunbound/services/authzone.c
5455
xfr->task_transfer->env = NULL;
sbin/unwind/libunbound/services/authzone.c
5460
xfr_transfer_lookup_host(struct auth_xfer* xfr, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
5469
sldns_buffer* buf = env->scratch_buffer;
sbin/unwind/libunbound/services/authzone.c
5518
if(!mesh_new_callback(env->mesh, &qinfo, qflags, &edns, buf, 0,
sbin/unwind/libunbound/services/authzone.c
5531
xfr_transfer_init_fetch(struct auth_xfer* xfr, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
5565
xfr->task_transfer->timer = comm_timer_create(env->worker_base,
sbin/unwind/libunbound/services/authzone.c
5586
env->outnet, auth_xfer_transfer_http_callback, xfr,
sbin/unwind/libunbound/services/authzone.c
5588
master->file, env->cfg);
sbin/unwind/libunbound/services/authzone.c
5612
xfr->task_transfer->id = GET_RANDOM_ID(env->rnd);
sbin/unwind/libunbound/services/authzone.c
5613
xfr_create_ixfr_packet(xfr, env->scratch_buffer,
sbin/unwind/libunbound/services/authzone.c
5617
xfr->task_transfer->cp = outnet_comm_point_for_tcp(env->outnet,
sbin/unwind/libunbound/services/authzone.c
5619
env->scratch_buffer, -1,
sbin/unwind/libunbound/services/authzone.c
5642
xfr_transfer_nexttarget_or_end(struct auth_xfer* xfr, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
5644
log_assert(xfr->task_transfer->worker == env->worker);
sbin/unwind/libunbound/services/authzone.c
5648
if(xfr_transfer_lookup_host(xfr, env)) {
sbin/unwind/libunbound/services/authzone.c
5662
xfr_transfer_move_to_next_lookup(xfr, env);
sbin/unwind/libunbound/services/authzone.c
5669
if(xfr_transfer_init_fetch(xfr, env)) {
sbin/unwind/libunbound/services/authzone.c
5689
xfr_set_timeout(xfr, env, 1, 0);
sbin/unwind/libunbound/services/authzone.c
5751
struct module_env* env;
sbin/unwind/libunbound/services/authzone.c
5754
env = xfr->task_transfer->env;
sbin/unwind/libunbound/services/authzone.c
5755
if(!env || env->outnet->want_to_quit) {
sbin/unwind/libunbound/services/authzone.c
5772
struct regional* temp = env->scratch;
sbin/unwind/libunbound/services/authzone.c
5815
xfr_transfer_move_to_next_lookup(xfr, env);
sbin/unwind/libunbound/services/authzone.c
5816
xfr_transfer_nexttarget_or_end(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6145
process_list_end_transfer(struct auth_xfer* xfr, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
6148
if(xfr_process_chunk_list(xfr, env, &ixfr_fail)) {
sbin/unwind/libunbound/services/authzone.c
6165
if(!xfr_start_probe(xfr, env, NULL)) {
sbin/unwind/libunbound/services/authzone.c
6178
xfr_set_timeout(xfr, env, 0, 0);
sbin/unwind/libunbound/services/authzone.c
6191
xfr_transfer_nexttarget_or_end(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6199
struct module_env* env;
sbin/unwind/libunbound/services/authzone.c
6203
env = xfr->task_transfer->env;
sbin/unwind/libunbound/services/authzone.c
6204
if(!env || env->outnet->want_to_quit) {
sbin/unwind/libunbound/services/authzone.c
6231
xfr_transfer_nexttarget_or_end(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6240
struct module_env* env;
sbin/unwind/libunbound/services/authzone.c
6245
env = xfr->task_transfer->env;
sbin/unwind/libunbound/services/authzone.c
6246
if(!env || env->outnet->want_to_quit) {
sbin/unwind/libunbound/services/authzone.c
6280
xfr_transfer_nexttarget_or_end(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6304
process_list_end_transfer(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6323
struct module_env* env;
sbin/unwind/libunbound/services/authzone.c
6326
env = xfr->task_transfer->env;
sbin/unwind/libunbound/services/authzone.c
6327
if(!env || env->outnet->want_to_quit) {
sbin/unwind/libunbound/services/authzone.c
6349
xfr_transfer_nexttarget_or_end(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6370
process_list_end_transfer(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6386
xfr_start_transfer(struct auth_xfer* xfr, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
6393
xfr->task_transfer->worker = env->worker;
sbin/unwind/libunbound/services/authzone.c
6394
xfr->task_transfer->env = env;
sbin/unwind/libunbound/services/authzone.c
6403
xfr_transfer_nexttarget_or_end(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6418
xfr->task_probe->env = NULL;
sbin/unwind/libunbound/services/authzone.c
6423
xfr_probe_send_probe(struct auth_xfer* xfr, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
6455
== env->cfg->ssl_port)
sbin/unwind/libunbound/services/authzone.c
6457
= htons((uint16_t)env->cfg->port);
sbin/unwind/libunbound/services/authzone.c
6460
== env->cfg->ssl_port)
sbin/unwind/libunbound/services/authzone.c
6462
= htons((uint16_t)env->cfg->port);
sbin/unwind/libunbound/services/authzone.c
6470
xfr->task_probe->id = GET_RANDOM_ID(env->rnd);
sbin/unwind/libunbound/services/authzone.c
6471
xfr_create_soa_probe_packet(xfr, env->scratch_buffer,
sbin/unwind/libunbound/services/authzone.c
6485
xfr->task_probe->cp = outnet_comm_point_for_udp(env->outnet,
sbin/unwind/libunbound/services/authzone.c
6497
xfr->task_probe->timer = comm_timer_create(env->worker_base,
sbin/unwind/libunbound/services/authzone.c
6506
if(!comm_point_send_udp_msg(xfr->task_probe->cp, env->scratch_buffer,
sbin/unwind/libunbound/services/authzone.c
6537
struct module_env* env;
sbin/unwind/libunbound/services/authzone.c
6540
env = xfr->task_probe->env;
sbin/unwind/libunbound/services/authzone.c
6541
if(!env || env->outnet->want_to_quit) {
sbin/unwind/libunbound/services/authzone.c
6553
if(xfr_probe_send_probe(xfr, env, xfr->task_probe->timeout*2)) {
sbin/unwind/libunbound/services/authzone.c
6564
xfr_probe_send_or_end(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6573
struct module_env* env;
sbin/unwind/libunbound/services/authzone.c
6576
env = xfr->task_probe->env;
sbin/unwind/libunbound/services/authzone.c
6577
if(!env || env->outnet->want_to_quit) {
sbin/unwind/libunbound/services/authzone.c
6615
xfr_start_transfer(xfr, env, master);
sbin/unwind/libunbound/services/authzone.c
6655
xfr_probe_send_or_end(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6661
xfr_probe_lookup_host(struct auth_xfer* xfr, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
6670
sldns_buffer* buf = env->scratch_buffer;
sbin/unwind/libunbound/services/authzone.c
6721
if(!mesh_new_callback(env->mesh, &qinfo, qflags, &edns, buf, 0,
sbin/unwind/libunbound/services/authzone.c
6745
xfr_probe_send_or_end(struct auth_xfer* xfr, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
6749
if(xfr_probe_lookup_host(xfr, env)) {
sbin/unwind/libunbound/services/authzone.c
6763
xfr_probe_move_to_next_lookup(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6785
xfr_start_transfer(xfr, env, NULL);
sbin/unwind/libunbound/services/authzone.c
6793
xfr_set_timeout(xfr, env, 0, 0);
sbin/unwind/libunbound/services/authzone.c
6800
if(xfr_probe_send_probe(xfr, env, AUTH_PROBE_TIMEOUT)) {
sbin/unwind/libunbound/services/authzone.c
6819
xfr->lease_time = *env->now;
sbin/unwind/libunbound/services/authzone.c
6821
xfr_set_timeout(xfr, env, 0, 0);
sbin/unwind/libunbound/services/authzone.c
6833
xfr_set_timeout(xfr, env, 1, 0);
sbin/unwind/libunbound/services/authzone.c
6844
struct module_env* env;
sbin/unwind/libunbound/services/authzone.c
6847
env = xfr->task_probe->env;
sbin/unwind/libunbound/services/authzone.c
6848
if(!env || env->outnet->want_to_quit) {
sbin/unwind/libunbound/services/authzone.c
6865
struct regional* temp = env->scratch;
sbin/unwind/libunbound/services/authzone.c
6908
xfr_probe_move_to_next_lookup(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6909
xfr_probe_send_or_end(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6923
xfr->task_nextprobe->env = NULL;
sbin/unwind/libunbound/services/authzone.c
6931
struct module_env* env;
sbin/unwind/libunbound/services/authzone.c
6934
env = xfr->task_nextprobe->env;
sbin/unwind/libunbound/services/authzone.c
6935
if(!env || env->outnet->want_to_quit) {
sbin/unwind/libunbound/services/authzone.c
6942
*env->now >= xfr->lease_time + xfr->expiry) {
sbin/unwind/libunbound/services/authzone.c
6944
auth_xfer_set_expired(xfr, env, 1);
sbin/unwind/libunbound/services/authzone.c
6950
if(!xfr_start_probe(xfr, env, NULL)) {
sbin/unwind/libunbound/services/authzone.c
6960
xfr_start_probe(struct auth_xfer* xfr, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
6974
xfr_start_transfer(xfr, env, spec);
sbin/unwind/libunbound/services/authzone.c
6982
xfr->task_probe->worker = env->worker;
sbin/unwind/libunbound/services/authzone.c
6983
xfr->task_probe->env = env;
sbin/unwind/libunbound/services/authzone.c
6996
xfr_probe_send_or_end(xfr, env);
sbin/unwind/libunbound/services/authzone.c
7010
xfr_set_timeout(struct auth_xfer* xfr, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
7016
xfr->task_nextprobe->worker == env->worker);
sbin/unwind/libunbound/services/authzone.c
7020
xfr->task_nextprobe->next_probe = *env->now;
sbin/unwind/libunbound/services/authzone.c
7047
xfr->lease_time+xfr->expiry > *env->now)
sbin/unwind/libunbound/services/authzone.c
7057
env->worker_base, auth_xfer_timer, xfr);
sbin/unwind/libunbound/services/authzone.c
7068
xfr->task_nextprobe->worker = env->worker;
sbin/unwind/libunbound/services/authzone.c
7069
xfr->task_nextprobe->env = env;
sbin/unwind/libunbound/services/authzone.c
7070
if(*(xfr->task_nextprobe->env->now) <= xfr->task_nextprobe->next_probe)
sbin/unwind/libunbound/services/authzone.c
7072
*(xfr->task_nextprobe->env->now);
sbin/unwind/libunbound/services/authzone.c
7091
void auth_zone_pickup_initial_zone(struct auth_zone* z, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
7096
z->soa_zone_acquired = *env->now;
sbin/unwind/libunbound/services/authzone.c
7099
void auth_xfer_pickup_initial_zone(struct auth_xfer* x, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
7105
x->lease_time = *env->now;
sbin/unwind/libunbound/services/authzone.c
7106
x->soa_zone_acquired = *env->now;
sbin/unwind/libunbound/services/authzone.c
7109
xfr_set_timeout(x, env, 0, 1);
sbin/unwind/libunbound/services/authzone.c
7115
auth_xfer_pickup_initial(struct auth_zones* az, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
7122
auth_zone_pickup_initial_zone(z, env);
sbin/unwind/libunbound/services/authzone.c
7127
auth_xfer_pickup_initial_zone(x, env);
sbin/unwind/libunbound/services/authzone.c
7902
struct module_env* env, struct module_stack* mods,
sbin/unwind/libunbound/services/authzone.c
7918
ve = (struct val_env*)env->modinfo[m];
sbin/unwind/libunbound/services/authzone.c
7934
sec = dnskeyset_verify_rrset(env, ve, &pk, dnskey, sigalg, why_bogus, NULL,
sbin/unwind/libunbound/services/authzone.c
7976
struct module_env* env, struct module_stack* mods,
sbin/unwind/libunbound/services/authzone.c
7990
if(!zonemd_dnssec_verify_rrset(z, env, mods, dnskey, apex,
sbin/unwind/libunbound/services/authzone.c
8033
if(!zonemd_dnssec_verify_rrset(z, env, mods, dnskey, match,
sbin/unwind/libunbound/services/authzone.c
8053
struct module_env* env, struct module_stack* mods,
sbin/unwind/libunbound/services/authzone.c
8068
if(!zonemd_dnssec_verify_rrset(z, env, mods, dnskey, apex, soa,
sbin/unwind/libunbound/services/authzone.c
8073
if(!zonemd_dnssec_verify_rrset(z, env, mods, dnskey, apex,
sbin/unwind/libunbound/services/authzone.c
8090
static void auth_zone_zonemd_fail(struct auth_zone* z, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
8112
if(env->cfg->zonemd_permissive_mode) {
sbin/unwind/libunbound/services/authzone.c
8138
auth_zone_verify_zonemd_with_key(struct auth_zone* z, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
8166
auth_zone_zonemd_fail(z, env, "DNSKEY missing", NULL, result);
sbin/unwind/libunbound/services/authzone.c
8170
if(!zonemd_check_dnssec_absence(z, env, mods, dnskey, apex,
sbin/unwind/libunbound/services/authzone.c
8173
auth_zone_zonemd_fail(z, env, reason, why_bogus, result);
sbin/unwind/libunbound/services/authzone.c
8179
if(!zonemd_check_dnssec_soazonemd(z, env, mods, dnskey, apex,
sbin/unwind/libunbound/services/authzone.c
8182
auth_zone_zonemd_fail(z, env, reason, why_bogus, result);
sbin/unwind/libunbound/services/authzone.c
8188
auth_zone_zonemd_fail(z, env, "ZONEMD absent and that is not allowed by config", NULL, result);
sbin/unwind/libunbound/services/authzone.c
8209
if(!auth_zone_zonemd_check_hash(z, env, &reason)) {
sbin/unwind/libunbound/services/authzone.c
8210
auth_zone_zonemd_fail(z, env, reason, NULL, result);
sbin/unwind/libunbound/services/authzone.c
8244
zonemd_get_dnskey_from_anchor(struct auth_zone* z, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
8272
ve = (struct val_env*)env->modinfo[m];
sbin/unwind/libunbound/services/authzone.c
8283
sec = val_verify_DNSKEY_with_TA(env, ve, keystorage, anchor->ds_rrset,
sbin/unwind/libunbound/services/authzone.c
8286
regional_free_all(env->scratch);
sbin/unwind/libunbound/services/authzone.c
8306
struct module_env* env, struct module_stack* mods,
sbin/unwind/libunbound/services/authzone.c
8334
ve = (struct val_env*)env->modinfo[m];
sbin/unwind/libunbound/services/authzone.c
8344
sec = val_verify_DNSKEY_with_DS(env, ve, keystorage, ds, sigalg,
sbin/unwind/libunbound/services/authzone.c
8346
regional_free_all(env->scratch);
sbin/unwind/libunbound/services/authzone.c
8370
struct module_env* env;
sbin/unwind/libunbound/services/authzone.c
8379
env = z->zonemd_callback_env;
sbin/unwind/libunbound/services/authzone.c
8383
if(!env || env->outnet->want_to_quit || z->zone_deleted) {
sbin/unwind/libunbound/services/authzone.c
8389
downprot = env->cfg->harden_algo_downgrade;
sbin/unwind/libunbound/services/authzone.c
8403
struct regional* temp = env->scratch;
sbin/unwind/libunbound/services/authzone.c
8481
dnskey = auth_zone_verify_zonemd_key_with_ds(z, env,
sbin/unwind/libunbound/services/authzone.c
8482
&env->mesh->mods, ds, &is_insecure, &ds_bogus,
sbin/unwind/libunbound/services/authzone.c
8490
auth_zone_zonemd_fail(z, env, reason, ds_bogus, NULL);
sbin/unwind/libunbound/services/authzone.c
8492
regional_free_all(env->scratch);
sbin/unwind/libunbound/services/authzone.c
8496
auth_zone_verify_zonemd_with_key(z, env, &env->mesh->mods, dnskey,
sbin/unwind/libunbound/services/authzone.c
8498
regional_free_all(env->scratch);
sbin/unwind/libunbound/services/authzone.c
8504
zonemd_lookup_dnskey(struct auth_zone* z, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
8509
sldns_buffer* buf = env->scratch_buffer;
sbin/unwind/libunbound/services/authzone.c
8559
z->zonemd_callback_env = env;
sbin/unwind/libunbound/services/authzone.c
8563
if(!mesh_new_callback(env->mesh, &qinfo, qflags, &edns, buf, 0,
sbin/unwind/libunbound/services/authzone.c
8574
void auth_zone_verify_zonemd(struct auth_zone* z, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
8595
if(env->anchors)
sbin/unwind/libunbound/services/authzone.c
8596
anchor = anchors_lookup(env->anchors, z->name, z->namelen,
sbin/unwind/libunbound/services/authzone.c
8611
dnskey = zonemd_get_dnskey_from_anchor(z, env, mods, anchor,
sbin/unwind/libunbound/services/authzone.c
8624
if(zonemd_lookup_dnskey(z, env)) {
sbin/unwind/libunbound/services/authzone.c
8638
auth_zone_zonemd_fail(z, env, reason, why_bogus, result);
sbin/unwind/libunbound/services/authzone.c
8639
regional_free_all(env->scratch);
sbin/unwind/libunbound/services/authzone.c
8643
auth_zone_verify_zonemd_with_key(z, env, mods, dnskey, is_insecure,
sbin/unwind/libunbound/services/authzone.c
8645
regional_free_all(env->scratch);
sbin/unwind/libunbound/services/authzone.c
8649
struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
8673
auth_zone_verify_zonemd(z, env, &env->mesh->mods, NULL, 0, 1);
sbin/unwind/libunbound/services/authzone.h
301
struct module_env* env;
sbin/unwind/libunbound/services/authzone.h
327
struct module_env* env;
sbin/unwind/libunbound/services/authzone.h
375
struct module_env* env;
sbin/unwind/libunbound/services/authzone.h
496
int setup, int* is_rpz, struct module_env* env,
sbin/unwind/libunbound/services/authzone.h
504
void auth_xfer_pickup_initial(struct auth_zones* az, struct module_env* env);
sbin/unwind/libunbound/services/authzone.h
557
int auth_zones_downstream_answer(struct auth_zones* az, struct module_env* env,
sbin/unwind/libunbound/services/authzone.h
625
int auth_zones_notify(struct auth_zones* az, struct module_env* env,
sbin/unwind/libunbound/services/authzone.h
638
struct module_env* env, uint8_t* nm, size_t nmlen, uint16_t dclass);
sbin/unwind/libunbound/services/authzone.h
775
void auth_zone_verify_zonemd(struct auth_zone* z, struct module_env* env,
sbin/unwind/libunbound/services/authzone.h
792
struct module_env* env);
sbin/unwind/libunbound/services/authzone.h
805
struct module_env* env);
sbin/unwind/libunbound/services/authzone.h
813
struct module_env* env);
sbin/unwind/libunbound/services/cache/dns.c
1002
env->rrset_cache, qname, qnamelen,
sbin/unwind/libunbound/services/cache/dns.c
1019
(rrset=rrset_cache_lookup(env->rrset_cache, qname, qnamelen,
sbin/unwind/libunbound/services/cache/dns.c
1038
(rrset=rrset_cache_lookup(env->rrset_cache, qname, qnamelen,
sbin/unwind/libunbound/services/cache/dns.c
1067
if(env->cfg->harden_below_nxdomain) {
sbin/unwind/libunbound/services/cache/dns.c
1074
e = slabhash_lookup(env->msg_cache, h, &k, 0);
sbin/unwind/libunbound/services/cache/dns.c
1076
env->cfg->qname_minimisation) {
sbin/unwind/libunbound/services/cache/dns.c
1079
e = slabhash_lookup(env->msg_cache, h, &k, 0);
sbin/unwind/libunbound/services/cache/dns.c
1088
&& (msg=tomsg(env, &k, data, region, now, 0, scratch))) {
sbin/unwind/libunbound/services/cache/dns.c
1105
return fill_any(env, qname, qnamelen, qtype, qclass, region);
sbin/unwind/libunbound/services/cache/dns.c
1112
dns_cache_store(struct module_env* env, struct query_info* msgqinf,
sbin/unwind/libunbound/services/cache/dns.c
1121
struct msgreply_entry* e = msg_cache_lookup(env,
sbin/unwind/libunbound/services/cache/dns.c
1126
if(TTL_IS_EXPIRED(cached->ttl, *env->now)
sbin/unwind/libunbound/services/cache/dns.c
1127
&& reply_info_could_use_expired(cached, *env->now)
sbin/unwind/libunbound/services/cache/dns.c
1136
&& (env->need_to_validate &&
sbin/unwind/libunbound/services/cache/dns.c
1159
NORR_TTL + *env->now;
sbin/unwind/libunbound/services/cache/dns.c
1160
if(env->cfg->serve_expired_ttl_reset &&
sbin/unwind/libunbound/services/cache/dns.c
1162
< *env->now +
sbin/unwind/libunbound/services/cache/dns.c
1163
env->cfg->serve_expired_ttl) {
sbin/unwind/libunbound/services/cache/dns.c
1170
*env->now +
sbin/unwind/libunbound/services/cache/dns.c
1171
env->cfg->serve_expired_ttl;
sbin/unwind/libunbound/services/cache/dns.c
1184
rep = reply_info_copy(msgrep, env->alloc, NULL);
sbin/unwind/libunbound/services/cache/dns.c
1196
rep->rrsets[i]->entry.data, *env->now);
sbin/unwind/libunbound/services/cache/dns.c
1201
(void)rrset_cache_update(env->rrset_cache, &ref,
sbin/unwind/libunbound/services/cache/dns.c
1202
env->alloc,
sbin/unwind/libunbound/services/cache/dns.c
1204
&& !pside) ? qstarttime:*env->now + leeway));
sbin/unwind/libunbound/services/cache/dns.c
1216
reply_info_parsedelete(rep, env->alloc);
sbin/unwind/libunbound/services/cache/dns.c
1225
dns_cache_store_msg(env, &qinf, h, rep, leeway, pside, msgrep,
sbin/unwind/libunbound/services/cache/dns.c
1235
dns_cache_prefetch_adjust(struct module_env* env, struct query_info* qinfo,
sbin/unwind/libunbound/services/cache/dns.c
1239
msg = msg_cache_lookup(env, qinfo->qname, qinfo->qname_len,
sbin/unwind/libunbound/services/cache/dns.c
1240
qinfo->qtype, qinfo->qclass, flags, *env->now, 1);
sbin/unwind/libunbound/services/cache/dns.c
148
msg_cache_remove(struct module_env* env, uint8_t* qname, size_t qnamelen,
sbin/unwind/libunbound/services/cache/dns.c
160
slabhash_remove(env->msg_cache, h, &k);
sbin/unwind/libunbound/services/cache/dns.c
164
dns_cache_store_msg(struct module_env* env, struct query_info* qinfo,
sbin/unwind/libunbound/services/cache/dns.c
182
reply_info_absolute_ttls(rep, *env->now, *env->now - ttl);
sbin/unwind/libunbound/services/cache/dns.c
183
} else reply_info_set_ttls(rep, *env->now);
sbin/unwind/libunbound/services/cache/dns.c
184
store_rrsets(env, rep, *env->now, leeway, pside, qrep, region,
sbin/unwind/libunbound/services/cache/dns.c
202
msg_cache_remove(env, qinfo->qname, qinfo->qname_len,
sbin/unwind/libunbound/services/cache/dns.c
214
slabhash_insert(env->msg_cache, hash, &e->entry, rep, env->alloc);
sbin/unwind/libunbound/services/cache/dns.c
219
find_closest_of_type(struct module_env* env, uint8_t* qname, size_t qnamelen,
sbin/unwind/libunbound/services/cache/dns.c
235
rrset = rrset_cache_lookup(env->rrset_cache, qname,
sbin/unwind/libunbound/services/cache/dns.c
240
rrset = rrset_cache_lookup(env->rrset_cache, qname,
sbin/unwind/libunbound/services/cache/dns.c
261
if(!rrset_cache_expired_above(env->rrset_cache, &qname,
sbin/unwind/libunbound/services/cache/dns.c
268
if((rrset = rrset_cache_lookup(env->
sbin/unwind/libunbound/services/cache/dns.c
304
msg_cache_lookup(struct module_env* env, uint8_t* qname, size_t qnamelen,
sbin/unwind/libunbound/services/cache/dns.c
317
e = slabhash_lookup(env->msg_cache, h, &k, wr);
sbin/unwind/libunbound/services/cache/dns.c
329
find_add_addrs(struct module_env* env, uint16_t qclass,
sbin/unwind/libunbound/services/cache/dns.c
337
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
sbin/unwind/libunbound/services/cache/dns.c
350
neg = msg_cache_lookup(env, ns->name, ns->namelen,
sbin/unwind/libunbound/services/cache/dns.c
357
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
sbin/unwind/libunbound/services/cache/dns.c
370
neg = msg_cache_lookup(env, ns->name, ns->namelen,
sbin/unwind/libunbound/services/cache/dns.c
377
neg = msg_cache_lookup(env, ns->name, ns->namelen,
sbin/unwind/libunbound/services/cache/dns.c
390
cache_fill_missing(struct module_env* env, uint16_t qclass,
sbin/unwind/libunbound/services/cache/dns.c
396
time_t now = *env->now;
sbin/unwind/libunbound/services/cache/dns.c
401
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
sbin/unwind/libunbound/services/cache/dns.c
415
neg = msg_cache_lookup(env, ns->name, ns->namelen,
sbin/unwind/libunbound/services/cache/dns.c
422
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
sbin/unwind/libunbound/services/cache/dns.c
436
neg = msg_cache_lookup(env, ns->name, ns->namelen,
sbin/unwind/libunbound/services/cache/dns.c
443
neg = msg_cache_lookup(env, ns->name, ns->namelen,
sbin/unwind/libunbound/services/cache/dns.c
456
find_add_ds(struct module_env* env, struct regional* region,
sbin/unwind/libunbound/services/cache/dns.c
461
env->rrset_cache, dp->name, dp->namelen, LDNS_RR_TYPE_DS,
sbin/unwind/libunbound/services/cache/dns.c
466
rrset = rrset_cache_lookup(env->rrset_cache, dp->name,
sbin/unwind/libunbound/services/cache/dns.c
552
dns_cache_find_delegation(struct module_env* env, uint8_t* qname,
sbin/unwind/libunbound/services/cache/dns.c
562
nskey = find_closest_of_type(env, qname, qnamelen, qclass, now,
sbin/unwind/libunbound/services/cache/dns.c
594
find_add_ds(env, region, *msg, dp, now);
sbin/unwind/libunbound/services/cache/dns.c
596
if(!find_add_addrs(env, qclass, region, dp, now, msg))
sbin/unwind/libunbound/services/cache/dns.c
632
tomsg(struct module_env* env, struct query_info* q, struct reply_info* r,
sbin/unwind/libunbound/services/cache/dns.c
705
if(env)
sbin/unwind/libunbound/services/cache/dns.c
706
rrset_array_unlock_touch(env->rrset_cache, scratch, r->ref,
sbin/unwind/libunbound/services/cache/dns.c
78
store_rrsets(struct module_env* env, struct reply_info* rep, time_t now,
sbin/unwind/libunbound/services/cache/dns.c
877
fill_any(struct module_env* env,
sbin/unwind/libunbound/services/cache/dns.c
881
time_t now = *env->now;
sbin/unwind/libunbound/services/cache/dns.c
889
if(env->cfg->deny_any) {
sbin/unwind/libunbound/services/cache/dns.c
89
switch(rrset_cache_update(env->rrset_cache, &rep->ref[i],
sbin/unwind/libunbound/services/cache/dns.c
90
env->alloc, ((ntohs(rep->ref[i].key->rk.type)==
sbin/unwind/libunbound/services/cache/dns.c
907
env->rrset_cache, qname, qnamelen, lookup[i],
sbin/unwind/libunbound/services/cache/dns.c
944
dns_cache_lookup(struct module_env* env,
sbin/unwind/libunbound/services/cache/dns.c
952
time_t now = *env->now;
sbin/unwind/libunbound/services/cache/dns.c
962
e = slabhash_lookup(env->msg_cache, h, &k, 0);
sbin/unwind/libunbound/services/cache/dns.c
966
struct dns_msg* msg = tomsg(env, &key->key, data, region, now, 0,
sbin/unwind/libunbound/services/cache/dns.c
980
(rrset=find_closest_of_type(env, qname, qnamelen, qclass, now,
sbin/unwind/libunbound/services/cache/dns.h
124
void dns_cache_store_msg(struct module_env* env, struct query_info* qinfo,
sbin/unwind/libunbound/services/cache/dns.h
148
struct delegpt* dns_cache_find_delegation(struct module_env* env,
sbin/unwind/libunbound/services/cache/dns.h
166
struct dns_msg* tomsg(struct module_env* env, struct query_info* q,
sbin/unwind/libunbound/services/cache/dns.h
197
struct dns_msg* dns_cache_lookup(struct module_env* env,
sbin/unwind/libunbound/services/cache/dns.h
211
int cache_fill_missing(struct module_env* env, uint16_t qclass,
sbin/unwind/libunbound/services/cache/dns.h
262
int dns_cache_prefetch_adjust(struct module_env* env, struct query_info* qinfo,
sbin/unwind/libunbound/services/cache/dns.h
267
struct msgreply_entry* msg_cache_lookup(struct module_env* env,
sbin/unwind/libunbound/services/cache/dns.h
280
void msg_cache_remove(struct module_env* env, uint8_t* qname, size_t qnamelen,
sbin/unwind/libunbound/services/cache/dns.h
97
int dns_cache_store(struct module_env* env, struct query_info* qinf,
sbin/unwind/libunbound/services/localzone.c
1339
local_encode(struct query_info* qinfo, struct module_env* env,
sbin/unwind/libunbound/services/localzone.c
1361
if(!inplace_cb_reply_local_call(env, qinfo, NULL, &rep, rcode, edns,
sbin/unwind/libunbound/services/localzone.c
1362
repinfo, temp, env->now_tv) || !reply_info_answer_encode(qinfo, &rep,
sbin/unwind/libunbound/services/localzone.c
1374
local_error_encode(struct query_info* qinfo, struct module_env* env,
sbin/unwind/libunbound/services/localzone.c
1384
if(!inplace_cb_reply_local_call(env, qinfo, NULL, NULL,
sbin/unwind/libunbound/services/localzone.c
1385
rcode, edns, repinfo, temp, env->now_tv))
sbin/unwind/libunbound/services/localzone.c
1388
if(ede_code != LDNS_EDE_NONE && env->cfg->ede) {
sbin/unwind/libunbound/services/localzone.c
1510
local_data_answer(struct local_zone* z, struct module_env* env,
sbin/unwind/libunbound/services/localzone.c
1542
return local_encode(qinfo, env, edns, repinfo, buf, temp,
sbin/unwind/libunbound/services/localzone.c
1588
local_error_encode(qinfo, env, edns, repinfo,
sbin/unwind/libunbound/services/localzone.c
1636
return local_encode(qinfo, env, edns, repinfo, buf, temp, &r, 1,
sbin/unwind/libunbound/services/localzone.c
1639
return local_encode(qinfo, env, edns, repinfo, buf, temp, lr->rrset, 1,
sbin/unwind/libunbound/services/localzone.c
1682
local_zones_zone_answer(struct local_zone* z, struct module_env* env,
sbin/unwind/libunbound/services/localzone.c
1696
local_error_encode(qinfo, env, edns, repinfo, buf, temp,
sbin/unwind/libunbound/services/localzone.c
1721
return local_encode(qinfo, env, edns, repinfo, buf, temp,
sbin/unwind/libunbound/services/localzone.c
1723
local_error_encode(qinfo, env, edns, repinfo, buf, temp,
sbin/unwind/libunbound/services/localzone.c
1733
local_error_encode(qinfo, env, edns, repinfo, buf, temp,
sbin/unwind/libunbound/services/localzone.c
1772
return local_encode(qinfo, env, edns, repinfo, buf, temp,
sbin/unwind/libunbound/services/localzone.c
1776
local_error_encode(qinfo, env, edns, repinfo, buf,
sbin/unwind/libunbound/services/localzone.c
1789
return local_encode(qinfo, env, edns, repinfo, buf, temp,
sbin/unwind/libunbound/services/localzone.c
1792
local_error_encode(qinfo, env, edns, repinfo, buf, temp, rcode,
sbin/unwind/libunbound/services/localzone.c
1874
local_zones_answer(struct local_zones* zones, struct module_env* env,
sbin/unwind/libunbound/services/localzone.c
1945
if((env->cfg->log_local_actions ||
sbin/unwind/libunbound/services/localzone.c
1959
&& local_data_answer(z, env, qinfo, edns, repinfo, buf, temp, labs,
sbin/unwind/libunbound/services/localzone.c
1966
r = local_zones_zone_answer(z, env, qinfo, edns, repinfo, buf, temp, ld, lzt);
sbin/unwind/libunbound/services/localzone.h
332
int local_zones_answer(struct local_zones* zones, struct module_env* env,
sbin/unwind/libunbound/services/localzone.h
353
local_zones_zone_answer(struct local_zone* z, struct module_env* env,
sbin/unwind/libunbound/services/localzone.h
616
local_data_answer(struct local_zone* z, struct module_env* env,
sbin/unwind/libunbound/services/mesh.c
1003
alloc_reg_release(env->alloc, region);
sbin/unwind/libunbound/services/mesh.c
1026
alloc_reg_release(env->alloc, region);
sbin/unwind/libunbound/services/mesh.c
1032
alloc_reg_release(env->alloc, region);
sbin/unwind/libunbound/services/mesh.c
1045
mstate->s.env = env;
sbin/unwind/libunbound/services/mesh.c
1054
mstate->s.qstarttime = *env->now;
sbin/unwind/libunbound/services/mesh.c
1057
for(i=0; i<env->mesh->mods.num; i++) {
sbin/unwind/libunbound/services/mesh.c
1083
mesh = mstate->s.env->mesh;
sbin/unwind/libunbound/services/mesh.c
1106
infra_wait_limit_dec(mesh->env->infra_cache,
sbin/unwind/libunbound/services/mesh.c
1107
&rep->query_reply, mesh->env->cfg);
sbin/unwind/libunbound/services/mesh.c
1129
alloc_reg_release(mstate->s.env->alloc, mstate->s.region);
sbin/unwind/libunbound/services/mesh.c
1141
mesh = mstate->s.env->mesh;
sbin/unwind/libunbound/services/mesh.c
1201
struct mesh_area* mesh = qstate->env->mesh;
sbin/unwind/libunbound/services/mesh.c
1231
struct mesh_area* mesh = qstate->env->mesh;
sbin/unwind/libunbound/services/mesh.c
1238
*sub = mesh_state_create(qstate->env, qinfo, cinfo, qflags,
sbin/unwind/libunbound/services/mesh.c
1276
struct mesh_area* mesh = qstate->env->mesh;
sbin/unwind/libunbound/services/mesh.c
1364
if(!inplace_cb_reply_servfail_call(m->s.env, &m->s.qinfo, &m->s,
sbin/unwind/libunbound/services/mesh.c
1368
if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep, rcode,
sbin/unwind/libunbound/services/mesh.c
1382
if(m->s.env->cfg->disable_edns_do && (r->edns.bits&EDNS_DO))
sbin/unwind/libunbound/services/mesh.c
1385
if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep,
sbin/unwind/libunbound/services/mesh.c
1389
m->s.env->scratch, udp_size, &r->edns,
sbin/unwind/libunbound/services/mesh.c
1403
log_assert(m->s.env->mesh->num_reply_addrs > 0);
sbin/unwind/libunbound/services/mesh.c
1404
m->s.env->mesh->num_reply_addrs--;
sbin/unwind/libunbound/services/mesh.c
1480
if(m->s.env->need_to_validate && (!(r->qflags&BIT_CD) ||
sbin/unwind/libunbound/services/mesh.c
1481
m->s.env->cfg->ignore_cd) && rep &&
sbin/unwind/libunbound/services/mesh.c
1485
if(m->s.env->cfg->stat_extended)
sbin/unwind/libunbound/services/mesh.c
1486
m->s.env->mesh->ans_bogus++;
sbin/unwind/libunbound/services/mesh.c
1513
!m->s.env->inplace_cb_lists[inplace_cb_reply]) ||
sbin/unwind/libunbound/services/mesh.c
1515
!m->s.env->inplace_cb_lists[inplace_cb_reply_servfail])) &&
sbin/unwind/libunbound/services/mesh.c
1537
if(!inplace_cb_reply_servfail_call(m->s.env, &m->s.qinfo, &m->s,
sbin/unwind/libunbound/services/mesh.c
1541
if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep, rcode,
sbin/unwind/libunbound/services/mesh.c
1549
if(m->s.env->cfg->ede && rep) {
sbin/unwind/libunbound/services/mesh.c
1563
if(m->s.env->cfg->disable_edns_do && (r->edns.bits&EDNS_DO))
sbin/unwind/libunbound/services/mesh.c
1571
if(m->s.env->cfg->ede && rep &&
sbin/unwind/libunbound/services/mesh.c
1577
if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep,
sbin/unwind/libunbound/services/mesh.c
1580
r->qflags, r_buffer, 0, 1, m->s.env->scratch,
sbin/unwind/libunbound/services/mesh.c
1584
if(!inplace_cb_reply_servfail_call(m->s.env, &m->s.qinfo, &m->s,
sbin/unwind/libunbound/services/mesh.c
1596
infra_wait_limit_dec(m->s.env->infra_cache, &r->query_reply,
sbin/unwind/libunbound/services/mesh.c
1597
m->s.env->cfg);
sbin/unwind/libunbound/services/mesh.c
1599
log_assert(m->s.env->mesh->num_reply_addrs > 0);
sbin/unwind/libunbound/services/mesh.c
1600
m->s.env->mesh->num_reply_addrs--;
sbin/unwind/libunbound/services/mesh.c
1601
end_time = *m->s.env->now_tv;
sbin/unwind/libunbound/services/mesh.c
1605
m->s.env->mesh->replies_sent++;
sbin/unwind/libunbound/services/mesh.c
1606
timeval_add(&m->s.env->mesh->replies_sum_wait, &duration);
sbin/unwind/libunbound/services/mesh.c
1607
timehist_insert(m->s.env->mesh->histogram, &duration);
sbin/unwind/libunbound/services/mesh.c
1608
if(m->s.env->cfg->stat_extended) {
sbin/unwind/libunbound/services/mesh.c
1611
if(secure) m->s.env->mesh->ans_secure++;
sbin/unwind/libunbound/services/mesh.c
1612
m->s.env->mesh->ans_rcode[ rc ] ++;
sbin/unwind/libunbound/services/mesh.c
1614
m->s.env->mesh->ans_nodata++;
sbin/unwind/libunbound/services/mesh.c
1617
if(m->s.env->cfg->log_replies) {
sbin/unwind/libunbound/services/mesh.c
1621
(m->s.env->cfg->log_destaddr?(void*)r->query_reply.c->socket->addr:NULL),
sbin/unwind/libunbound/services/mesh.c
1728
qstate->env->mesh->num_dns_error_reports++;
sbin/unwind/libunbound/services/mesh.c
1754
if(mstate->s.env->cfg->serve_expired) {
sbin/unwind/libunbound/services/mesh.c
1759
&& mstate->s.env->cfg->log_servfail
sbin/unwind/libunbound/services/mesh.c
1760
&& !mstate->s.env->cfg->val_log_squelch) {
sbin/unwind/libunbound/services/mesh.c
1766
if(mstate->reply_list && mstate->s.env->cfg->dns_error_reporting)
sbin/unwind/libunbound/services/mesh.c
1779
timeval_subtract(&old, mstate->s.env->now_tv, &r->start_time);
sbin/unwind/libunbound/services/mesh.c
1780
if(mstate->s.env->cfg->discard_timeout != 0 &&
sbin/unwind/libunbound/services/mesh.c
1782
mstate->s.env->cfg->discard_timeout) {
sbin/unwind/libunbound/services/mesh.c
1791
infra_wait_limit_dec(mstate->s.env->infra_cache,
sbin/unwind/libunbound/services/mesh.c
1792
&r->query_reply, mstate->s.env->cfg);
sbin/unwind/libunbound/services/mesh.c
1800
log_assert(mstate->s.env->mesh->num_reply_addrs > 0);
sbin/unwind/libunbound/services/mesh.c
1801
mstate->s.env->mesh->num_reply_addrs--;
sbin/unwind/libunbound/services/mesh.c
1802
mstate->s.env->mesh->num_queries_discard_timeout++;
sbin/unwind/libunbound/services/mesh.c
1830
infra_wait_limit_dec(mstate->s.env->infra_cache,
sbin/unwind/libunbound/services/mesh.c
1831
&r->query_reply, mstate->s.env->cfg);
sbin/unwind/libunbound/services/mesh.c
1840
log_assert(mstate->s.env->mesh->num_reply_addrs > 0);
sbin/unwind/libunbound/services/mesh.c
1841
mstate->s.env->mesh->num_reply_addrs--;
sbin/unwind/libunbound/services/mesh.c
1863
mstate->s.env->cfg->stat_extended &&
sbin/unwind/libunbound/services/mesh.c
1866
mstate->s.env->mesh->rpz_action[RPZ_DISABLED_ACTION] += i;
sbin/unwind/libunbound/services/mesh.c
1868
mstate->s.env->mesh->rpz_action[RPZ_CNAME_OVERRIDE_ACTION] += i;
sbin/unwind/libunbound/services/mesh.c
1870
mstate->s.env->mesh->rpz_action[respip_action_to_rpz_action(
sbin/unwind/libunbound/services/mesh.c
1874
if(mstate->s.env->cfg->stat_extended
sbin/unwind/libunbound/services/mesh.c
1876
mstate->s.env->mesh->ans_cachedb += i;
sbin/unwind/libunbound/services/mesh.c
1885
log_assert(mstate->s.env->mesh->num_reply_states > 0);
sbin/unwind/libunbound/services/mesh.c
1886
mstate->s.env->mesh->num_reply_states--;
sbin/unwind/libunbound/services/mesh.c
1890
mstate->s.env->mesh->num_detached_states++;
sbin/unwind/libunbound/services/mesh.c
1899
log_assert(mstate->s.env->mesh->num_reply_states > 0);
sbin/unwind/libunbound/services/mesh.c
1900
mstate->s.env->mesh->num_reply_states--;
sbin/unwind/libunbound/services/mesh.c
1905
mstate->s.env->mesh->num_detached_states++;
sbin/unwind/libunbound/services/mesh.c
2019
r->start_time = *s->s.env->now_tv;
sbin/unwind/libunbound/services/mesh.c
207
mesh_create(struct module_stack* stack, struct module_env* env)
sbin/unwind/libunbound/services/mesh.c
2091
struct regional* region = mstate->s.env->scratch;
sbin/unwind/libunbound/services/mesh.c
215
mesh->qbuf_bak = sldns_buffer_new(env->cfg->msg_buffer_size);
sbin/unwind/libunbound/services/mesh.c
2186
mstate->s.env->unique_mesh) {
sbin/unwind/libunbound/services/mesh.c
2205
mstate->s.env->cfg->client_subnet_opcode)) != NULL) {
sbin/unwind/libunbound/services/mesh.c
2209
mstate->s.env->scratch);
sbin/unwind/libunbound/services/mesh.c
222
mesh->env = env;
sbin/unwind/libunbound/services/mesh.c
2248
regional_free_all(mstate->s.env->scratch);
sbin/unwind/libunbound/services/mesh.c
2361
struct mesh_area* mesh = qstate->env->mesh;
sbin/unwind/libunbound/services/mesh.c
237
mesh->max_reply_states = env->cfg->num_queries_per_thread;
sbin/unwind/libunbound/services/mesh.c
240
mesh->jostle_max.tv_sec = (time_t)(env->cfg->jostle_time / 1000);
sbin/unwind/libunbound/services/mesh.c
2407
infra_wait_limit_dec(mesh->env->infra_cache,
sbin/unwind/libunbound/services/mesh.c
2408
&n->query_reply, mesh->env->cfg);
sbin/unwind/libunbound/services/mesh.c
241
mesh->jostle_max.tv_usec = (time_t)((env->cfg->jostle_time % 1000)
sbin/unwind/libunbound/services/mesh.c
2451
alias_rrset, 0, qstate->region, az, NULL, qstate->env->views,
sbin/unwind/libunbound/services/mesh.c
2452
qstate->env->respip_set))
sbin/unwind/libunbound/services/mesh.c
2472
struct mesh_area* mesh = qstate->env->mesh;
sbin/unwind/libunbound/services/mesh.c
2486
|| qstate->env->cfg->ignore_cd) && qstate->env->need_to_validate;
sbin/unwind/libunbound/services/mesh.c
2523
qstate->env->auth_zones)) {
sbin/unwind/libunbound/services/mesh.c
2528
qstate->env->auth_zones, qstate->env->views,
sbin/unwind/libunbound/services/mesh.c
2529
qstate->env->respip_set)) {
sbin/unwind/libunbound/services/mesh.c
2573
timeval_subtract(&old, mstate->s.env->now_tv, &r->start_time);
sbin/unwind/libunbound/services/mesh.c
2574
if(mstate->s.env->cfg->discard_timeout != 0 &&
sbin/unwind/libunbound/services/mesh.c
2576
mstate->s.env->cfg->discard_timeout) {
sbin/unwind/libunbound/services/mesh.c
2585
infra_wait_limit_dec(mstate->s.env->infra_cache,
sbin/unwind/libunbound/services/mesh.c
2586
&r->query_reply, mstate->s.env->cfg);
sbin/unwind/libunbound/services/mesh.c
2594
log_assert(mstate->s.env->mesh->num_reply_addrs > 0);
sbin/unwind/libunbound/services/mesh.c
2595
mstate->s.env->mesh->num_reply_addrs--;
sbin/unwind/libunbound/services/mesh.c
2596
mstate->s.env->mesh->num_queries_discard_timeout++;
sbin/unwind/libunbound/services/mesh.c
2616
qstate->env->cfg->ede_serve_expired &&
sbin/unwind/libunbound/services/mesh.c
2617
qstate->env->cfg->ede &&
sbin/unwind/libunbound/services/mesh.c
2631
infra_wait_limit_dec(mstate->s.env->infra_cache,
sbin/unwind/libunbound/services/mesh.c
2632
&r->query_reply, mstate->s.env->cfg);
sbin/unwind/libunbound/services/mesh.c
2639
if(actinfo.addrinfo && qstate->env->cfg->stat_extended &&
sbin/unwind/libunbound/services/mesh.c
2642
qstate->env->mesh->rpz_action[RPZ_DISABLED_ACTION] += i;
sbin/unwind/libunbound/services/mesh.c
2644
qstate->env->mesh->rpz_action[RPZ_CNAME_OVERRIDE_ACTION] += i;
sbin/unwind/libunbound/services/mesh.c
2646
qstate->env->mesh->rpz_action[
sbin/unwind/libunbound/services/mesh.c
2668
log_assert(qstate->env->mesh->num_reply_states > 0);
sbin/unwind/libunbound/services/mesh.c
2669
qstate->env->mesh->num_reply_states--;
sbin/unwind/libunbound/services/mesh.c
2674
qstate->env->mesh->num_detached_states++;
sbin/unwind/libunbound/services/mesh.c
304
timeval_subtract(&age, mesh->env->now_tv,
sbin/unwind/libunbound/services/mesh.c
343
time_t timenow = *qstate->env->now;
sbin/unwind/libunbound/services/mesh.c
345
|| qstate->env->cfg->ignore_cd) && qstate->env->need_to_validate;
sbin/unwind/libunbound/services/mesh.c
349
e = slabhash_lookup(qstate->env->msg_cache, h, lookup_qinfo, 0);
sbin/unwind/libunbound/services/mesh.c
355
msg = tomsg(qstate->env, &key->key, data, qstate->region, timenow,
sbin/unwind/libunbound/services/mesh.c
356
qstate->env->cfg->serve_expired, qstate->env->scratch);
sbin/unwind/libunbound/services/mesh.c
415
mstate->s.env->worker_base, mesh_serve_expired_callback, mstate);
sbin/unwind/libunbound/services/mesh.c
433
int unique = unique_mesh_state(edns->opt_list_in, mesh->env);
sbin/unwind/libunbound/services/mesh.c
437
int timeout = mesh->env->cfg->serve_expired?
sbin/unwind/libunbound/services/mesh.c
438
mesh->env->cfg->serve_expired_client_timeout:0;
sbin/unwind/libunbound/services/mesh.c
444
if(!infra_wait_limit_allowed(mesh->env->infra_cache, rep,
sbin/unwind/libunbound/services/mesh.c
445
edns->cookie_valid, mesh->env->cfg)) {
sbin/unwind/libunbound/services/mesh.c
450
mesh->env->scratch, LDNS_EDE_OTHER,
sbin/unwind/libunbound/services/mesh.c
452
if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, NULL, NULL,
sbin/unwind/libunbound/services/mesh.c
453
LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
sbin/unwind/libunbound/services/mesh.c
457
regional_free_all(mesh->env->scratch);
sbin/unwind/libunbound/services/mesh.c
497
s = mesh_state_create(mesh->env, qinfo, cinfo,
sbin/unwind/libunbound/services/mesh.c
501
if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, NULL, NULL,
sbin/unwind/libunbound/services/mesh.c
502
LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
sbin/unwind/libunbound/services/mesh.c
520
if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, NULL,
sbin/unwind/libunbound/services/mesh.c
521
NULL, LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
sbin/unwind/libunbound/services/mesh.c
568
if(!timeout && mesh->env->cfg->serve_expired &&
sbin/unwind/libunbound/services/mesh.c
569
!mesh->env->cfg->serve_expired_client_timeout &&
sbin/unwind/libunbound/services/mesh.c
570
(mesh->env->cachedb_enabled &&
sbin/unwind/libunbound/services/mesh.c
571
mesh->env->cfg->cachedb_check_when_serve_expired)) {
sbin/unwind/libunbound/services/mesh.c
578
infra_wait_limit_inc(mesh->env->infra_cache, rep, *mesh->env->now,
sbin/unwind/libunbound/services/mesh.c
579
mesh->env->cfg);
sbin/unwind/libunbound/services/mesh.c
607
if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, &s->s,
sbin/unwind/libunbound/services/mesh.c
608
NULL, LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
sbin/unwind/libunbound/services/mesh.c
628
int unique = unique_mesh_state(edns->opt_list_in, mesh->env);
sbin/unwind/libunbound/services/mesh.c
629
int timeout = mesh->env->cfg->serve_expired?
sbin/unwind/libunbound/services/mesh.c
630
mesh->env->cfg->serve_expired_client_timeout:0;
sbin/unwind/libunbound/services/mesh.c
645
s = mesh_state_create(mesh->env, qinfo, NULL,
sbin/unwind/libunbound/services/mesh.c
691
if(!timeout && mesh->env->cfg->serve_expired &&
sbin/unwind/libunbound/services/mesh.c
692
!mesh->env->cfg->serve_expired_client_timeout &&
sbin/unwind/libunbound/services/mesh.c
693
(mesh->env->cachedb_enabled &&
sbin/unwind/libunbound/services/mesh.c
694
mesh->env->cfg->cachedb_check_when_serve_expired)) {
sbin/unwind/libunbound/services/mesh.c
750
s = mesh_state_create(mesh->env, qinfo, NULL, mesh_flags, 0, 0);
sbin/unwind/libunbound/services/mesh.c
821
s = mesh_state_create(mesh->env, qinfo, NULL, mesh_flags, 0, 0);
sbin/unwind/libunbound/services/mesh.c
828
opt = edns_opt_list_find(edns_list, mesh->env->cfg->client_subnet_opcode);
sbin/unwind/libunbound/services/mesh.c
991
mesh_state_create(struct module_env* env, struct query_info* qinfo,
sbin/unwind/libunbound/services/mesh.c
995
struct regional* region = alloc_reg_obtain(env->alloc);
sbin/unwind/libunbound/services/mesh.h
299
struct module_env* env);
sbin/unwind/libunbound/services/mesh.h
505
struct mesh_state* mesh_state_create(struct module_env* env,
sbin/unwind/libunbound/services/mesh.h
86
struct module_env* env;
sbin/unwind/libunbound/services/modstack.c
237
struct module_env* env)
sbin/unwind/libunbound/services/modstack.c
252
if(!(*stack->mod[i]->startup)(env, i)) {
sbin/unwind/libunbound/services/modstack.c
263
struct module_env* env)
sbin/unwind/libunbound/services/modstack.c
267
env->need_to_validate = 0; /* set by module init below */
sbin/unwind/libunbound/services/modstack.c
295
if(!(*stack->mod[i]->init)(env, i)) {
sbin/unwind/libunbound/services/modstack.c
305
modstack_call_deinit(struct module_stack* stack, struct module_env* env)
sbin/unwind/libunbound/services/modstack.c
310
(*stack->mod[i]->deinit)(env, i);
sbin/unwind/libunbound/services/modstack.c
315
modstack_call_destartup(struct module_stack* stack, struct module_env* env)
sbin/unwind/libunbound/services/modstack.c
322
(*stack->mod[i]->destartup)(env, i);
sbin/unwind/libunbound/services/modstack.c
338
mod_get_mem(struct module_env* env, const char* name)
sbin/unwind/libunbound/services/modstack.c
340
int m = modstack_find(&env->mesh->mods, name);
sbin/unwind/libunbound/services/modstack.c
342
fptr_ok(fptr_whitelist_mod_get_mem(env->mesh->
sbin/unwind/libunbound/services/modstack.c
344
return (*env->mesh->mods.mod[m]->get_mem)(env, m);
sbin/unwind/libunbound/services/modstack.h
113
struct module_env* env);
sbin/unwind/libunbound/services/modstack.h
120
void modstack_call_deinit(struct module_stack* stack, struct module_env* env);
sbin/unwind/libunbound/services/modstack.h
127
void modstack_call_destartup(struct module_stack* stack, struct module_env* env);
sbin/unwind/libunbound/services/modstack.h
138
size_t mod_get_mem(struct module_env* env, const char* name);
sbin/unwind/libunbound/services/modstack.h
78
struct module_env* env);
sbin/unwind/libunbound/services/outside_network.c
3491
sldns_buffer* buff, struct module_env* env, int* was_ratelimited)
sbin/unwind/libunbound/services/outside_network.c
3506
region = alloc_reg_obtain(env->alloc);
sbin/unwind/libunbound/services/outside_network.c
3512
alloc_reg_release(env->alloc, region);
sbin/unwind/libunbound/services/outside_network.c
3518
if(!inplace_cb_query_call(env, qinfo, flags, addr, addrlen, zone,
sbin/unwind/libunbound/services/outside_network.c
3520
alloc_reg_release(env->alloc, region);
sbin/unwind/libunbound/services/outside_network.c
3529
&env->edns_strings->client_strings, addr, addrlen))) {
sbin/unwind/libunbound/services/outside_network.c
3531
env->edns_strings->client_string_opcode,
sbin/unwind/libunbound/services/outside_network.c
3543
timenow = *env->now;
sbin/unwind/libunbound/services/outside_network.c
3544
if(!infra_ratelimit_inc(env->infra_cache, zone,
sbin/unwind/libunbound/services/outside_network.c
3545
zonelen, timenow, env->cfg->ratelimit_backoff,
sbin/unwind/libunbound/services/outside_network.c
3551
if(env->cfg->ratelimit_factor == 0 ||
sbin/unwind/libunbound/services/outside_network.c
3552
ub_random_max(env->rnd,
sbin/unwind/libunbound/services/outside_network.c
3553
env->cfg->ratelimit_factor) != 1) {
sbin/unwind/libunbound/services/outside_network.c
3555
alloc_reg_release(env->alloc, region);
sbin/unwind/libunbound/services/outside_network.c
3569
( ssl_upstream && env->cfg->pad_queries
sbin/unwind/libunbound/services/outside_network.c
3570
? env->cfg->pad_queries_block_size : 0 ),
sbin/unwind/libunbound/services/outside_network.c
3571
env->alloc, region);
sbin/unwind/libunbound/services/outside_network.c
3574
infra_ratelimit_dec(env->infra_cache,
sbin/unwind/libunbound/services/outside_network.c
3582
infra_ratelimit_dec(env->infra_cache,
sbin/unwind/libunbound/services/outside_network.c
3593
alloc_reg_release(env->alloc, region);
sbin/unwind/libunbound/services/outside_network.h
709
struct sldns_buffer* buff, struct module_env* env, int* was_ratelimited);
sbin/unwind/libunbound/services/rpz.c
1774
rpz_local_encode(struct module_env* env, struct query_info* qinfo,
sbin/unwind/libunbound/services/rpz.c
1807
if(!inplace_cb_reply_local_call(env, qinfo, NULL, &rep, rcode, edns,
sbin/unwind/libunbound/services/rpz.c
1808
repinfo, temp, env->now_tv) ||
sbin/unwind/libunbound/services/rpz.c
1843
struct module_env* env, struct query_info* qinfo,
sbin/unwind/libunbound/services/rpz.c
1892
rpz_local_encode(env, qinfo, edns, repinfo, buf, temp, rp,
sbin/unwind/libunbound/services/rpz.c
2237
rpz_synthesize_qname_localdata(struct module_env* env, struct rpz* r,
sbin/unwind/libunbound/services/rpz.c
2255
if(lzt == local_zone_redirect && local_data_answer(z, env, qinfo,
sbin/unwind/libunbound/services/rpz.c
2267
ret = local_zones_zone_answer(z, env, qinfo, edns, repinfo, buf, temp,
sbin/unwind/libunbound/services/rpz.c
2361
if(ms->env->worker)
sbin/unwind/libunbound/services/rpz.c
2362
ms->env->worker->stats.rpz_action[action]++;
sbin/unwind/libunbound/services/rpz.c
2423
if(ms->env->worker)
sbin/unwind/libunbound/services/rpz.c
2424
ms->env->worker->stats.rpz_action[action]++;
sbin/unwind/libunbound/services/rpz.c
2483
if(ms->env == NULL || ms->env->auth_zones == NULL) { return 0; }
sbin/unwind/libunbound/services/rpz.c
2485
az = ms->env->auth_zones;
sbin/unwind/libunbound/services/rpz.c
2558
if(ms->env == NULL || ms->env->auth_zones == NULL) { return 0; }
sbin/unwind/libunbound/services/rpz.c
2559
az = ms->env->auth_zones;
sbin/unwind/libunbound/services/rpz.c
2584
if(ms->env->worker)
sbin/unwind/libunbound/services/rpz.c
2585
ms->env->worker->stats.rpz_action[r->action_override]++;
sbin/unwind/libunbound/services/rpz.c
2660
rpz_apply_maybe_clientip_trigger(struct auth_zones* az, struct module_env* env,
sbin/unwind/libunbound/services/rpz.c
2701
rpz_apply_clientip_localdata_action(node, env, qinfo,
sbin/unwind/libunbound/services/rpz.c
2712
local_zones_zone_answer(*z_out /*likely NULL, no zone*/, env, qinfo, edns,
sbin/unwind/libunbound/services/rpz.c
2739
rpz_callback_from_worker_request(struct auth_zones* az, struct module_env* env,
sbin/unwind/libunbound/services/rpz.c
2750
int clientip_trigger = rpz_apply_maybe_clientip_trigger(az, env, qinfo,
sbin/unwind/libunbound/services/rpz.c
2794
ret = rpz_synthesize_qname_localdata(env, r, z, lzt, qinfo, edns, buf, temp,
sbin/unwind/libunbound/services/rpz.h
180
int rpz_callback_from_worker_request(struct auth_zones* az, struct module_env* env,
sbin/unwind/libunbound/util/data/msgreply.c
1259
int inplace_cb_reply_call(struct module_env* env, struct query_info* qinfo,
sbin/unwind/libunbound/util/data/msgreply.c
1265
env->inplace_cb_lists[inplace_cb_reply], inplace_cb_reply, qinfo,
sbin/unwind/libunbound/util/data/msgreply.c
1269
int inplace_cb_reply_cache_call(struct module_env* env,
sbin/unwind/libunbound/util/data/msgreply.c
1276
env->inplace_cb_lists[inplace_cb_reply_cache], inplace_cb_reply_cache,
sbin/unwind/libunbound/util/data/msgreply.c
1280
int inplace_cb_reply_local_call(struct module_env* env,
sbin/unwind/libunbound/util/data/msgreply.c
1287
env->inplace_cb_lists[inplace_cb_reply_local], inplace_cb_reply_local,
sbin/unwind/libunbound/util/data/msgreply.c
1291
int inplace_cb_reply_servfail_call(struct module_env* env,
sbin/unwind/libunbound/util/data/msgreply.c
1301
env->inplace_cb_lists[inplace_cb_reply_servfail],
sbin/unwind/libunbound/util/data/msgreply.c
1306
int inplace_cb_query_call(struct module_env* env, struct query_info* qinfo,
sbin/unwind/libunbound/util/data/msgreply.c
1311
struct inplace_cb* cb = env->inplace_cb_lists[inplace_cb_query];
sbin/unwind/libunbound/util/data/msgreply.c
1322
int inplace_cb_edns_back_parsed_call(struct module_env* env,
sbin/unwind/libunbound/util/data/msgreply.c
1326
env->inplace_cb_lists[inplace_cb_edns_back_parsed];
sbin/unwind/libunbound/util/data/msgreply.c
1336
int inplace_cb_query_response_call(struct module_env* env,
sbin/unwind/libunbound/util/data/msgreply.c
1339
env->inplace_cb_lists[inplace_cb_query_response];
sbin/unwind/libunbound/util/data/msgreply.h
670
int inplace_cb_reply_call(struct module_env* env, struct query_info* qinfo,
sbin/unwind/libunbound/util/data/msgreply.h
690
int inplace_cb_reply_cache_call(struct module_env* env,
sbin/unwind/libunbound/util/data/msgreply.h
711
int inplace_cb_reply_local_call(struct module_env* env,
sbin/unwind/libunbound/util/data/msgreply.h
733
int inplace_cb_reply_servfail_call(struct module_env* env,
sbin/unwind/libunbound/util/data/msgreply.h
756
int inplace_cb_query_call(struct module_env* env, struct query_info* qinfo,
sbin/unwind/libunbound/util/data/msgreply.h
769
int inplace_cb_edns_back_parsed_call(struct module_env* env,
sbin/unwind/libunbound/util/data/msgreply.h
781
int inplace_cb_query_response_call(struct module_env* env,
sbin/unwind/libunbound/util/fptr_wlist.c
417
fptr_whitelist_mod_init(int (*fptr)(struct module_env* env, int id))
sbin/unwind/libunbound/util/fptr_wlist.c
445
fptr_whitelist_mod_deinit(void (*fptr)(struct module_env* env, int id))
sbin/unwind/libunbound/util/fptr_wlist.c
473
fptr_whitelist_mod_startup(int (*fptr)(struct module_env* env, int id))
sbin/unwind/libunbound/util/fptr_wlist.c
484
fptr_whitelist_mod_destartup(void (*fptr)(struct module_env* env, int id))
sbin/unwind/libunbound/util/fptr_wlist.c
582
fptr_whitelist_mod_get_mem(size_t (*fptr)(struct module_env* env, int id))
sbin/unwind/libunbound/util/fptr_wlist.h
273
int fptr_whitelist_mod_init(int (*fptr)(struct module_env* env, int id));
sbin/unwind/libunbound/util/fptr_wlist.h
281
int fptr_whitelist_mod_deinit(void (*fptr)(struct module_env* env, int id));
sbin/unwind/libunbound/util/fptr_wlist.h
289
int fptr_whitelist_mod_startup(int (*fptr)(struct module_env* env, int id));
sbin/unwind/libunbound/util/fptr_wlist.h
297
int fptr_whitelist_mod_destartup(void (*fptr)(struct module_env* env, int id));
sbin/unwind/libunbound/util/fptr_wlist.h
332
int fptr_whitelist_mod_get_mem(size_t (*fptr)(struct module_env* env, int id));
sbin/unwind/libunbound/util/module.c
115
if(qstate->env->cfg->val_log_level < 2 && !qstate->env->cfg->log_servfail)
sbin/unwind/libunbound/util/module.c
223
if((qstate->env->cfg->val_log_level < 2 && !qstate->env->cfg->log_servfail) || !rr)
sbin/unwind/libunbound/util/module.c
236
if((qstate->env->cfg->val_log_level < 2 && !qstate->env->cfg->log_servfail) || !str || !dname)
sbin/unwind/libunbound/util/module.c
244
edns_known_options_init(struct module_env* env)
sbin/unwind/libunbound/util/module.c
246
env->edns_known_options_num = 0;
sbin/unwind/libunbound/util/module.c
247
env->edns_known_options = (struct edns_known_option*)calloc(
sbin/unwind/libunbound/util/module.c
249
if(!env->edns_known_options) return 0;
sbin/unwind/libunbound/util/module.c
254
edns_known_options_delete(struct module_env* env)
sbin/unwind/libunbound/util/module.c
256
free(env->edns_known_options);
sbin/unwind/libunbound/util/module.c
257
env->edns_known_options = NULL;
sbin/unwind/libunbound/util/module.c
258
env->edns_known_options_num = 0;
sbin/unwind/libunbound/util/module.c
263
int no_aggregation, struct module_env* env)
sbin/unwind/libunbound/util/module.c
266
if(env->worker) {
sbin/unwind/libunbound/util/module.c
278
for(i=0; i<env->edns_known_options_num; i++)
sbin/unwind/libunbound/util/module.c
279
if(env->edns_known_options[i].opt_code == opt_code)
sbin/unwind/libunbound/util/module.c
282
if(i == env->edns_known_options_num) {
sbin/unwind/libunbound/util/module.c
283
if(env->edns_known_options_num >= MAX_KNOWN_EDNS_OPTS) {
sbin/unwind/libunbound/util/module.c
287
env->edns_known_options_num++;
sbin/unwind/libunbound/util/module.c
289
env->edns_known_options[i].opt_code = opt_code;
sbin/unwind/libunbound/util/module.c
290
env->edns_known_options[i].bypass_cache_stage = bypass_cache_stage;
sbin/unwind/libunbound/util/module.c
291
env->edns_known_options[i].no_aggregation = no_aggregation;
sbin/unwind/libunbound/util/module.c
297
struct module_env* env, int id)
sbin/unwind/libunbound/util/module.c
301
if(env->worker) {
sbin/unwind/libunbound/util/module.c
317
prevp = (struct inplace_cb**) &env->inplace_cb_lists[type];
sbin/unwind/libunbound/util/module.c
326
inplace_cb_delete(struct module_env* env, enum inplace_cb_list_type type,
sbin/unwind/libunbound/util/module.c
329
struct inplace_cb* temp = env->inplace_cb_lists[type];
sbin/unwind/libunbound/util/module.c
335
env->inplace_cb_lists[type] = temp->next;
sbin/unwind/libunbound/util/module.c
337
temp = env->inplace_cb_lists[type];
sbin/unwind/libunbound/util/module.c
353
edns_option_is_known(uint16_t opt_code, struct module_env* env)
sbin/unwind/libunbound/util/module.c
356
for(i=0; i<env->edns_known_options_num; i++)
sbin/unwind/libunbound/util/module.c
357
if(env->edns_known_options[i].opt_code == opt_code)
sbin/unwind/libunbound/util/module.c
358
return env->edns_known_options + i;
sbin/unwind/libunbound/util/module.c
363
edns_bypass_cache_stage(struct edns_option* list, struct module_env* env)
sbin/unwind/libunbound/util/module.c
367
for(i=0; i<env->edns_known_options_num; i++)
sbin/unwind/libunbound/util/module.c
368
if(env->edns_known_options[i].opt_code == list->opt_code &&
sbin/unwind/libunbound/util/module.c
369
env->edns_known_options[i].bypass_cache_stage == 1)
sbin/unwind/libunbound/util/module.c
375
unique_mesh_state(struct edns_option* list, struct module_env* env)
sbin/unwind/libunbound/util/module.c
378
if(env->unique_mesh)
sbin/unwind/libunbound/util/module.c
381
for(i=0; i<env->edns_known_options_num; i++)
sbin/unwind/libunbound/util/module.c
382
if(env->edns_known_options[i].opt_code == list->opt_code &&
sbin/unwind/libunbound/util/module.c
383
env->edns_known_options[i].no_aggregation == 1)
sbin/unwind/libunbound/util/module.c
389
log_edns_known_options(enum verbosity_value level, struct module_env* env)
sbin/unwind/libunbound/util/module.c
394
if(env->edns_known_options_num > 0 && verbosity >= level) {
sbin/unwind/libunbound/util/module.c
397
for(i=0; i<env->edns_known_options_num; i++) {
sbin/unwind/libunbound/util/module.c
401
env->edns_known_options[i].opt_code);
sbin/unwind/libunbound/util/module.c
403
env->edns_known_options[i].bypass_cache_stage?"YES":"NO",
sbin/unwind/libunbound/util/module.c
404
env->edns_known_options[i].no_aggregation?"NO":"YES");
sbin/unwind/libunbound/util/module.c
87
if(!str || (qstate->env->cfg->val_log_level < 2 &&
sbin/unwind/libunbound/util/module.c
88
!qstate->env->cfg->log_servfail)) {
sbin/unwind/libunbound/util/module.h
1001
struct module_env* env);
sbin/unwind/libunbound/util/module.h
669
struct module_env* env;
sbin/unwind/libunbound/util/module.h
747
int (*startup)(struct module_env* env, int id);
sbin/unwind/libunbound/util/module.h
757
void (*destartup)(struct module_env* env, int id);
sbin/unwind/libunbound/util/module.h
767
int (*init)(struct module_env* env, int id);
sbin/unwind/libunbound/util/module.h
775
void (*deinit)(struct module_env* env, int id);
sbin/unwind/libunbound/util/module.h
824
size_t (*get_mem)(struct module_env* env, int id);
sbin/unwind/libunbound/util/module.h
912
int edns_known_options_init(struct module_env* env);
sbin/unwind/libunbound/util/module.h
918
void edns_known_options_delete(struct module_env* env);
sbin/unwind/libunbound/util/module.h
933
int no_aggregation, struct module_env* env);
sbin/unwind/libunbound/util/module.h
947
struct module_env* env, int id);
sbin/unwind/libunbound/util/module.h
956
inplace_cb_delete(struct module_env* env, enum inplace_cb_list_type type,
sbin/unwind/libunbound/util/module.h
963
void inplace_cb_lists_delete(struct module_env* env);
sbin/unwind/libunbound/util/module.h
973
struct module_env* env);
sbin/unwind/libunbound/util/module.h
983
struct module_env* env);
sbin/unwind/libunbound/util/module.h
993
int unique_mesh_state(struct edns_option* list, struct module_env* env);
sbin/unwind/libunbound/validator/autotrust.c
1192
void autr_write_file(struct module_env* env, struct trust_anchor* tp)
sbin/unwind/libunbound/validator/autotrust.c
1201
if(!env) {
sbin/unwind/libunbound/validator/autotrust.c
1215
env->worker?*(int*)env->worker:0, llvalue);
sbin/unwind/libunbound/validator/autotrust.c
1265
verify_dnskey(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/autotrust.c
1272
int downprot = env->cfg->harden_algo_downgrade;
sbin/unwind/libunbound/validator/autotrust.c
1273
enum sec_status sec = val_verify_DNSKEY_with_TA(env, ve, rrset,
sbin/unwind/libunbound/validator/autotrust.c
1296
min_expiry(struct module_env* env, struct packed_rrset_data* dd)
sbin/unwind/libunbound/validator/autotrust.c
1302
if((int32_t)t - (int32_t)*env->now > 0) {
sbin/unwind/libunbound/validator/autotrust.c
1303
t -= (int32_t)*env->now;
sbin/unwind/libunbound/validator/autotrust.c
1313
rr_is_selfsigned_revoked(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/autotrust.c
1323
sec = dnskey_verify_rrset(env, ve, dnskey_rrset, dnskey_rrset, i,
sbin/unwind/libunbound/validator/autotrust.c
1538
check_contains_revoked(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/autotrust.c
1560
if(rr_is_selfsigned_revoked(env, ve, dnskey_rrset, i, qstate)) {
sbin/unwind/libunbound/validator/autotrust.c
1578
do_revoked(env, ta, changed);
sbin/unwind/libunbound/validator/autotrust.c
1585
key_matches_a_ds(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/autotrust.c
1606
if(!ds_digest_match_dnskey(env, dnskey_rrset, key_idx,
sbin/unwind/libunbound/validator/autotrust.c
1630
update_events(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/autotrust.c
1671
if(ta && tp->ds_rrset && key_matches_a_ds(env, ve,
sbin/unwind/libunbound/validator/autotrust.c
1683
set_tp_times(tp, min_expiry(env, dd), key_ttl(dnskey_rrset), changed);
sbin/unwind/libunbound/validator/autotrust.c
1697
check_holddown(struct module_env* env, struct autr_ta* ta,
sbin/unwind/libunbound/validator/autotrust.c
1701
if(*env->now < ta->last_change) {
sbin/unwind/libunbound/validator/autotrust.c
1705
elapsed = *env->now - ta->last_change;
sbin/unwind/libunbound/validator/autotrust.c
1717
reset_holddown(struct module_env* env, struct autr_ta* ta, int* changed)
sbin/unwind/libunbound/validator/autotrust.c
1719
ta->last_change = *env->now;
sbin/unwind/libunbound/validator/autotrust.c
1725
set_trustanchor_state(struct module_env* env, struct autr_ta* ta, int* changed,
sbin/unwind/libunbound/validator/autotrust.c
1731
reset_holddown(env, ta, changed);
sbin/unwind/libunbound/validator/autotrust.c
1737
do_newkey(struct module_env* env, struct autr_ta* anchor, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1740
set_trustanchor_state(env, anchor, c, AUTR_STATE_ADDPEND);
sbin/unwind/libunbound/validator/autotrust.c
1745
do_addtime(struct module_env* env, struct autr_ta* anchor, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1750
time_t exceeded = check_holddown(env, anchor, env->cfg->add_holddown);
sbin/unwind/libunbound/validator/autotrust.c
1756
set_trustanchor_state(env, anchor, c, AUTR_STATE_VALID);
sbin/unwind/libunbound/validator/autotrust.c
1767
do_remtime(struct module_env* env, struct autr_ta* anchor, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1769
time_t exceeded = check_holddown(env, anchor, env->cfg->del_holddown);
sbin/unwind/libunbound/validator/autotrust.c
1773
set_trustanchor_state(env, anchor, c, AUTR_STATE_REMOVED);
sbin/unwind/libunbound/validator/autotrust.c
1779
do_keyrem(struct module_env* env, struct autr_ta* anchor, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1782
set_trustanchor_state(env, anchor, c, AUTR_STATE_START);
sbin/unwind/libunbound/validator/autotrust.c
1785
set_trustanchor_state(env, anchor, c, AUTR_STATE_MISSING);
sbin/unwind/libunbound/validator/autotrust.c
1790
do_keypres(struct module_env* env, struct autr_ta* anchor, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1793
set_trustanchor_state(env, anchor, c, AUTR_STATE_VALID);
sbin/unwind/libunbound/validator/autotrust.c
1798
do_revoked(struct module_env* env, struct autr_ta* anchor, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1801
set_trustanchor_state(env, anchor, c, AUTR_STATE_REVOKED);
sbin/unwind/libunbound/validator/autotrust.c
1810
anchor_state_update(struct module_env* env, struct autr_ta* anchor, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1818
do_newkey(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1824
do_keyrem(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1826
else do_addtime(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1832
do_revoked(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1835
do_keyrem(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1838
reset_holddown(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1845
do_revoked(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1848
do_keypres(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1853
reset_holddown(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1855
else do_remtime(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1866
init_zsk_to_ksk(struct module_env* env, struct trust_anchor* tp, int* changed)
sbin/unwind/libunbound/validator/autotrust.c
1888
set_trustanchor_state(env, anchor, changed,
sbin/unwind/libunbound/validator/autotrust.c
1898
remove_missing_trustanchors(struct module_env* env, struct trust_anchor* tp,
sbin/unwind/libunbound/validator/autotrust.c
1920
valid = init_zsk_to_ksk(env, tp, changed);
sbin/unwind/libunbound/validator/autotrust.c
1934
set_trustanchor_state(env, anchor, changed,
sbin/unwind/libunbound/validator/autotrust.c
1942
if(env->cfg->keep_missing == 0)
sbin/unwind/libunbound/validator/autotrust.c
1945
exceeded = check_holddown(env, anchor, env->cfg->keep_missing);
sbin/unwind/libunbound/validator/autotrust.c
1952
set_trustanchor_state(env, anchor, changed,
sbin/unwind/libunbound/validator/autotrust.c
1960
do_statetable(struct module_env* env, struct trust_anchor* tp, int* changed)
sbin/unwind/libunbound/validator/autotrust.c
1967
anchor_state_update(env, anchor, changed);
sbin/unwind/libunbound/validator/autotrust.c
1969
remove_missing_trustanchors(env, tp, changed);
sbin/unwind/libunbound/validator/autotrust.c
1975
autr_holddown_exceed(struct module_env* env, struct trust_anchor* tp, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1981
do_addtime(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
2016
calc_next_probe(struct module_env* env, time_t wait)
sbin/unwind/libunbound/validator/autotrust.c
2028
rnd = (time_t)ub_random_max(env->rnd, (long int)rnd);
sbin/unwind/libunbound/validator/autotrust.c
2029
return (time_t)(*env->now + rest + rnd);
sbin/unwind/libunbound/validator/autotrust.c
2044
reset_worker_timer_at(struct module_env* env, time_t next)
sbin/unwind/libunbound/validator/autotrust.c
2049
if(!env->probe_timer)
sbin/unwind/libunbound/validator/autotrust.c
2051
if(next > *env->now)
sbin/unwind/libunbound/validator/autotrust.c
2052
tv.tv_sec = (time_t)(next - *env->now);
sbin/unwind/libunbound/validator/autotrust.c
2058
comm_timer_set(env->probe_timer, &tv);
sbin/unwind/libunbound/validator/autotrust.c
2065
reset_worker_timer(struct module_env* env)
sbin/unwind/libunbound/validator/autotrust.c
2068
if(!env->anchors)
sbin/unwind/libunbound/validator/autotrust.c
2070
lock_basic_lock(&env->anchors->lock);
sbin/unwind/libunbound/validator/autotrust.c
2071
next = wait_probe_time(env->anchors);
sbin/unwind/libunbound/validator/autotrust.c
2072
lock_basic_unlock(&env->anchors->lock);
sbin/unwind/libunbound/validator/autotrust.c
2073
reset_worker_timer_at(env, next);
sbin/unwind/libunbound/validator/autotrust.c
2078
set_next_probe(struct module_env* env, struct trust_anchor* tp,
sbin/unwind/libunbound/validator/autotrust.c
2092
lock_basic_lock(&env->anchors->lock);
sbin/unwind/libunbound/validator/autotrust.c
2093
tp2 = (struct trust_anchor*)rbtree_search(env->anchors->tree, &key);
sbin/unwind/libunbound/validator/autotrust.c
2096
lock_basic_unlock(&env->anchors->lock);
sbin/unwind/libunbound/validator/autotrust.c
2103
mold = wait_probe_time(env->anchors);
sbin/unwind/libunbound/validator/autotrust.c
2104
(void)rbtree_delete(&env->anchors->autr->probe, tp);
sbin/unwind/libunbound/validator/autotrust.c
2105
tp->autr->next_probe_time = calc_next_probe(env,
sbin/unwind/libunbound/validator/autotrust.c
2107
(void)rbtree_insert(&env->anchors->autr->probe, &tp->autr->pnode);
sbin/unwind/libunbound/validator/autotrust.c
2108
mnew = wait_probe_time(env->anchors);
sbin/unwind/libunbound/validator/autotrust.c
2110
lock_basic_unlock(&env->anchors->lock);
sbin/unwind/libunbound/validator/autotrust.c
2112
(int)tp->autr->next_probe_time - (int)*env->now);
sbin/unwind/libunbound/validator/autotrust.c
2114
reset_worker_timer_at(env, mnew);
sbin/unwind/libunbound/validator/autotrust.c
2121
autr_tp_remove(struct module_env* env, struct trust_anchor* tp,
sbin/unwind/libunbound/validator/autotrust.c
2149
lock_basic_lock(&env->anchors->lock);
sbin/unwind/libunbound/validator/autotrust.c
2150
del_tp = (struct trust_anchor*)rbtree_delete(env->anchors->tree, &key);
sbin/unwind/libunbound/validator/autotrust.c
2151
mold = wait_probe_time(env->anchors);
sbin/unwind/libunbound/validator/autotrust.c
2152
(void)rbtree_delete(&env->anchors->autr->probe, &key);
sbin/unwind/libunbound/validator/autotrust.c
2153
mnew = wait_probe_time(env->anchors);
sbin/unwind/libunbound/validator/autotrust.c
2154
anchors_init_parents_locked(env->anchors);
sbin/unwind/libunbound/validator/autotrust.c
2155
lock_basic_unlock(&env->anchors->lock);
sbin/unwind/libunbound/validator/autotrust.c
2163
autr_write_file(env, del_tp);
sbin/unwind/libunbound/validator/autotrust.c
2169
reset_worker_timer_at(env, mnew);
sbin/unwind/libunbound/validator/autotrust.c
2173
int autr_process_prime(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/autotrust.c
2193
tp->autr->last_queried = *env->now;
sbin/unwind/libunbound/validator/autotrust.c
2198
autr_holddown_exceed(env, tp, &changed);
sbin/unwind/libunbound/validator/autotrust.c
2216
check_contains_revoked(env, ve, tp, dnskey_rrset, &changed, qstate);
sbin/unwind/libunbound/validator/autotrust.c
2226
tp->autr->last_success = *env->now;
sbin/unwind/libunbound/validator/autotrust.c
2227
autr_tp_remove(env, tp, dnskey_rrset);
sbin/unwind/libunbound/validator/autotrust.c
2232
if(!verify_dnskey(env, ve, tp, dnskey_rrset, qstate)) {
sbin/unwind/libunbound/validator/autotrust.c
2238
autr_write_file(env, tp);
sbin/unwind/libunbound/validator/autotrust.c
2243
tp->autr->last_success = *env->now;
sbin/unwind/libunbound/validator/autotrust.c
2251
if(!update_events(env, ve, tp, dnskey_rrset, &changed)) {
sbin/unwind/libunbound/validator/autotrust.c
2260
if(!do_statetable(env, tp, &changed)) {
sbin/unwind/libunbound/validator/autotrust.c
2267
if(!set_next_probe(env, tp, dnskey_rrset))
sbin/unwind/libunbound/validator/autotrust.c
2269
autr_write_file(env, tp);
sbin/unwind/libunbound/validator/autotrust.c
2278
autr_tp_remove(env, tp, dnskey_rrset);
sbin/unwind/libunbound/validator/autotrust.c
2372
struct module_env* env = (struct module_env*)arg;
sbin/unwind/libunbound/validator/autotrust.c
2374
reset_worker_timer(env);
sbin/unwind/libunbound/validator/autotrust.c
2379
probe_anchor(struct module_env* env, struct trust_anchor* tp)
sbin/unwind/libunbound/validator/autotrust.c
2384
sldns_buffer* buf = env->scratch_buffer;
sbin/unwind/libunbound/validator/autotrust.c
2385
qinfo.qname = regional_alloc_init(env->scratch, tp->name, tp->namelen);
sbin/unwind/libunbound/validator/autotrust.c
2396
(int)tp->autr->next_probe_time - (int)*env->now);
sbin/unwind/libunbound/validator/autotrust.c
2417
rrset_cache_remove(env->rrset_cache, qinfo.qname, qinfo.qname_len,
sbin/unwind/libunbound/validator/autotrust.c
2419
key_cache_remove(env->key_cache, qinfo.qname, qinfo.qname_len,
sbin/unwind/libunbound/validator/autotrust.c
2422
if(!mesh_new_callback(env->mesh, &qinfo, qflags, &edns, buf, 0,
sbin/unwind/libunbound/validator/autotrust.c
2423
&probe_answer_cb, env, 0)) {
sbin/unwind/libunbound/validator/autotrust.c
2430
todo_probe(struct module_env* env, time_t* next)
sbin/unwind/libunbound/validator/autotrust.c
2435
lock_basic_lock(&env->anchors->lock);
sbin/unwind/libunbound/validator/autotrust.c
2436
if( (el=rbtree_first(&env->anchors->autr->probe)) == RBTREE_NULL) {
sbin/unwind/libunbound/validator/autotrust.c
2438
lock_basic_unlock(&env->anchors->lock);
sbin/unwind/libunbound/validator/autotrust.c
2447
if((time_t)tp->autr->next_probe_time > *env->now) {
sbin/unwind/libunbound/validator/autotrust.c
2449
*next = (time_t)tp->autr->next_probe_time - *env->now;
sbin/unwind/libunbound/validator/autotrust.c
2451
lock_basic_unlock(&env->anchors->lock);
sbin/unwind/libunbound/validator/autotrust.c
2456
(void)rbtree_delete(&env->anchors->autr->probe, tp);
sbin/unwind/libunbound/validator/autotrust.c
2457
tp->autr->next_probe_time = calc_next_probe(env, tp->autr->retry_time);
sbin/unwind/libunbound/validator/autotrust.c
2458
(void)rbtree_insert(&env->anchors->autr->probe, &tp->autr->pnode);
sbin/unwind/libunbound/validator/autotrust.c
2459
lock_basic_unlock(&env->anchors->lock);
sbin/unwind/libunbound/validator/autotrust.c
2465
autr_probe_timer(struct module_env* env)
sbin/unwind/libunbound/validator/autotrust.c
2473
while( (tp = todo_probe(env, &next_probe)) ) {
sbin/unwind/libunbound/validator/autotrust.c
2475
probe_anchor(env, tp);
sbin/unwind/libunbound/validator/autotrust.c
2478
regional_free_all(env->scratch);
sbin/unwind/libunbound/validator/autotrust.c
72
static void do_revoked(struct module_env* env, struct autr_ta* anchor, int* c);
sbin/unwind/libunbound/validator/autotrust.h
158
time_t autr_probe_timer(struct module_env* env);
sbin/unwind/libunbound/validator/autotrust.h
176
void autr_write_file(struct module_env* env, struct trust_anchor* tp);
sbin/unwind/libunbound/validator/autotrust.h
197
int autr_process_prime(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec.c
177
nsec_verify_rrset(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec.c
188
rrset_check_sec_status(env->rrset_cache, nsec, *env->now);
sbin/unwind/libunbound/validator/val_nsec.c
191
d->security = val_verify_rrset_entry(env, ve, nsec, kkey, reason,
sbin/unwind/libunbound/validator/val_nsec.c
195
rrset_update_sec_status(env->rrset_cache, nsec, *env->now);
sbin/unwind/libunbound/validator/val_nsec.c
202
val_nsec_prove_nodata_dsreply(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec.c
223
if(!nsec_verify_rrset(env, ve, nsec, kkey, reason,
sbin/unwind/libunbound/validator/val_nsec.c
254
if(!nsec_verify_rrset(env, ve, rep->rrsets[i], kkey, reason,
sbin/unwind/libunbound/validator/val_nsec.h
79
enum sec_status val_nsec_prove_nodata_dsreply(struct module_env* env,
sbin/unwind/libunbound/validator/val_nsec3.c
1013
if(find_matching_nsec3(env, flt, ct, nm, nmlen,
sbin/unwind/libunbound/validator/val_nsec3.c
1066
nsec3_prove_closest_encloser(struct module_env* env, struct nsec3_filter* flt,
sbin/unwind/libunbound/validator/val_nsec3.c
1075
if(!nsec3_find_closest_encloser(env, flt, ct, qinfo, ce, calculations)) {
sbin/unwind/libunbound/validator/val_nsec3.c
1129
if(!find_covering_nsec3(env, flt, ct, nc, nc_len,
sbin/unwind/libunbound/validator/val_nsec3.c
1174
nsec3_do_prove_nameerror(struct module_env* env, struct nsec3_filter* flt,
sbin/unwind/libunbound/validator/val_nsec3.c
1187
sec = nsec3_prove_closest_encloser(env, flt, ct, qinfo, 1, &ce, calc);
sbin/unwind/libunbound/validator/val_nsec3.c
1211
if(!find_covering_nsec3(env, flt, ct, wc, wclen, &wc_rrset, &wc_rr, calc)) {
sbin/unwind/libunbound/validator/val_nsec3.c
1239
nsec3_prove_nameerror(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec3.c
1257
return nsec3_do_prove_nameerror(env, &flt, ct, qinfo, calc);
sbin/unwind/libunbound/validator/val_nsec3.c
1267
nsec3_do_prove_nodata(struct module_env* env, struct nsec3_filter* flt,
sbin/unwind/libunbound/validator/val_nsec3.c
1278
if(find_matching_nsec3(env, flt, ct, qinfo->qname, qinfo->qname_len,
sbin/unwind/libunbound/validator/val_nsec3.c
1339
sec = nsec3_prove_closest_encloser(env, flt, ct, qinfo, 1, &ce, calc);
sbin/unwind/libunbound/validator/val_nsec3.c
1357
if(wc && find_matching_nsec3(env, flt, ct, wc, wclen, &rrset, &rr,
sbin/unwind/libunbound/validator/val_nsec3.c
1427
nsec3_prove_nodata(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec3.c
1443
return nsec3_do_prove_nodata(env, &flt, ct, qinfo, calc);
sbin/unwind/libunbound/validator/val_nsec3.c
1447
nsec3_prove_wildcard(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec3.c
1480
if(!find_covering_nsec3(env, &flt, ct, nc, nc_len,
sbin/unwind/libunbound/validator/val_nsec3.c
1509
list_is_secure(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec3.c
1523
rrset_check_sec_status(env->rrset_cache, list[i], *env->now);
sbin/unwind/libunbound/validator/val_nsec3.c
1526
d->security = val_verify_rrset_entry(env, ve, list[i], kkey,
sbin/unwind/libunbound/validator/val_nsec3.c
1533
rrset_update_sec_status(env->rrset_cache, list[i], *env->now);
sbin/unwind/libunbound/validator/val_nsec3.c
1539
nsec3_prove_nods(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec3.c
1558
if(!list_is_secure(env, ve, list, num, kkey, reason, reason_bogus,
sbin/unwind/libunbound/validator/val_nsec3.c
1575
if(find_matching_nsec3(env, &flt, ct, qinfo->qname, qinfo->qname_len,
sbin/unwind/libunbound/validator/val_nsec3.c
1613
sec = nsec3_prove_closest_encloser(env, &flt, ct, qinfo, 1, &ce, &calc);
sbin/unwind/libunbound/validator/val_nsec3.c
1649
nsec3_prove_nxornodata(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec3.c
1671
secnx = nsec3_do_prove_nameerror(env, &flt, ct, qinfo, calc);
sbin/unwind/libunbound/validator/val_nsec3.c
1676
sec = nsec3_do_prove_nodata(env, &flt, ct, qinfo, calc);
sbin/unwind/libunbound/validator/val_nsec3.c
820
find_matching_nsec3(struct module_env* env, struct nsec3_filter* flt,
sbin/unwind/libunbound/validator/val_nsec3.c
843
r = nsec3_hash_name(ct->ct, ct->region, env->scratch_buffer,
sbin/unwind/libunbound/validator/val_nsec3.c
930
find_covering_nsec3(struct module_env* env, struct nsec3_filter* flt,
sbin/unwind/libunbound/validator/val_nsec3.c
953
r = nsec3_hash_name(ct->ct, ct->region, env->scratch_buffer,
sbin/unwind/libunbound/validator/val_nsec3.c
966
env->scratch_buffer)) {
sbin/unwind/libunbound/validator/val_nsec3.c
992
nsec3_find_closest_encloser(struct module_env* env, struct nsec3_filter* flt,
sbin/unwind/libunbound/validator/val_nsec3.h
136
nsec3_prove_nameerror(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec3.h
174
nsec3_prove_nodata(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec3.h
199
nsec3_prove_wildcard(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec3.h
229
nsec3_prove_nods(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec3.h
254
nsec3_prove_nxornodata(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_sigcrypt.c
1705
if(qstate && qstate->env && qstate->env->mesh)
sbin/unwind/libunbound/validator/val_sigcrypt.c
1706
qstate->env->mesh->val_ops++;
sbin/unwind/libunbound/validator/val_sigcrypt.c
294
ds_create_dnskey_digest(struct module_env* env,
sbin/unwind/libunbound/validator/val_sigcrypt.c
299
sldns_buffer* b = env->scratch_buffer;
sbin/unwind/libunbound/validator/val_sigcrypt.c
319
int ds_digest_match_dnskey(struct module_env* env,
sbin/unwind/libunbound/validator/val_sigcrypt.c
346
digest = regional_alloc(env->scratch, digestlen);
sbin/unwind/libunbound/validator/val_sigcrypt.c
351
if(!ds_create_dnskey_digest(env, dnskey_rrset, dnskey_idx, ds_rrset,
sbin/unwind/libunbound/validator/val_sigcrypt.c
556
dnskeyset_verify_rrset_sig(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_sigcrypt.c
589
sec = dnskey_verify_rrset_sig(env->scratch,
sbin/unwind/libunbound/validator/val_sigcrypt.c
590
env->scratch_buffer, ve, now, rrset, dnskey, i,
sbin/unwind/libunbound/validator/val_sigcrypt.c
624
dnskeyset_verify_rrset(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_sigcrypt.c
659
sec = dnskeyset_verify_rrset_sig(env, ve, *env->now, rrset,
sbin/unwind/libunbound/validator/val_sigcrypt.c
707
dnskey_verify_rrset(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_sigcrypt.c
735
sec = dnskey_verify_rrset_sig(env->scratch,
sbin/unwind/libunbound/validator/val_sigcrypt.c
736
env->scratch_buffer, ve, *env->now, rrset,
sbin/unwind/libunbound/validator/val_sigcrypt.h
156
int ds_digest_match_dnskey(struct module_env* env,
sbin/unwind/libunbound/validator/val_sigcrypt.h
272
enum sec_status dnskeyset_verify_rrset(struct module_env* env,
sbin/unwind/libunbound/validator/val_sigcrypt.h
293
enum sec_status dnskey_verify_rrset(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_utils.c
1102
val_check_nonsecure(struct module_env* env, struct reply_info* rep)
sbin/unwind/libunbound/validator/val_utils.c
1150
if(!env->cfg->val_clean_additional)
sbin/unwind/libunbound/validator/val_utils.c
1187
struct rrset_cache* r, struct module_env* env)
sbin/unwind/libunbound/validator/val_utils.c
1200
rrset_update_sec_status(r, rep->rrsets[i], *env->now);
sbin/unwind/libunbound/validator/val_utils.c
1207
struct rrset_cache* r, struct module_env* env)
sbin/unwind/libunbound/validator/val_utils.c
1217
rrset_update_sec_status(r, rep->rrsets[i], *env->now);
sbin/unwind/libunbound/validator/val_utils.c
1310
val_find_DS(struct module_env* env, uint8_t* nm, size_t nmlen, uint16_t c,
sbin/unwind/libunbound/validator/val_utils.c
1316
env->rrset_cache, nm, nmlen, LDNS_RR_TYPE_DS, c, 0,
sbin/unwind/libunbound/validator/val_utils.c
1317
*env->now, 0);
sbin/unwind/libunbound/validator/val_utils.c
1321
rrset, region, *env->now);
sbin/unwind/libunbound/validator/val_utils.c
1342
msg = val_neg_getmsg(env->neg_cache, &qinfo, region, env->rrset_cache,
sbin/unwind/libunbound/validator/val_utils.c
1343
env->scratch_buffer, *env->now, 0, topname, env->cfg);
sbin/unwind/libunbound/validator/val_utils.c
405
val_verify_rrset(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_utils.c
423
rrset_check_sec_status(env->rrset_cache, rrset, *env->now);
sbin/unwind/libunbound/validator/val_utils.c
433
sec = dnskeyset_verify_rrset(env, ve, rrset, keys, sigalg, reason,
sbin/unwind/libunbound/validator/val_utils.c
436
regional_free_all(env->scratch);
sbin/unwind/libunbound/validator/val_utils.c
467
rrset_update_sec_status(env->rrset_cache, rrset, *env->now);
sbin/unwind/libunbound/validator/val_utils.c
474
val_verify_rrset_entry(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_utils.c
491
sec = val_verify_rrset(env, ve, rrset, &dnskey, kd->algo, reason,
sbin/unwind/libunbound/validator/val_utils.c
498
verify_dnskeys_with_ds_rr(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_utils.c
523
if(!ds_digest_match_dnskey(env, dnskey_rrset, i, ds_rrset,
sbin/unwind/libunbound/validator/val_utils.c
544
sec = dnskey_verify_rrset(env, ve, dnskey_rrset, dnskey_rrset,
sbin/unwind/libunbound/validator/val_utils.c
585
val_verify_DNSKEY_with_DS(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_utils.c
626
sec = verify_dnskeys_with_ds_rr(env, ve, dnskey_rrset,
sbin/unwind/libunbound/validator/val_utils.c
686
val_verify_new_DNSKEYs(struct regional* region, struct module_env* env,
sbin/unwind/libunbound/validator/val_utils.c
693
enum sec_status sec = val_verify_DNSKEY_with_DS(env, ve,
sbin/unwind/libunbound/validator/val_utils.c
702
*env->now);
sbin/unwind/libunbound/validator/val_utils.c
708
*env->now);
sbin/unwind/libunbound/validator/val_utils.c
712
BOGUS_KEY_TTL, *reason_bogus, *reason, *env->now);
sbin/unwind/libunbound/validator/val_utils.c
716
val_verify_DNSKEY_with_TA(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_utils.c
771
sec = verify_dnskeys_with_ds_rr(env, ve, dnskey_rrset,
sbin/unwind/libunbound/validator/val_utils.c
816
sec = dnskey_verify_rrset(env, ve, dnskey_rrset,
sbin/unwind/libunbound/validator/val_utils.c
860
val_verify_new_DNSKEYs_with_ta(struct regional* region, struct module_env* env,
sbin/unwind/libunbound/validator/val_utils.c
868
enum sec_status sec = val_verify_DNSKEY_with_TA(env, ve,
sbin/unwind/libunbound/validator/val_utils.c
877
downprot?sigalg:NULL, LDNS_EDE_NONE, NULL, *env->now);
sbin/unwind/libunbound/validator/val_utils.c
883
*env->now);
sbin/unwind/libunbound/validator/val_utils.c
887
BOGUS_KEY_TTL, *reason_bogus, *reason, *env->now);
sbin/unwind/libunbound/validator/val_utils.h
132
enum sec_status val_verify_rrset_entry(struct module_env* env,
sbin/unwind/libunbound/validator/val_utils.h
157
enum sec_status val_verify_DNSKEY_with_DS(struct module_env* env,
sbin/unwind/libunbound/validator/val_utils.h
183
enum sec_status val_verify_DNSKEY_with_TA(struct module_env* env,
sbin/unwind/libunbound/validator/val_utils.h
218
struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_utils.h
251
struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_utils.h
332
void val_check_nonsecure(struct module_env* env, struct reply_info* rep);
sbin/unwind/libunbound/validator/val_utils.h
344
struct module_env* env);
sbin/unwind/libunbound/validator/val_utils.h
355
struct rrset_cache* r, struct module_env* env);
sbin/unwind/libunbound/validator/val_utils.h
427
struct dns_msg* val_find_DS(struct module_env* env, uint8_t* nm, size_t nmlen,
sbin/unwind/libunbound/validator/validator.c
1046
validate_positive_response(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/validator.c
1085
if(wc && !wc_cached && env->cfg->aggressive_nsec) {
sbin/unwind/libunbound/validator/validator.c
1125
enum sec_status sec = nsec3_prove_wildcard(env, ve,
sbin/unwind/libunbound/validator/validator.c
1156
rrset_cache_update_wildcard(env->rrset_cache, cache_s,
sbin/unwind/libunbound/validator/validator.c
1157
cache_wc, cache_wl, env->alloc, *env->now);
sbin/unwind/libunbound/validator/validator.c
1185
validate_nodata_response(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/validator.c
1246
enum sec_status sec = nsec3_prove_nodata(env, ve,
sbin/unwind/libunbound/validator/validator.c
1299
validate_nameerror_response(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/validator.c
1347
chase_reply->security = nsec3_prove_nameerror(env, ve,
sbin/unwind/libunbound/validator/validator.c
1366
validate_nodata_response(env, ve, qchase, chase_reply, kkey,
sbin/unwind/libunbound/validator/validator.c
1382
validate_nodata_response(env, ve, qchase, chase_reply, kkey,
sbin/unwind/libunbound/validator/validator.c
1460
validate_any_response(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/validator.c
1532
enum sec_status sec = nsec3_prove_wildcard(env, ve,
sbin/unwind/libunbound/validator/validator.c
1597
validate_cname_response(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/validator.c
1682
enum sec_status sec = nsec3_prove_wildcard(env, ve,
sbin/unwind/libunbound/validator/validator.c
1737
validate_cname_noanswer_response(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/validator.c
181
val_apply_cfg(struct module_env* env, struct val_env* val_env,
sbin/unwind/libunbound/validator/validator.c
1823
enum sec_status sec = nsec3_prove_nxornodata(env, ve,
sbin/unwind/libunbound/validator/validator.c
186
if(!env->anchors)
sbin/unwind/libunbound/validator/validator.c
187
env->anchors = anchors_create();
sbin/unwind/libunbound/validator/validator.c
188
if(!env->anchors) {
sbin/unwind/libunbound/validator/validator.c
192
if (env->key_cache)
sbin/unwind/libunbound/validator/validator.c
1925
val_mark_indeterminate(vq->chase_reply, qstate->env->anchors,
sbin/unwind/libunbound/validator/validator.c
1926
qstate->env->rrset_cache, qstate->env);
sbin/unwind/libunbound/validator/validator.c
193
val_env->kcache = env->key_cache;
sbin/unwind/libunbound/validator/validator.c
1930
anchor = anchors_lookup(qstate->env->anchors,
sbin/unwind/libunbound/validator/validator.c
1955
anchor = anchors_lookup(qstate->env->anchors,
sbin/unwind/libunbound/validator/validator.c
1987
vq->qchase.qclass, qstate->region, *qstate->env->now);
sbin/unwind/libunbound/validator/validator.c
200
env->key_cache = val_env->kcache;
sbin/unwind/libunbound/validator/validator.c
2006
qstate->env->rrset_cache, qstate->env);
sbin/unwind/libunbound/validator/validator.c
201
if(!anchors_apply_cfg(env->anchors, cfg)) {
sbin/unwind/libunbound/validator/validator.c
2034
qstate->env->rrset_cache, qstate->env);
sbin/unwind/libunbound/validator/validator.c
210
if (env->neg_cache)
sbin/unwind/libunbound/validator/validator.c
211
val_env->neg_cache = env->neg_cache;
sbin/unwind/libunbound/validator/validator.c
219
env->neg_cache = val_env->neg_cache;
sbin/unwind/libunbound/validator/validator.c
2200
(msg=val_find_DS(qstate->env, target_key_name,
sbin/unwind/libunbound/validator/validator.c
227
val_init(struct module_env* env, int id)
sbin/unwind/libunbound/validator/validator.c
2271
qstate->env->rrset_cache, qstate->env);
sbin/unwind/libunbound/validator/validator.c
2273
qstate->env->cfg->val_log_level >= 2);
sbin/unwind/libunbound/validator/validator.c
2288
qstate->env->cfg->val_log_level >= 2);
sbin/unwind/libunbound/validator/validator.c
2312
if(!validate_msg_signatures(qstate, vq, qstate->env, ve,
sbin/unwind/libunbound/validator/validator.c
2347
validate_positive_response(qstate->env, ve,
sbin/unwind/libunbound/validator/validator.c
235
env->modinfo[id] = (void*)val_env;
sbin/unwind/libunbound/validator/validator.c
236
env->need_to_validate = 1;
sbin/unwind/libunbound/validator/validator.c
2363
validate_nodata_response(qstate->env, ve,
sbin/unwind/libunbound/validator/validator.c
2380
validate_nameerror_response(qstate->env, ve,
sbin/unwind/libunbound/validator/validator.c
2398
validate_cname_response(qstate->env, ve,
sbin/unwind/libunbound/validator/validator.c
2415
validate_cname_noanswer_response(qstate->env, ve,
sbin/unwind/libunbound/validator/validator.c
243
if(!val_apply_cfg(env, val_env, env->cfg)) {
sbin/unwind/libunbound/validator/validator.c
2440
validate_any_response(qstate->env, ve, &vq->qchase,
sbin/unwind/libunbound/validator/validator.c
247
if(env->cfg->disable_edns_do) {
sbin/unwind/libunbound/validator/validator.c
249
env->anchors);
sbin/unwind/libunbound/validator/validator.c
2541
val_check_nonsecure(qstate->env, vq->orig_msg->rep);
sbin/unwind/libunbound/validator/validator.c
2546
val_neg_addreply(qstate->env->neg_cache,
sbin/unwind/libunbound/validator/validator.c
255
env->cfg->disable_edns_do = 0;
sbin/unwind/libunbound/validator/validator.c
2571
if(qstate->env->cfg->serve_expired &&
sbin/unwind/libunbound/validator/validator.c
2572
(e=msg_cache_lookup(qstate->env, qstate->qinfo.qname,
sbin/unwind/libunbound/validator/validator.c
2579
(!qstate->env->cfg->serve_expired_ttl ||
sbin/unwind/libunbound/validator/validator.c
2580
qstate->env->cfg->serve_expired_ttl_reset ||
sbin/unwind/libunbound/validator/validator.c
2581
*qstate->env->now <= rep->serve_expired_ttl)) {
sbin/unwind/libunbound/validator/validator.c
2587
*qstate->env->now;
sbin/unwind/libunbound/validator/validator.c
2588
if(qstate->env->cfg->serve_expired_ttl_reset &&
sbin/unwind/libunbound/validator/validator.c
2589
*qstate->env->now + qstate->env->cfg->serve_expired_ttl
sbin/unwind/libunbound/validator/validator.c
2593
rep->serve_expired_ttl = *qstate->env->now +
sbin/unwind/libunbound/validator/validator.c
2594
qstate->env->cfg->serve_expired_ttl;
sbin/unwind/libunbound/validator/validator.c
2616
vq->orig_msg->rep->ttl + qstate->env->cfg->serve_expired_ttl;
sbin/unwind/libunbound/validator/validator.c
2617
if((qstate->env->cfg->val_log_level >= 1 ||
sbin/unwind/libunbound/validator/validator.c
2618
qstate->env->cfg->log_servfail) &&
sbin/unwind/libunbound/validator/validator.c
2619
!qstate->env->cfg->val_log_squelch) {
sbin/unwind/libunbound/validator/validator.c
2620
if(qstate->env->cfg->val_log_level < 2 &&
sbin/unwind/libunbound/validator/validator.c
2621
!qstate->env->cfg->log_servfail)
sbin/unwind/libunbound/validator/validator.c
263
val_deinit(struct module_env* env, int id)
sbin/unwind/libunbound/validator/validator.c
2640
if(qstate->env->cfg->val_permissive_mode)
sbin/unwind/libunbound/validator/validator.c
2645
qstate->env->cfg->root_key_sentinel &&
sbin/unwind/libunbound/validator/validator.c
2655
!anchor_has_keytag(qstate->env->anchors,
sbin/unwind/libunbound/validator/validator.c
266
if(!env || !env->modinfo[id])
sbin/unwind/libunbound/validator/validator.c
2665
anchor_has_keytag(qstate->env->anchors,
sbin/unwind/libunbound/validator/validator.c
268
val_env = (struct val_env*)env->modinfo[id];
sbin/unwind/libunbound/validator/validator.c
2689
if(!dns_cache_store(qstate->env, &vq->orig_msg->qinfo,
sbin/unwind/libunbound/validator/validator.c
2699
if(!dns_cache_store(qstate->env, &vq->orig_msg->qinfo,
sbin/unwind/libunbound/validator/validator.c
270
anchors_delete(env->anchors);
sbin/unwind/libunbound/validator/validator.c
271
env->anchors = NULL;
sbin/unwind/libunbound/validator/validator.c
273
env->key_cache = NULL;
sbin/unwind/libunbound/validator/validator.c
275
env->neg_cache = NULL;
sbin/unwind/libunbound/validator/validator.c
2755
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/validator/validator.c
279
env->modinfo[id] = NULL;
sbin/unwind/libunbound/validator/validator.c
2863
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/validator/validator.c
2869
int downprot = qstate->env->cfg->harden_algo_downgrade;
sbin/unwind/libunbound/validator/validator.c
2884
if(qstate->env->cfg->harden_dnssec_stripped) {
sbin/unwind/libunbound/validator/validator.c
2888
reason_bogus, rstr, *qstate->env->now);
sbin/unwind/libunbound/validator/validator.c
2891
reason_bogus, rstr, *qstate->env->now);
sbin/unwind/libunbound/validator/validator.c
2899
kkey = val_verify_new_DNSKEYs_with_ta(qstate->region, qstate->env, ve,
sbin/unwind/libunbound/validator/validator.c
2919
if(qstate->env->cfg->harden_dnssec_stripped) {
sbin/unwind/libunbound/validator/validator.c
2924
*qstate->env->now);
sbin/unwind/libunbound/validator/validator.c
2928
*qstate->env->now);
sbin/unwind/libunbound/validator/validator.c
2969
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/validator/validator.c
3012
sec = val_verify_rrset_entry(qstate->env, ve, ds,
sbin/unwind/libunbound/validator/validator.c
3032
*qstate->env->now);
sbin/unwind/libunbound/validator/validator.c
3040
NULL, LDNS_EDE_NONE, NULL, *qstate->env->now);
sbin/unwind/libunbound/validator/validator.c
3064
qstate->env, ve, qinfo, msg->rep, vq->key_entry,
sbin/unwind/libunbound/validator/validator.c
3075
*qstate->env->now);
sbin/unwind/libunbound/validator/validator.c
3100
sec = nsec3_prove_nods(qstate->env, ve,
sbin/unwind/libunbound/validator/validator.c
3117
*qstate->env->now);
sbin/unwind/libunbound/validator/validator.c
3169
sec = val_verify_rrset_entry(qstate->env, ve, cname,
sbin/unwind/libunbound/validator/validator.c
3257
reason_bogus, reason, *qstate->env->now);
sbin/unwind/libunbound/validator/validator.c
3287
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/validator/validator.c
3386
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/validator/validator.c
3430
BOGUS_KEY_TTL, reason_bogus, rstr, *qstate->env->now);
sbin/unwind/libunbound/validator/validator.c
3447
downprot = qstate->env->cfg->harden_algo_downgrade;
sbin/unwind/libunbound/validator/validator.c
3448
vq->key_entry = val_verify_new_DNSKEYs(qstate->region, qstate->env,
sbin/unwind/libunbound/validator/validator.c
3484
qstate->env->cfg->val_log_level >= 2);
sbin/unwind/libunbound/validator/validator.c
3508
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/validator/validator.c
3510
struct trust_anchor* ta = anchor_find(qstate->env->anchors,
sbin/unwind/libunbound/validator/validator.c
3530
if(!autr_process_prime(qstate->env, ve, ta, dnskey_rrset,
sbin/unwind/libunbound/validator/validator.c
3557
qstate->env->cfg->val_log_level >= 2);
sbin/unwind/libunbound/validator/validator.c
3646
val_get_mem(struct module_env* env, int id)
sbin/unwind/libunbound/validator/validator.c
3648
struct val_env* ve = (struct val_env*)env->modinfo[id];
sbin/unwind/libunbound/validator/validator.c
488
fptr_ok(fptr_whitelist_modenv_detect_cycle(qstate->env->detect_cycle));
sbin/unwind/libunbound/validator/validator.c
489
if((*qstate->env->detect_cycle)(qstate, &ask,
sbin/unwind/libunbound/validator/validator.c
498
qstate->env->add_sub));
sbin/unwind/libunbound/validator/validator.c
499
if(!(*qstate->env->add_sub)(qstate, &ask, NULL,
sbin/unwind/libunbound/validator/validator.c
507
qstate->env->attach_sub));
sbin/unwind/libunbound/validator/validator.c
508
if(!(*qstate->env->attach_sub)(qstate, &ask, NULL,
sbin/unwind/libunbound/validator/validator.c
637
if(newq && qstate->env->cfg->trust_anchor_signaling &&
sbin/unwind/libunbound/validator/validator.c
687
struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/validator.c
762
sec = val_verify_rrset_entry(env, ve, s, key_entry, &reason,
sbin/unwind/libunbound/validator/validator.c
785
i+1 < (env->cfg->val_clean_additional?
sbin/unwind/libunbound/validator/validator.c
807
sec = val_verify_rrset_entry(env, ve, s, key_entry, &reason,
sbin/unwind/libunbound/validator/validator.c
825
i+1 < (env->cfg->val_clean_additional?
sbin/unwind/libunbound/validator/validator.c
839
if(!env->cfg->val_clean_additional)
sbin/unwind/libunbound/validator/validator.c
853
(void)val_verify_rrset_entry(env, ve, s, key_entry,
sbin/unwind/libunbound/validator/validator.c
879
mesh_run(qstate->env->mesh, qstate->mesh_info, module_event_pass,
sbin/unwind/libunbound/validator/validator.c
903
qstate->env->worker_base,
sbin/unwind/libunbound/validator/validator.c
918
if(qstate->env->mesh->all.count >= qstate->env->mesh->max_reply_states)
sbin/unwind/libunbound/validator/validator.c
920
else if(qstate->env->mesh->all.count >= qstate->env->mesh->max_reply_states/2)
sbin/unwind/libunbound/validator/validator.c
922
else if(qstate->env->mesh->all.count >= qstate->env->mesh->max_reply_states/4)
sbin/unwind/libunbound/validator/validator.c
933
usec = base + ub_random_max(qstate->env->rnd, usec-base);
sbin/unwind/libunbound/validator/validator.h
250
int val_init(struct module_env* env, int id);
sbin/unwind/libunbound/validator/validator.h
253
void val_deinit(struct module_env* env, int id);
sbin/unwind/libunbound/validator/validator.h
279
size_t val_get_mem(struct module_env* env, int id);
sbin/unwind/resolver.c
1194
if (res->ctx->env->msg_cache != NULL) {
sbin/unwind/resolver.c
1196
if (res->ctx->env->msg_cache != unified_msg_cache ||
sbin/unwind/resolver.c
1197
res->ctx->env->rrset_cache != unified_rrset_cache ||
sbin/unwind/resolver.c
1198
res->ctx->env->key_cache != unified_key_cache ||
sbin/unwind/resolver.c
1199
res->ctx->env->neg_cache != unified_neg_cache)
sbin/unwind/resolver.c
1206
res->ctx->env->msg_cache = unified_msg_cache;
sbin/unwind/resolver.c
1207
res->ctx->env->rrset_cache = unified_rrset_cache;
sbin/unwind/resolver.c
1208
res->ctx->env->key_cache = unified_key_cache;
sbin/unwind/resolver.c
1209
res->ctx->env->neg_cache = unified_neg_cache;
sbin/unwind/resolver.c
1213
if (res->ctx->env->msg_cache != unified_msg_cache ||
sbin/unwind/resolver.c
1214
res->ctx->env->rrset_cache != unified_rrset_cache ||
sbin/unwind/resolver.c
1215
res->ctx->env->key_cache != unified_key_cache ||
sbin/unwind/resolver.c
1216
res->ctx->env->neg_cache != unified_neg_cache)
sbin/unwind/resolver.c
1436
if (res->ctx->env->msg_cache == unified_msg_cache) {
sbin/unwind/resolver.c
1440
res->ctx->env->modinfo[val_id];
sbin/unwind/resolver.c
1441
res->ctx->env->msg_cache = NULL;
sbin/unwind/resolver.c
1442
res->ctx->env->rrset_cache = NULL;
sbin/unwind/resolver.c
1444
res->ctx->env->key_cache = NULL;
sbin/unwind/resolver.c
1446
res->ctx->env->neg_cache = NULL;
sbin/unwind/resolver.c
1478
if (ctx->env->msg_cache == NULL || ctx->env->rrset_cache == NULL ||
sbin/unwind/resolver.c
1479
ctx->env->key_cache == NULL || ctx->env->neg_cache == NULL)
sbin/unwind/resolver.c
1482
unified_msg_cache = ctx->env->msg_cache;
sbin/unwind/resolver.c
1483
unified_rrset_cache = ctx->env->rrset_cache;
sbin/unwind/resolver.c
1484
unified_key_cache = ctx->env->key_cache;
sbin/unwind/resolver.c
1485
unified_neg_cache = ctx->env->neg_cache;
sbin/unwind/resolver.c
1498
val_env = (struct val_env*)ctx->env->modinfo[val_id];
sbin/unwind/resolver.c
1499
ctx->env->msg_cache = NULL;
sbin/unwind/resolver.c
1500
ctx->env->rrset_cache = NULL;
sbin/unwind/resolver.c
1501
ctx->env->key_cache = NULL;
sbin/unwind/resolver.c
1503
ctx->env->neg_cache = NULL;
sys/arch/alpha/alpha/dec_6600.c
330
mc_env_ev6 *env = (mc_env_ev6 *)(logout + hdr->la_system_offset);
sys/arch/alpha/alpha/dec_6600.c
353
if ((env->cpuir & EV6_ENV_CPUIR_CPU_ENABLE(itemno)) != 0 &&
sys/arch/alpha/alpha/dec_6600.c
354
(env->cpuir & EV6_ENV_CPUIR_CPU_FAIL(itemno)) != 0) {
sys/arch/alpha/alpha/dec_6600.c
361
if (env->smir & EV6_ENV_SMIR_PSU_FAILURE) {
sys/arch/alpha/alpha/dec_6600.c
363
if ((env->psir & EV6_ENV_PSIR_PSU_FAIL(itemno)) != 0) {
sys/arch/alpha/alpha/dec_6600.c
364
if ((env->psir &
sys/arch/alpha/alpha/dec_6600.c
370
if ((env->psir &
sys/arch/alpha/alpha/dec_6600.c
383
printf("Flags\t%016lx\n", (unsigned long)env->flags);
sys/arch/alpha/alpha/dec_6600.c
384
printf("DIR\t%016lx\n", (unsigned long)env->c_dir);
sys/arch/alpha/alpha/dec_6600.c
385
printf("SMIR\t%016lx\n", (unsigned long)env->smir);
sys/arch/alpha/alpha/dec_6600.c
386
printf("CPUIR\t%016lx\n", (unsigned long)env->cpuir);
sys/arch/alpha/alpha/dec_6600.c
387
printf("PSIR\t%016lx\n", (unsigned long)env->psir);
sys/arch/alpha/alpha/dec_6600.c
388
printf("LM78_ISR\t%016lx\n", (unsigned long)env->lm78_isr);
sys/arch/alpha/alpha/dec_6600.c
389
printf("Doors\t%016lx\n", (unsigned long)env->doors);
sys/arch/alpha/alpha/dec_6600.c
391
(unsigned long)env->temp_warning);
sys/arch/alpha/alpha/dec_6600.c
393
(unsigned long)env->fan_control);
sys/arch/alpha/alpha/dec_6600.c
395
(unsigned long)env->fatal_power_down);
sys/arch/alpha/alpha/dec_6600.c
406
if (mces == 0 && env->fatal_power_down == 0)
sys/arch/loongson/loongson/pmon.c
180
struct pmon_env *env = (struct pmon_env *)pmon_envp;
sys/arch/loongson/loongson/pmon.c
185
return &env->reset;
sys/arch/loongson/loongson/pmon.c
191
struct pmon_env *env = (struct pmon_env *)pmon_envp;
sys/arch/loongson/loongson/pmon.c
196
return &env->efi.bios;
sys/arch/loongson/loongson/pmon.c
202
struct pmon_env *env = (struct pmon_env *)pmon_envp;
sys/arch/loongson/loongson/pmon.c
203
uint64_t va = (uint64_t)&env->efi.bios.ptrs;
sys/arch/loongson/loongson/pmon.c
209
(va + env->efi.bios.ptrs.offs_mem);
sys/arch/loongson/loongson/pmon.c
215
struct pmon_env *env = (struct pmon_env *)pmon_envp;
sys/arch/loongson/loongson/pmon.c
216
uint64_t va = (uint64_t)&env->efi.bios.ptrs;
sys/arch/loongson/loongson/pmon.c
222
(va + env->efi.bios.ptrs.offs_cpu);
sys/arch/loongson/loongson/pmon.c
228
struct pmon_env *env = (struct pmon_env *)pmon_envp;
sys/arch/loongson/loongson/pmon.c
229
uint64_t va = (uint64_t)&env->efi.bios.ptrs;
sys/arch/loongson/loongson/pmon.c
235
(va + env->efi.bios.ptrs.offs_sys);
sys/arch/loongson/loongson/pmon.c
241
struct pmon_env *env = (struct pmon_env *)pmon_envp;
sys/arch/loongson/loongson/pmon.c
242
uint64_t va = (uint64_t)&env->efi.bios.ptrs;
sys/arch/loongson/loongson/pmon.c
248
(va + env->efi.bios.ptrs.offs_irq);
sys/arch/loongson/loongson/pmon.c
254
struct pmon_env *env = (struct pmon_env *)pmon_envp;
sys/arch/loongson/loongson/pmon.c
255
uint64_t va = (uint64_t)&env->efi.bios.ptrs;
sys/arch/loongson/loongson/pmon.c
261
(va + env->efi.bios.ptrs.offs_iface);
sys/arch/loongson/loongson/pmon.c
267
struct pmon_env *env = (struct pmon_env *)pmon_envp;
sys/arch/loongson/loongson/pmon.c
268
uint64_t va = (uint64_t)&env->efi.bios.ptrs;
sys/arch/loongson/loongson/pmon.c
274
(va + env->efi.bios.ptrs.offs_special);
sys/arch/loongson/loongson/pmon.c
280
struct pmon_env *env = (struct pmon_env *)pmon_envp;
sys/arch/loongson/loongson/pmon.c
281
uint64_t va = (uint64_t)&env->efi.bios.ptrs;
sys/arch/loongson/loongson/pmon.c
287
(va + env->efi.bios.ptrs.offs_device);
sys/arch/loongson/loongson/pmon.c
67
struct pmon_env *env = (struct pmon_env *)pmon_envp;
sys/arch/loongson/loongson/pmon.c
89
if (env->efi.bios.version < 0x2000 &&
sys/arch/loongson/loongson/pmon.c
90
env->efi.bios.vga_bios >= CKSEG0_BASE &&
sys/arch/loongson/loongson/pmon.c
91
env->efi.bios.vga_bios < CKSEG0_BASE + CKSEG_SIZE) {
sys/arch/macppc/dev/pm_direct.c
690
int env, old;
sys/arch/macppc/dev/pm_direct.c
695
env = pmdata->data[3];
sys/arch/macppc/dev/pm_direct.c
698
pm_lid_sens.value = !(env & PMU_ENV_LID_CLOSED);
sys/arch/macppc/dev/pm_direct.c
699
if (!(old & PMU_ENV_LID_CLOSED) && (env & PMU_ENV_LID_CLOSED))
sys/arch/macppc/dev/pm_direct.c
702
hw_power = !!(env & PMU_ENV_AC_POWER);
sys/arch/macppc/dev/pm_direct.c
708
if ((old & PMU_ENV_POWER_BUTTON) && !(env & PMU_ENV_POWER_BUTTON))
sys/arch/macppc/dev/pm_direct.c
711
pm_old_env = env;
sys/arch/macppc/macppc/machdep.c
875
faultbuf env;
sys/arch/macppc/macppc/machdep.c
878
if (setfault(&env)) {
sys/arch/macppc/pci/mpcpcibus.c
490
faultbuf env;
sys/arch/macppc/pci/mpcpcibus.c
512
if (setfault(&env)) {
sys/arch/powerpc/ddb/db_memrw.c
59
faultbuf env;
sys/arch/powerpc/ddb/db_memrw.c
61
if (setfault(&env)) {
sys/arch/powerpc/ddb/db_memrw.c
86
faultbuf env;
sys/arch/powerpc/ddb/db_memrw.c
89
if (setfault(&env)) {
sys/arch/powerpc/include/pcb.h
65
int setfault(faultbuf *env) __returns_twice;
sys/arch/powerpc/powerpc/pmap.c
1761
faultbuf env;
sys/arch/powerpc/powerpc/pmap.c
1770
if (setfault(&env)) {
sys/arch/powerpc/powerpc/pmap.c
1791
faultbuf env;
sys/arch/powerpc/powerpc/pmap.c
1800
if (setfault(&env)) {
sys/arch/powerpc/powerpc/pmap.c
1821
faultbuf env;
sys/arch/powerpc/powerpc/pmap.c
1829
if (setfault(&env)) {
sys/arch/powerpc/powerpc/pmap.c
1851
faultbuf env;
sys/arch/powerpc/powerpc/pmap.c
1862
if (setfault(&env)) {
sys/arch/powerpc/powerpc/pmap.c
1907
faultbuf env;
sys/arch/powerpc/powerpc/pmap.c
1918
if (setfault(&env)) {
sys/arch/powerpc/powerpc/trap.c
544
faultbuf env;
sys/arch/powerpc/powerpc/trap.c
548
if (setfault(&env)) {
sys/arch/sparc64/dev/ldc.c
222
if (lp->env & LDC_FRAG_START) {
sys/arch/sparc64/dev/ldc.c
223
lc->lc_len = (lp->env & LDC_LEN_MASK) + 8;
sys/arch/sparc64/dev/ldc.c
227
len = (lp->env & LDC_LEN_MASK);
sys/arch/sparc64/dev/ldc.c
237
if (lp->env & LDC_FRAG_STOP)
sys/arch/sparc64/dev/ldc.c
330
lp->env = LDC_MODE_UNRELIABLE;
sys/arch/sparc64/dev/ldc.c
365
lp->env = LDC_MODE_UNRELIABLE;
sys/arch/sparc64/dev/ldc.c
400
lp->env = LDC_MODE_UNRELIABLE;
sys/arch/sparc64/dev/ldc.c
445
lp->env = min(len, LDC_PKT_PAYLOAD);
sys/arch/sparc64/dev/ldc.c
447
lp->env |= LDC_FRAG_START;
sys/arch/sparc64/dev/ldc.c
449
lp->env |= LDC_FRAG_STOP;
sys/arch/sparc64/dev/ldcvar.h
48
uint8_t env;
sys/arch/sparc64/dev/vdsk.c
476
if ((lp->env & LDC_FRAG_START) == 0 &&
sys/arch/sparc64/dev/vdsk.c
477
(lp->env & LDC_FRAG_STOP) == 0)
sys/arch/sparc64/dev/vdsk.c
483
if((lp->env & LDC_FRAG_START) == 0)
sys/arch/sparc64/dev/vdsp.c
506
if ((lp->env & LDC_FRAG_START) == 0 &&
sys/arch/sparc64/dev/vdsp.c
507
(lp->env & LDC_FRAG_STOP) == 0)
sys/arch/sparc64/dev/vdsp.c
513
if((lp->env & LDC_FRAG_START) == 0)
sys/arch/sparc64/dev/vnet.c
466
if ((lp->env & LDC_FRAG_START) == 0 &&
sys/arch/sparc64/dev/vnet.c
467
(lp->env & LDC_FRAG_STOP) == 0)
sys/arch/sparc64/dev/vnet.c
473
if((lp->env & LDC_FRAG_START) == 0)
sys/dev/acpi/dsdt.c
4725
struct aml_value env;
sys/dev/acpi/dsdt.c
4730
memset(&env, 0, sizeof(env));
sys/dev/acpi/dsdt.c
4731
env.type = AML_OBJTYPE_INTEGER;
sys/dev/acpi/dsdt.c
4732
env.v_integer = val;
sys/dev/acpi/dsdt.c
4734
return aml_evalnode(sc, node, 1, &env, NULL);
sys/dev/pci/drm/drm_mipi_dsi.c
71
static int mipi_dsi_uevent(const struct device *dev, struct kobj_uevent_env *env)
sys/dev/pci/drm/drm_mipi_dsi.c
76
err = of_device_uevent_modalias(dev, env);
sys/dev/pci/drm/drm_mipi_dsi.c
80
add_uevent_var(env, "MODALIAS=%s%s", MIPI_DSI_MODULE_PREFIX,
sys/dev/pci/drm/i915/gvt/handlers.c
1521
char *env[3] = {NULL, NULL, NULL};
sys/dev/pci/drm/i915/gvt/handlers.c
1526
env[0] = display_ready_str;
sys/dev/pci/drm/i915/gvt/handlers.c
1529
env[1] = vmid_str;
sys/dev/pci/drm/i915/gvt/handlers.c
1531
return kobject_uevent_env(kobj, KOBJ_ADD, env);
usr.bin/awk/run.c
188
if (setjmp(env) != 0)
usr.bin/awk/run.c
206
if (setjmp(env) != 0) /* handles exit within END */
usr.bin/awk/run.c
371
longjmp(env, 1);
usr.bin/awk/run.c
77
jmp_buf env;
usr.bin/cvs/client.c
1034
char *env, *envdup, buf[PATH_MAX], fpath[PATH_MAX];
usr.bin/cvs/client.c
1044
if ((env = getenv("CVS_CLIENT_LOG")) == NULL)
usr.bin/cvs/client.c
1047
envdup = xstrdup(env);
usr.bin/cvs/client.c
1051
if (strlcpy(buf, env, sizeof(buf)) >= sizeof(buf))
usr.bin/doas/env.c
100
RB_INIT(&env->root);
usr.bin/doas/env.c
101
env->count = 0;
usr.bin/doas/env.c
103
addnode(env, "DOAS_USER", mypw->pw_name);
usr.bin/doas/env.c
104
addnode(env, "HOME", targpw->pw_dir);
usr.bin/doas/env.c
105
addnode(env, "LOGNAME", targpw->pw_name);
usr.bin/doas/env.c
106
addnode(env, "PATH", getenv("PATH"));
usr.bin/doas/env.c
107
addnode(env, "SHELL", targpw->pw_shell);
usr.bin/doas/env.c
108
addnode(env, "USER", targpw->pw_name);
usr.bin/doas/env.c
110
fillenv(env, copyset);
usr.bin/doas/env.c
133
if (RB_INSERT(envtree, &env->root, node)) {
usr.bin/doas/env.c
137
env->count++;
usr.bin/doas/env.c
142
return env;
usr.bin/doas/env.c
146
flattenenv(struct env *env)
usr.bin/doas/env.c
152
envp = reallocarray(NULL, env->count + 1, sizeof(char *));
usr.bin/doas/env.c
156
RB_FOREACH(node, envtree, &env->root) {
usr.bin/doas/env.c
166
fillenv(struct env *env, const char **envlist)
usr.bin/doas/env.c
192
if ((node = RB_FIND(envtree, &env->root, &key))) {
usr.bin/doas/env.c
193
RB_REMOVE(envtree, &env->root, node);
usr.bin/doas/env.c
195
env->count--;
usr.bin/doas/env.c
218
RB_INSERT(envtree, &env->root, node);
usr.bin/doas/env.c
219
env->count++;
usr.bin/doas/env.c
228
struct env *env;
usr.bin/doas/env.c
230
env = createenv(rule, mypw, targpw);
usr.bin/doas/env.c
232
fillenv(env, rule->envlist);
usr.bin/doas/env.c
234
return flattenenv(env);
usr.bin/doas/env.c
44
static void fillenv(struct env *env, const char **envlist);
usr.bin/doas/env.c
77
addnode(struct env *env, const char *key, const char *value)
usr.bin/doas/env.c
82
RB_INSERT(envtree, &env->root, node);
usr.bin/doas/env.c
83
env->count++;
usr.bin/doas/env.c
86
static struct env *
usr.bin/doas/env.c
94
struct env *env;
usr.bin/doas/env.c
97
env = malloc(sizeof(*env));
usr.bin/doas/env.c
98
if (!env)
usr.bin/less/option.c
293
s = optstring(s, &str, printopt, o->odesc[1], env);
usr.bin/less/option.c
562
optstring(char *s, char **p_str, char *printopt, char *validchars, int env)
usr.bin/less/option.c
580
if ((*p == END_OPTION_STRING && env == 1) ||
usr.bin/less/option.c
69
scan_option(char *s, int env)
usr.bin/lex/scanopt.c
121
char *env;
usr.bin/lex/scanopt.c
131
if ((env = getenv ("COLUMNS")) != NULL)
usr.bin/lex/scanopt.c
132
cols = atoi (env);
usr.bin/mail/vars.c
103
char *env;
usr.bin/mail/vars.c
107
else if ((env = getenv(name)))
usr.bin/mail/vars.c
108
return(env);
usr.bin/make/var.c
466
char *env;
usr.bin/make/var.c
468
env = getenv(v->name);
usr.bin/make/var.c
469
if (env == NULL)
usr.bin/make/var.c
472
var_set_value(v, env);
usr.bin/rdist/docmd.c
609
rcmptime(struct stat *st, struct subcmd *sbcmds, char **env)
usr.bin/rdist/docmd.c
638
cmptime(target, sbcmds, env);
usr.bin/rdist/docmd.c
649
cmptime(char *name, struct subcmd *sbcmds, char **env)
usr.bin/rdist/docmd.c
680
rcmptime(&stb, sbcmds, env);
usr.bin/rdist/docmd.c
698
if (*env) {
usr.bin/rdist/docmd.c
699
size_t len = strlen(*env) + strlen(name) + 2;
usr.bin/rdist/docmd.c
700
*env = xrealloc(*env, len);
usr.bin/rdist/docmd.c
701
(void) strlcat(*env, name, len);
usr.bin/rdist/docmd.c
702
(void) strlcat(*env, ":", len);
usr.bin/rdist/docmd.c
724
char *env, *stamp = cmd->c_name;
usr.bin/rdist/docmd.c
740
env = NULL;
usr.bin/rdist/docmd.c
743
env = xmalloc(sizeof(E_FILES) + 3);
usr.bin/rdist/docmd.c
744
(void) snprintf(env, sizeof(E_FILES) + 3,
usr.bin/rdist/docmd.c
769
cmptime(f->n_name, sbcmds, &env);
usr.bin/rdist/docmd.c
775
else if (sc->sc_type == CMDSPECIAL && env) {
usr.bin/rdist/docmd.c
776
size_t len = strlen(env);
usr.bin/rdist/docmd.c
777
if (env[len - 1] == ':')
usr.bin/rdist/docmd.c
778
env[--len] = CNULL;
usr.bin/rdist/docmd.c
780
env = xrealloc(env, len);
usr.bin/rdist/docmd.c
781
(void) strlcat(env, "';", len);
usr.bin/rdist/docmd.c
782
(void) strlcat(env, sc->sc_name, len);
usr.bin/rdist/docmd.c
783
message(MT_CHANGE, "cmdspecial \"%s\"", env);
usr.bin/rdist/docmd.c
785
runcommand(env);
usr.bin/rdist/docmd.c
786
(void) free(env);
usr.bin/rdist/docmd.c
787
env = NULL; /* so cmdspecial is only called once */
usr.bin/rdistd/filesys.c
205
longjmp(env, 1);
usr.bin/rdistd/filesys.c
228
if (setjmp(env)) {
usr.bin/rdistd/filesys.c
46
jmp_buf env;
usr.bin/rdistd/server.c
492
char *cmd, *env = NULL;
usr.bin/rdistd/server.c
508
if (env == NULL) {
usr.bin/rdistd/server.c
510
env = xmalloc(len);
usr.bin/rdistd/server.c
511
(void) snprintf(env, len, "export %s;%s=%s",
usr.bin/rdistd/server.c
514
len = strlen(env) + 1 + strlen(cp) + 1;
usr.bin/rdistd/server.c
515
env = xrealloc(env, len);
usr.bin/rdistd/server.c
516
(void) strlcat(env, ":", len);
usr.bin/rdistd/server.c
517
(void) strlcat(env, cp, len);
usr.bin/rdistd/server.c
523
if (env) {
usr.bin/rdistd/server.c
524
len = strlen(env) + 1 + strlen(cp) + 1;
usr.bin/rdistd/server.c
525
env = xrealloc(env, len);
usr.bin/rdistd/server.c
526
(void) strlcat(env, ";", len);
usr.bin/rdistd/server.c
527
(void) strlcat(env, cp, len);
usr.bin/rdistd/server.c
528
cmd = env;
usr.bin/rdistd/server.c
533
if (env)
usr.bin/rdistd/server.c
534
(void) free(env);
usr.bin/ssh/auth-options.c
215
free(opts->env[i]);
usr.bin/ssh/auth-options.c
216
free(opts->env);
usr.bin/ssh/auth-options.c
427
if (strncmp(ret->env[i], cp, l) == 0 &&
usr.bin/ssh/auth-options.c
428
ret->env[i][l] == '=')
usr.bin/ssh/auth-options.c
435
oarray = ret->env;
usr.bin/ssh/auth-options.c
436
if ((ret->env = recallocarray(ret->env,
usr.bin/ssh/auth-options.c
438
sizeof(*ret->env))) == NULL) {
usr.bin/ssh/auth-options.c
441
ret->env = oarray;
usr.bin/ssh/auth-options.c
444
ret->env[ret->nenv++] = opt;
usr.bin/ssh/auth-options.c
566
if (dup_strings(&ret->env, &ret->nenv,
usr.bin/ssh/auth-options.c
567
primary->env, primary->nenv) != 0)
usr.bin/ssh/auth-options.c
570
if (dup_strings(&ret->env, &ret->nenv,
usr.bin/ssh/auth-options.c
571
additional->env, additional->nenv) != 0)
usr.bin/ssh/auth-options.c
690
if (dup_strings(&ret->env, &ret->nenv, orig->env, orig->nenv) != 0 ||
usr.bin/ssh/auth-options.c
833
if ((r = serialise_array(m, opts->env,
usr.bin/ssh/auth-options.c
894
if ((r = deserialise_array(m, &opts->env, &opts->nenv)) != 0 ||
usr.bin/ssh/auth-options.h
58
char **env;
usr.bin/ssh/auth.c
630
debug("%s: environment: %s", loc, opts->env[i]);
usr.bin/ssh/auth.c
633
loc, opts->env[i]);
usr.bin/ssh/clientloop.c
2702
char **env)
usr.bin/ssh/clientloop.c
2740
if (options.num_send_env != 0 && env != NULL) {
usr.bin/ssh/clientloop.c
2742
for (i = 0; env[i] != NULL; i++) {
usr.bin/ssh/clientloop.c
2744
name = xstrdup(env[i]);
usr.bin/ssh/misc.c
2324
char **env;
usr.bin/ssh/misc.c
2338
env = *envp;
usr.bin/ssh/misc.c
2340
for (i = 0; env[i]; i++)
usr.bin/ssh/misc.c
2341
if (strncmp(env[i], name, namelen) == 0 && env[i][namelen] == '=')
usr.bin/ssh/misc.c
2343
if (env[i]) {
usr.bin/ssh/misc.c
2345
free(env[i]);
usr.bin/ssh/misc.c
2353
env = (*envp) = xreallocarray(env, envsize, sizeof(char *));
usr.bin/ssh/misc.c
2357
env[i + 1] = NULL;
usr.bin/ssh/misc.c
2362
env[i] = xmalloc(strlen(name) + 1 + strlen(value) + 1);
usr.bin/ssh/misc.c
2363
snprintf(env[i], strlen(name) + 1 + strlen(value) + 1, "%s=%s", name, value);
usr.bin/ssh/misc.c
2741
char **env = NULL;
usr.bin/ssh/misc.c
2810
env = xcalloc(sizeof(*env), nenv);
usr.bin/ssh/misc.c
2811
child_set_env(&env, &nenv, "PATH", _PATH_STDPATH);
usr.bin/ssh/misc.c
2812
child_set_env(&env, &nenv, "USER", pw->pw_name);
usr.bin/ssh/misc.c
2813
child_set_env(&env, &nenv, "LOGNAME", pw->pw_name);
usr.bin/ssh/misc.c
2814
child_set_env(&env, &nenv, "HOME", pw->pw_dir);
usr.bin/ssh/misc.c
2816
child_set_env(&env, &nenv, "LANG", cp);
usr.bin/ssh/misc.c
2866
if (env != NULL)
usr.bin/ssh/misc.c
2867
execve(av[0], av, env);
usr.bin/ssh/misc.c
2870
error("%s %s \"%s\": %s", tag, env == NULL ? "execv" : "execve",
usr.bin/ssh/misc.c
2897
lookup_env_in_list(const char *env, char * const *envs, size_t nenvs)
usr.bin/ssh/misc.c
2901
envlen = strlen(env);
usr.bin/ssh/misc.c
2903
if (strncmp(envs[i], env, envlen) == 0 &&
usr.bin/ssh/misc.c
2912
lookup_setenv_in_list(const char *env, char * const *envs, size_t nenvs)
usr.bin/ssh/misc.c
2917
name = xstrdup(env);
usr.bin/ssh/misc.h
197
const char *lookup_env_in_list(const char *env,
usr.bin/ssh/misc.h
199
const char *lookup_setenv_in_list(const char *env,
usr.bin/ssh/mux.c
1450
cctx->term, &cctx->tio, c->rfd, cctx->cmd, cctx->env);
usr.bin/ssh/mux.c
1471
if (cctx->env != NULL) {
usr.bin/ssh/mux.c
1472
for (i = 0; cctx->env[i] != NULL; i++)
usr.bin/ssh/mux.c
1473
free(cctx->env[i]);
usr.bin/ssh/mux.c
1474
free(cctx->env);
usr.bin/ssh/mux.c
231
env_permitted(const char *env)
usr.bin/ssh/mux.c
237
if ((cp = strchr(env, '=')) == NULL || cp == env)
usr.bin/ssh/mux.c
239
ret = snprintf(name, sizeof(name), "%.*s", (int)(cp - env), env);
usr.bin/ssh/mux.c
241
error_f("name '%.100s...' too long", env);
usr.bin/ssh/mux.c
340
cctx->env = NULL;
usr.bin/ssh/mux.c
353
free(cctx->env[j]);
usr.bin/ssh/mux.c
354
free(cctx->env);
usr.bin/ssh/mux.c
369
cctx->env = xreallocarray(cctx->env, env_len + 2,
usr.bin/ssh/mux.c
370
sizeof(*cctx->env));
usr.bin/ssh/mux.c
371
cctx->env[env_len++] = cp;
usr.bin/ssh/mux.c
372
cctx->env[env_len] = NULL;
usr.bin/ssh/mux.c
399
free(cctx->env[j]);
usr.bin/ssh/mux.c
400
free(cctx->env);
usr.bin/ssh/mux.c
425
free(cctx->env[i]);
usr.bin/ssh/mux.c
426
free(cctx->env);
usr.bin/ssh/mux.c
67
char **env;
usr.bin/ssh/session.c
1191
char **env, *argv[ARGV_MAX], remote_id[512];
usr.bin/ssh/session.c
1226
env = do_setup_env(ssh, s, shell);
usr.bin/ssh/session.c
1243
environ = env;
usr.bin/ssh/session.c
1343
execve(shell, argv, env);
usr.bin/ssh/session.c
1357
execve(shell, argv, env);
usr.bin/ssh/session.c
1742
s->env = xrecallocarray(s->env, s->num_env,
usr.bin/ssh/session.c
1743
s->num_env + 1, sizeof(*s->env));
usr.bin/ssh/session.c
1744
s->env[s->num_env].name = name;
usr.bin/ssh/session.c
1745
s->env[s->num_env].val = val;
usr.bin/ssh/session.c
2093
if (s->env != NULL) {
usr.bin/ssh/session.c
2095
free(s->env[i].name);
usr.bin/ssh/session.c
2096
free(s->env[i].val);
usr.bin/ssh/session.c
2098
free(s->env);
usr.bin/ssh/session.c
747
read_environment_file(char ***env, u_int *envsize,
usr.bin/ssh/session.c
784
child_set_env(env, envsize, cp, value);
usr.bin/ssh/session.c
796
char *ocp, *cp, *value, **env, *laddr;
usr.bin/ssh/session.c
801
env = xcalloc(envsize, sizeof(char *));
usr.bin/ssh/session.c
802
env[0] = NULL;
usr.bin/ssh/session.c
808
ssh_gssapi_do_child(&env, &envsize);
usr.bin/ssh/session.c
813
child_set_env(&env, &envsize, s->env[i].name, s->env[i].val);
usr.bin/ssh/session.c
815
child_set_env(&env, &envsize, "USER", pw->pw_name);
usr.bin/ssh/session.c
816
child_set_env(&env, &envsize, "LOGNAME", pw->pw_name);
usr.bin/ssh/session.c
817
child_set_env(&env, &envsize, "HOME", pw->pw_dir);
usr.bin/ssh/session.c
819
child_set_env(&env, &envsize, "PATH", _PATH_STDPATH);
usr.bin/ssh/session.c
821
child_set_env(&env, &envsize, "PATH", getenv("PATH"));
usr.bin/ssh/session.c
824
child_set_env(&env, &envsize, "MAIL", buf);
usr.bin/ssh/session.c
827
child_set_env(&env, &envsize, "SHELL", shell);
usr.bin/ssh/session.c
830
child_set_env(&env, &envsize, "TZ", getenv("TZ"));
usr.bin/ssh/session.c
832
child_set_env(&env, &envsize, "XDG_RUNTIME_DIR",
usr.bin/ssh/session.c
836
child_set_env(&env, &envsize, "TERM", s->term);
usr.bin/ssh/session.c
838
child_set_env(&env, &envsize, "DISPLAY", s->display);
usr.bin/ssh/session.c
841
child_set_env(&env, &envsize, "KRB5CCNAME",
usr.bin/ssh/session.c
845
child_set_env(&env, &envsize, SSH_AUTHSOCKET_ENV_NAME,
usr.bin/ssh/session.c
852
ocp = xstrdup(auth_opts->env[n]);
usr.bin/ssh/session.c
860
child_set_env(&env, &envsize,
usr.bin/ssh/session.c
871
read_environment_file(&env, &envsize, buf,
usr.bin/ssh/session.c
883
child_set_env(&env, &envsize, cp, value);
usr.bin/ssh/session.c
891
child_set_env(&env, &envsize, "SSH_CLIENT", buf);
usr.bin/ssh/session.c
898
child_set_env(&env, &envsize, "SSH_CONNECTION", buf);
usr.bin/ssh/session.c
901
child_set_env(&env, &envsize, "SSH_TUNNEL", tun_fwd_ifnames);
usr.bin/ssh/session.c
903
child_set_env(&env, &envsize, "SSH_USER_AUTH", auth_info_file);
usr.bin/ssh/session.c
905
child_set_env(&env, &envsize, "SSH_TTY", s->tty);
usr.bin/ssh/session.c
907
child_set_env(&env, &envsize, "SSH_ORIGINAL_COMMAND",
usr.bin/ssh/session.c
913
for (i = 0; env[i]; i++)
usr.bin/ssh/session.c
914
fprintf(stderr, " %.200s\n", env[i]);
usr.bin/ssh/session.c
916
return env;
usr.bin/ssh/session.h
63
} *env;
usr.bin/tmux/cmd-display-menu.c
587
struct environ *env = NULL;
usr.bin/tmux/cmd-display-menu.c
647
env = environ_create();
usr.bin/tmux/cmd-display-menu.c
650
environ_put(env, av->string, 0);
usr.bin/tmux/cmd-display-menu.c
695
if (popup_display(flags, lines, item, px, py, w, h, env, shellcmd, argc,
usr.bin/tmux/cmd-display-menu.c
698
environ_free(env);
usr.bin/tmux/cmd-display-menu.c
706
environ_free(env);
usr.bin/tmux/cmd-display-menu.c
714
environ_free(env);
usr.bin/tmux/cmd-new-session.c
281
env = environ_create();
usr.bin/tmux/cmd-new-session.c
283
environ_update(global_s_options, c->environ, env);
usr.bin/tmux/cmd-new-session.c
286
environ_put(env, av->string, 0);
usr.bin/tmux/cmd-new-session.c
289
s = session_create(prefix, sname, cwd, env, oo, tiop);
usr.bin/tmux/cmd-new-session.c
75
struct environ *env;
usr.bin/tmux/cmd-set-environment.c
102
environ_clear(env, name);
usr.bin/tmux/cmd-set-environment.c
111
environ_set(env, name, ENVIRON_HIDDEN, "%s", value);
usr.bin/tmux/cmd-set-environment.c
113
environ_set(env, name, 0, "%s", value);
usr.bin/tmux/cmd-set-environment.c
51
struct environ *env;
usr.bin/tmux/cmd-set-environment.c
75
env = global_environ;
usr.bin/tmux/cmd-set-environment.c
86
env = target->s->environ;
usr.bin/tmux/cmd-set-environment.c
95
environ_unset(env, name);
usr.bin/tmux/cmd-show-environment.c
102
struct environ *env;
usr.bin/tmux/cmd-show-environment.c
114
env = global_environ;
usr.bin/tmux/cmd-show-environment.c
124
env = target->s->environ;
usr.bin/tmux/cmd-show-environment.c
128
envent = environ_find(env, name);
usr.bin/tmux/cmd-show-environment.c
137
envent = environ_first(env);
usr.bin/tmux/environ.c
102
environ_find(struct environ *env, const char *name)
usr.bin/tmux/environ.c
107
return (RB_FIND(environ, env, &envent));
usr.bin/tmux/environ.c
112
environ_set(struct environ *env, const char *name, int flags, const char *fmt,
usr.bin/tmux/environ.c
119
if ((envent = environ_find(env, name)) != NULL) {
usr.bin/tmux/environ.c
128
RB_INSERT(environ, env, envent);
usr.bin/tmux/environ.c
135
environ_clear(struct environ *env, const char *name)
usr.bin/tmux/environ.c
139
if ((envent = environ_find(env, name)) != NULL) {
usr.bin/tmux/environ.c
147
RB_INSERT(environ, env, envent);
usr.bin/tmux/environ.c
153
environ_put(struct environ *env, const char *var, int flags)
usr.bin/tmux/environ.c
166
environ_set(env, name, flags, "%s", value);
usr.bin/tmux/environ.c
172
environ_unset(struct environ *env, const char *name)
usr.bin/tmux/environ.c
176
if ((envent = environ_find(env, name)) == NULL)
usr.bin/tmux/environ.c
178
RB_REMOVE(environ, env, envent);
usr.bin/tmux/environ.c
216
environ_push(struct environ *env)
usr.bin/tmux/environ.c
221
RB_FOREACH(envent, environ, env) {
usr.bin/tmux/environ.c
231
environ_log(struct environ *env, const char *fmt, ...)
usr.bin/tmux/environ.c
241
RB_FOREACH(envent, environ, env) {
usr.bin/tmux/environ.c
255
struct environ *env;
usr.bin/tmux/environ.c
259
env = environ_create();
usr.bin/tmux/environ.c
260
environ_copy(global_environ, env);
usr.bin/tmux/environ.c
262
environ_copy(s->environ, env);
usr.bin/tmux/environ.c
266
environ_set(env, "TERM", 0, "%s", value);
usr.bin/tmux/environ.c
267
environ_set(env, "TERM_PROGRAM", 0, "%s", "tmux");
usr.bin/tmux/environ.c
268
environ_set(env, "TERM_PROGRAM_VERSION", 0, "%s", getversion());
usr.bin/tmux/environ.c
269
environ_set(env, "COLORTERM", 0, "truecolor");
usr.bin/tmux/environ.c
276
environ_set(env, "TMUX", 0, "%s,%ld,%d", socket_path, (long)getpid(),
usr.bin/tmux/environ.c
279
return (env);
usr.bin/tmux/environ.c
46
struct environ *env;
usr.bin/tmux/environ.c
48
env = xcalloc(1, sizeof *env);
usr.bin/tmux/environ.c
49
RB_INIT(env);
usr.bin/tmux/environ.c
51
return (env);
usr.bin/tmux/environ.c
56
environ_free(struct environ *env)
usr.bin/tmux/environ.c
60
if (env == NULL)
usr.bin/tmux/environ.c
63
RB_FOREACH_SAFE(envent, environ, env, envent1) {
usr.bin/tmux/environ.c
64
RB_REMOVE(environ, env, envent);
usr.bin/tmux/environ.c
69
free(env);
usr.bin/tmux/environ.c
73
environ_first(struct environ *env)
usr.bin/tmux/environ.c
75
return (RB_MIN(environ, env));
usr.bin/tmux/environ.c
81
return (RB_NEXT(environ, env, envent));
usr.bin/tmux/format.c
5532
struct environ *env = NULL;
usr.bin/tmux/format.c
5541
env = ft->s->environ;
usr.bin/tmux/format.c
5543
env = global_environ;
usr.bin/tmux/format.c
5546
env = ft->client->environ;
usr.bin/tmux/format.c
5548
if (env == NULL)
usr.bin/tmux/format.c
5555
envent = environ_first(env);
usr.bin/tmux/job.c
146
environ_set(env, "PWD", 0, "%s", cwd);
usr.bin/tmux/job.c
148
environ_set(env, "PWD", 0, "%s", home);
usr.bin/tmux/job.c
150
environ_set(env, "PWD", 0, "/");
usr.bin/tmux/job.c
155
environ_push(env);
usr.bin/tmux/job.c
156
environ_free(env);
usr.bin/tmux/job.c
197
environ_free(env);
usr.bin/tmux/job.c
238
environ_free(env);
usr.bin/tmux/job.c
80
struct environ *env;
usr.bin/tmux/job.c
94
env = environ_for_session(s, !cfg_finished);
usr.bin/tmux/job.c
96
environ_copy(e, env);
usr.bin/tmux/popup.c
562
u_int py, u_int sx, u_int sy, struct environ *env, const char *shellcmd,
usr.bin/tmux/popup.c
649
pd->job = job_run(shellcmd, argc, argv, env, s, cwd,
usr.bin/tmux/session.c
114
struct environ *env, struct options *oo, struct termios *tio)
usr.bin/tmux/session.c
126
s->environ = env;
usr.bin/tmux/spawn.c
678
struct environ *env;
usr.bin/tmux/spawn.c
723
env = environ_create();
usr.bin/tmux/spawn.c
731
sc.environ = env;
usr.bin/tmux/spawn.c
738
environ_free(env);
usr.bin/tmux/window-customize.c
1015
envent = environ_first(env);
usr.bin/tmux/window-customize.c
1042
item->environ = env;
usr.bin/tmux/window-customize.c
1783
struct environ *env;
usr.bin/tmux/window-customize.c
1797
env = global_environ;
usr.bin/tmux/window-customize.c
1800
env = item->environ;
usr.bin/tmux/window-customize.c
1815
new_item->environ = env;
usr.bin/tmux/window-customize.c
1960
struct environ *env)
usr.bin/tmux/window-customize.c
1968
new_item->environ = env;
usr.bin/tmux/window-customize.c
989
struct environ *env, struct format_tree *ft, const char *filter,
usr.sbin/amd/amd/opts.c
591
char *env = getenv(nbuf);
usr.sbin/amd/amd/opts.c
592
if (env) {
usr.sbin/amd/amd/opts.c
593
int vlen = strlen(env);
usr.sbin/amd/amd/opts.c
596
strlcpy(ep, env, expbuf + sizeof expbuf - ep);
usr.sbin/amd/amd/opts.c
604
plog(XLOG_DEBUG, "Environment gave \"%s\" -> \"%s\"", nbuf, env);
usr.sbin/bgplgd/slowcgi.c
111
struct env_head env;
usr.sbin/bgplgd/slowcgi.c
1199
while (!SLIST_EMPTY(&c->env)) {
usr.sbin/bgplgd/slowcgi.c
1200
env_entry = SLIST_FIRST(&c->env);
usr.sbin/bgplgd/slowcgi.c
1201
SLIST_REMOVE_HEAD(&c->env, entry);
usr.sbin/bgplgd/slowcgi.c
722
SLIST_INIT(&c->env);
usr.sbin/bgplgd/slowcgi.c
817
SLIST_INSERT_HEAD(&c->env, env_entry, entry);
usr.sbin/bgplgd/slowcgi.c
883
struct env_val *env;
usr.sbin/bgplgd/slowcgi.c
885
SLIST_FOREACH(env, &c->env, entry) {
usr.sbin/bgplgd/slowcgi.c
886
if (strcmp(env->key, key) == 0)
usr.sbin/bgplgd/slowcgi.c
887
return (env->val);
usr.sbin/cron/do_command.c
380
char **env;
usr.sbin/cron/do_command.c
404
for (env = e->envp; *env; env++)
usr.sbin/cron/do_command.c
406
*env);
usr.sbin/httpd/config.c
100
if (what & CONFIG_MEDIA && env->sc_mediatypes != NULL)
usr.sbin/httpd/config.c
1000
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
101
media_purge(env->sc_mediatypes);
usr.sbin/httpd/config.c
1026
config_getmedia(struct httpd *env, struct imsg *imsg)
usr.sbin/httpd/config.c
1029
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
103
if (what & CONFIG_AUTH && env->sc_auth != NULL) {
usr.sbin/httpd/config.c
1037
if (media_add(env->sc_mediatypes, &media) == NULL) {
usr.sbin/httpd/config.c
104
while ((auth = TAILQ_FIRST(env->sc_auth)) != NULL) {
usr.sbin/httpd/config.c
105
auth_free(env->sc_auth, auth);
usr.sbin/httpd/config.c
1051
config_setauth(struct httpd *env, struct auth *auth)
usr.sbin/httpd/config.c
1053
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
1082
config_getauth(struct httpd *env, struct imsg *imsg)
usr.sbin/httpd/config.c
1085
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
1093
if (auth_add(env->sc_auth, &auth) == NULL) {
usr.sbin/httpd/config.c
112
config_setreset(struct httpd *env, unsigned int reset)
usr.sbin/httpd/config.c
114
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
129
config_getreset(struct httpd *env, struct imsg *imsg)
usr.sbin/httpd/config.c
136
config_purge(env, mode);
usr.sbin/httpd/config.c
142
config_getcfg(struct httpd *env, struct imsg *imsg)
usr.sbin/httpd/config.c
151
env->sc_opts = cf.cf_opts;
usr.sbin/httpd/config.c
152
env->sc_flags = cf.cf_flags;
usr.sbin/httpd/config.c
153
memcpy(env->sc_tls_sid, cf.cf_tls_sid, sizeof(env->sc_tls_sid));
usr.sbin/httpd/config.c
156
proc_compose(env->sc_ps, PROC_PARENT,
usr.sbin/httpd/config.c
207
config_setserver(struct httpd *env, struct server *srv)
usr.sbin/httpd/config.c
209
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
285
if (config_setserver_tls(env, srv) != 0)
usr.sbin/httpd/config.c
290
if (config_setserver_fcgiparams(env, srv) != 0)
usr.sbin/httpd/config.c
294
config_inherit_headers(env, srv);
usr.sbin/httpd/config.c
295
if (config_setserver_headers(env, srv) == -1)
usr.sbin/httpd/config.c
311
config_settls(struct httpd *env, struct server *srv, enum tls_config_type type,
usr.sbin/httpd/config.c
314
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
359
config_getserver_fcgiparams(struct httpd *env, struct imsg *imsg)
usr.sbin/httpd/config.c
400
config_setserver_fcgiparams(struct httpd *env, struct server *srv)
usr.sbin/httpd/config.c
402
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
41
config_init(struct httpd *env)
usr.sbin/httpd/config.c
43
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
438
config_getserver_headers(struct httpd *env, struct imsg *imsg)
usr.sbin/httpd/config.c
48
env->sc_prefork_server = SERVER_NUMPROC;
usr.sbin/httpd/config.c
485
config_inherit_headers(struct httpd *env, struct server *srv)
usr.sbin/httpd/config.c
496
TAILQ_FOREACH(parent_srv, env->sc_servers, srv_entry) {
usr.sbin/httpd/config.c
525
config_setserver_headers(struct httpd *env, struct server *srv)
usr.sbin/httpd/config.c
527
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
55
(void)strlcpy(env->sc_errdocroot, "",
usr.sbin/httpd/config.c
56
sizeof(env->sc_errdocroot));
usr.sbin/httpd/config.c
561
config_setserver_tls(struct httpd *env, struct server *srv)
usr.sbin/httpd/config.c
570
if (config_settls(env, srv, TLS_CFG_CA, "ca", srv_conf->tls_ca,
usr.sbin/httpd/config.c
574
if (config_settls(env, srv, TLS_CFG_CERT, "cert", srv_conf->tls_cert,
usr.sbin/httpd/config.c
578
if (config_settls(env, srv, TLS_CFG_CRL, "crl", srv_conf->tls_crl,
usr.sbin/httpd/config.c
582
if (config_settls(env, srv, TLS_CFG_KEY, "key", srv_conf->tls_key,
usr.sbin/httpd/config.c
586
if (config_settls(env, srv, TLS_CFG_OCSP_STAPLE, "ocsp staple",
usr.sbin/httpd/config.c
594
config_getserver_auth(struct httpd *env, struct server_config *srv_conf)
usr.sbin/httpd/config.c
596
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
602
if ((srv_conf->auth = auth_byid(env->sc_auth,
usr.sbin/httpd/config.c
610
config_getserver_config(struct httpd *env, struct server *srv,
usr.sbin/httpd/config.c
614
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
62
if ((env->sc_servers =
usr.sbin/httpd/config.c
63
calloc(1, sizeof(*env->sc_servers))) == NULL)
usr.sbin/httpd/config.c
643
if (config_getserver_auth(env, srv_conf) != 0)
usr.sbin/httpd/config.c
65
TAILQ_INIT(env->sc_servers);
usr.sbin/httpd/config.c
69
if ((env->sc_mediatypes =
usr.sbin/httpd/config.c
70
calloc(1, sizeof(*env->sc_mediatypes))) == NULL)
usr.sbin/httpd/config.c
72
RB_INIT(env->sc_mediatypes);
usr.sbin/httpd/config.c
76
if ((env->sc_auth =
usr.sbin/httpd/config.c
77
calloc(1, sizeof(*env->sc_auth))) == NULL)
usr.sbin/httpd/config.c
79
TAILQ_INIT(env->sc_auth);
usr.sbin/httpd/config.c
796
config_getserver(struct httpd *env, struct imsg *imsg)
usr.sbin/httpd/config.c
799
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
831
return (config_getserver_config(env, srv, imsg));
usr.sbin/httpd/config.c
847
if (config_getserver_auth(env, &srv->srv_conf) != 0)
usr.sbin/httpd/config.c
86
config_purge(struct httpd *env, unsigned int reset)
usr.sbin/httpd/config.c
863
TAILQ_INSERT_TAIL(env->sc_servers, srv, srv_entry);
usr.sbin/httpd/config.c
88
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
883
config_gettls(struct httpd *env, struct server_config *srv_conf,
usr.sbin/httpd/config.c
888
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
929
config_getserver_tls(struct httpd *env, struct imsg *imsg)
usr.sbin/httpd/config.c
95
if (what & CONFIG_SERVERS && env->sc_servers != NULL) {
usr.sbin/httpd/config.c
955
if (config_gettls(env, srv_conf, &tls_conf, "ca", p, len,
usr.sbin/httpd/config.c
96
while ((srv = TAILQ_FIRST(env->sc_servers)) != NULL)
usr.sbin/httpd/config.c
961
if (config_gettls(env, srv_conf, &tls_conf, "cert", p, len,
usr.sbin/httpd/config.c
967
if (config_gettls(env, srv_conf, &tls_conf, "crl", p, len,
usr.sbin/httpd/config.c
973
if (config_gettls(env, srv_conf, &tls_conf, "key", p, len,
usr.sbin/httpd/config.c
979
if (config_gettls(env, srv_conf, &tls_conf, "ocsp staple",
usr.sbin/httpd/config.c
998
config_setmedia(struct httpd *env, struct media_type *media)
usr.sbin/httpd/httpd.c
1120
media_find_config(struct httpd *env, struct server_config *srv_conf,
usr.sbin/httpd/httpd.c
1125
if ((match = media_find(env->sc_mediatypes, file)) != NULL)
usr.sbin/httpd/httpd.c
1131
return (&env->sc_default_type);
usr.sbin/httpd/httpd.c
122
struct httpd *env;
usr.sbin/httpd/httpd.c
175
if ((env = calloc(1, sizeof(*env))) == NULL ||
usr.sbin/httpd/httpd.c
179
httpd_env = env;
usr.sbin/httpd/httpd.c
180
env->sc_ps = ps;
usr.sbin/httpd/httpd.c
181
ps->ps_env = env;
usr.sbin/httpd/httpd.c
182
env->sc_conffile = conffile;
usr.sbin/httpd/httpd.c
183
env->sc_opts = opts;
usr.sbin/httpd/httpd.c
185
if (parse_config(env->sc_conffile, env) == -1)
usr.sbin/httpd/httpd.c
197
if (env->sc_opts & HTTPD_OPT_NOACTION)
usr.sbin/httpd/httpd.c
200
ps->ps_instances[PROC_SERVER] = env->sc_prefork_server;
usr.sbin/httpd/httpd.c
205
if (env->sc_chroot == NULL)
usr.sbin/httpd/httpd.c
206
env->sc_chroot = ps->ps_pw->pw_dir;
usr.sbin/httpd/httpd.c
208
procs[proc].p_chroot = env->sc_chroot;
usr.sbin/httpd/httpd.c
210
if (env->sc_logdir == NULL) {
usr.sbin/httpd/httpd.c
211
if (asprintf(&env->sc_logdir, "%s%s", env->sc_chroot,
usr.sbin/httpd/httpd.c
243
if (load_config(env->sc_conffile, env) == -1) {
usr.sbin/httpd/httpd.c
244
proc_kill(env->sc_ps);
usr.sbin/httpd/httpd.c
248
if (env->sc_opts & HTTPD_OPT_NOACTION) {
usr.sbin/httpd/httpd.c
250
proc_kill(env->sc_ps);
usr.sbin/httpd/httpd.c
255
arc4random_buf(env->sc_tls_sid, sizeof(env->sc_tls_sid));
usr.sbin/httpd/httpd.c
257
if (parent_configure(env) == -1)
usr.sbin/httpd/httpd.c
262
parent_shutdown(env);
usr.sbin/httpd/httpd.c
269
parent_configure(struct httpd *env)
usr.sbin/httpd/httpd.c
280
RB_FOREACH(media, mediatypes, env->sc_mediatypes) {
usr.sbin/httpd/httpd.c
281
if (config_setmedia(env, media) == -1)
usr.sbin/httpd/httpd.c
285
TAILQ_FOREACH(auth, env->sc_auth, auth_entry) {
usr.sbin/httpd/httpd.c
286
if (config_setauth(env, auth) == -1)
usr.sbin/httpd/httpd.c
291
TAILQ_FOREACH(srv, env->sc_servers, srv_entry) {
usr.sbin/httpd/httpd.c
298
if (config_setserver(env, srv) == -1)
usr.sbin/httpd/httpd.c
302
TAILQ_FOREACH(srv, env->sc_servers, srv_entry) {
usr.sbin/httpd/httpd.c
305
if (config_setserver(env, srv) == -1)
usr.sbin/httpd/httpd.c
310
env->sc_reload = env->sc_prefork_server + 1;
usr.sbin/httpd/httpd.c
315
cf.cf_opts = env->sc_opts;
usr.sbin/httpd/httpd.c
316
cf.cf_flags = env->sc_flags;
usr.sbin/httpd/httpd.c
317
memcpy(cf.cf_tls_sid, env->sc_tls_sid, sizeof(cf.cf_tls_sid));
usr.sbin/httpd/httpd.c
319
proc_compose(env->sc_ps, id, IMSG_CFG_DONE, &cf, sizeof(cf));
usr.sbin/httpd/httpd.c
324
config_purge(env, CONFIG_ALL & ~CONFIG_SERVERS);
usr.sbin/httpd/httpd.c
329
parent_reload(struct httpd *env, unsigned int reset, const char *filename)
usr.sbin/httpd/httpd.c
331
if (env->sc_reload) {
usr.sbin/httpd/httpd.c
333
__func__, env->sc_reload);
usr.sbin/httpd/httpd.c
339
filename = env->sc_conffile;
usr.sbin/httpd/httpd.c
343
config_purge(env, CONFIG_ALL);
usr.sbin/httpd/httpd.c
346
if (load_config(filename, env) == -1) {
usr.sbin/httpd/httpd.c
351
config_setreset(env, CONFIG_ALL);
usr.sbin/httpd/httpd.c
353
if (parent_configure(env) == -1) {
usr.sbin/httpd/httpd.c
358
config_setreset(env, reset);
usr.sbin/httpd/httpd.c
362
parent_reopen(struct httpd *env)
usr.sbin/httpd/httpd.c
364
proc_compose(env->sc_ps, PROC_LOGGER, IMSG_CTL_REOPEN, NULL, 0);
usr.sbin/httpd/httpd.c
368
parent_configure_done(struct httpd *env)
usr.sbin/httpd/httpd.c
372
if (env->sc_reload == 0) {
usr.sbin/httpd/httpd.c
377
env->sc_reload--;
usr.sbin/httpd/httpd.c
378
if (env->sc_reload == 0) {
usr.sbin/httpd/httpd.c
383
proc_compose(env->sc_ps, id, IMSG_CTL_START, NULL, 0);
usr.sbin/httpd/httpd.c
389
parent_shutdown(struct httpd *env)
usr.sbin/httpd/httpd.c
391
config_purge(env, CONFIG_ALL);
usr.sbin/httpd/httpd.c
393
proc_kill(env->sc_ps);
usr.sbin/httpd/httpd.c
394
free(env->sc_ps);
usr.sbin/httpd/httpd.c
395
free(env);
usr.sbin/httpd/httpd.c
406
struct httpd *env = ps->ps_env;
usr.sbin/httpd/httpd.c
410
parent_configure_done(env);
usr.sbin/httpd/httpd.c
423
struct httpd *env = ps->ps_env;
usr.sbin/httpd/httpd.c
431
parent_reload(env, v, NULL);
usr.sbin/httpd/httpd.c
436
parent_reload(env, CONFIG_RELOAD, str);
usr.sbin/httpd/httpd.c
440
parent_shutdown(env);
usr.sbin/httpd/httpd.c
443
parent_reopen(env);
usr.sbin/httpd/httpd.c
446
parent_configure_done(env);
usr.sbin/httpd/server_fcgi.c
90
server_fcgi(struct httpd *env, struct client *clt)
usr.sbin/httpd/server_file.c
128
return (server_file(env, clt));
usr.sbin/httpd/server_file.c
137
ret = server_file_access(env, clt, path, len);
usr.sbin/httpd/server_file.c
150
return (server_file_index(env, clt, fd, &st));
usr.sbin/httpd/server_file.c
160
media = media_find_config(env, srv_conf, path);
usr.sbin/httpd/server_file.c
167
return (server_partial_file_request(env, clt, media,
usr.sbin/httpd/server_file.c
211
return (server_file_request(env, clt, media, fd, &st));
usr.sbin/httpd/server_file.c
215
server_file(struct httpd *env, struct client *clt)
usr.sbin/httpd/server_file.c
224
return (server_fcgi(env, clt));
usr.sbin/httpd/server_file.c
238
if ((ret = server_file_access(env, clt, path, sizeof(path))) > 0) {
usr.sbin/httpd/server_file.c
271
server_file_request(struct httpd *env, struct client *clt,
usr.sbin/httpd/server_file.c
346
server_partial_file_request(struct httpd *env, struct client *clt,
usr.sbin/httpd/server_file.c
492
server_file_index(struct httpd *env, struct client *clt, int fd,
usr.sbin/httpd/server_file.c
60
server_file_access(struct httpd *env, struct client *clt,
usr.sbin/httpd/server_file.c
623
media = media_find_config(env, srv_conf, "index.html");
usr.sbin/ldapctl/ldapctl.c
235
ssl_load_certfile(struct ldapd_config *env, const char *name, u_int8_t flags)
usr.sbin/ldapd/parse.y
1234
load_certfile(struct ldapd_config *env, const char *name, u_int8_t flags,
usr.sbin/ldapd/parse.y
1249
s = SPLAY_FIND(ssltree, env->sc_ssl, &key);
usr.sbin/ldapd/parse.y
1328
SPLAY_INSERT(ssltree, env->sc_ssl, s);
usr.sbin/ldomd/ds.c
125
if (lp->env != LDC_MODE_RELIABLE) {
usr.sbin/ldomd/ds.c
161
if (lp->env != LDC_MODE_RELIABLE) {
usr.sbin/ldomd/ds.c
256
if (lp->env & LDC_FRAG_START) {
usr.sbin/ldomd/ds.c
257
lc->lc_len = (lp->env & LDC_LEN_MASK);
usr.sbin/ldomd/ds.c
260
len = (lp->env & LDC_LEN_MASK);
usr.sbin/ldomd/ds.c
270
if (lp->env & LDC_FRAG_STOP) {
usr.sbin/ldomd/ds.c
346
lp.env = LDC_MODE_RELIABLE;
usr.sbin/ldomd/ds.c
366
lp.env = LDC_MODE_RELIABLE;
usr.sbin/ldomd/ds.c
386
lp.env = LDC_MODE_RELIABLE;
usr.sbin/ldomd/ds.c
574
int env = LDC_FRAG_START;
usr.sbin/ldomd/ds.c
590
if ((lp.env & LDC_FRAG_START) != env) {
usr.sbin/ldomd/ds.c
595
bcopy(&lp.data, p, (lp.env & LDC_LEN_MASK));
usr.sbin/ldomd/ds.c
596
p += (lp.env & LDC_LEN_MASK);
usr.sbin/ldomd/ds.c
597
len -= (lp.env & LDC_LEN_MASK);
usr.sbin/ldomd/ds.c
599
if (lp.env & LDC_FRAG_STOP)
usr.sbin/ldomd/ds.c
602
env = (lp.env & LDC_FRAG_STOP) ? LDC_FRAG_START : 0;
usr.sbin/ldomd/ds.c
617
lp.env = min(len, LDC_PKT_PAYLOAD);
usr.sbin/ldomd/ds.c
619
lp.env |= LDC_FRAG_START;
usr.sbin/ldomd/ds.c
621
lp.env |= LDC_FRAG_STOP;
usr.sbin/ldomd/ds.h
35
uint8_t env;
usr.sbin/lpd/frontend.c
144
TAILQ_FOREACH(l, &env->listeners, entry)
usr.sbin/lpd/frontend.c
295
env = tmpconf;
usr.sbin/lpd/lpd.c
128
env = parse_config(conffile, verbose);
usr.sbin/lpd/lpd.c
129
if (env == NULL)
usr.sbin/lpd/lpd.c
156
TAILQ_FOREACH(l, &env->listeners, entry)
usr.sbin/lpd/lpd.c
342
TAILQ_FOREACH(l, &env->listeners, entry) {
usr.sbin/lpd/lpd.c
39
struct lpd_conf *env;
usr.sbin/lpd/lpd.h
101
extern struct lpd_conf *env;
usr.sbin/nsd/dnstap/dnstap.c
103
res = fstrm_iothr_submit(env->iothr, env->ioq, buf, len_buf,
usr.sbin/nsd/dnstap/dnstap.c
110
dt_msg_init(const struct dt_env *env,
usr.sbin/nsd/dnstap/dnstap.c
120
if (env->identity != NULL) {
usr.sbin/nsd/dnstap/dnstap.c
121
dm->d.identity.data = (uint8_t *) env->identity;
usr.sbin/nsd/dnstap/dnstap.c
122
dm->d.identity.len = (size_t) env->len_identity;
usr.sbin/nsd/dnstap/dnstap.c
125
if (env->version != NULL) {
usr.sbin/nsd/dnstap/dnstap.c
126
dm->d.version.data = (uint8_t *) env->version;
usr.sbin/nsd/dnstap/dnstap.c
127
dm->d.version.len = (size_t) env->len_version;
usr.sbin/nsd/dnstap/dnstap.c
530
struct dt_env *env;
usr.sbin/nsd/dnstap/dnstap.c
548
env = (struct dt_env *) calloc(1, sizeof(struct dt_env));
usr.sbin/nsd/dnstap/dnstap.c
549
if (!env)
usr.sbin/nsd/dnstap/dnstap.c
580
env->tls_writer = tls_writer_init(ip, tls_server_name,
usr.sbin/nsd/dnstap/dnstap.c
590
if(!env->tls_writer) {
usr.sbin/nsd/dnstap/dnstap.c
593
free(env);
usr.sbin/nsd/dnstap/dnstap.c
604
fw = dt_tls_make_writer(fwopt, env->tls_writer);
usr.sbin/nsd/dnstap/dnstap.c
610
env->iothr = fstrm_iothr_init(fopt, &fw);
usr.sbin/nsd/dnstap/dnstap.c
611
if (env->iothr == NULL) {
usr.sbin/nsd/dnstap/dnstap.c
614
free(env);
usr.sbin/nsd/dnstap/dnstap.c
615
env = NULL;
usr.sbin/nsd/dnstap/dnstap.c
625
return env;
usr.sbin/nsd/dnstap/dnstap.c
629
dt_apply_identity(struct dt_env *env, struct nsd_options *cfg)
usr.sbin/nsd/dnstap/dnstap.c
634
free(env->identity);
usr.sbin/nsd/dnstap/dnstap.c
638
env->identity = strdup(buf);
usr.sbin/nsd/dnstap/dnstap.c
643
env->identity = strdup(cfg->dnstap_identity);
usr.sbin/nsd/dnstap/dnstap.c
645
if (env->identity == NULL)
usr.sbin/nsd/dnstap/dnstap.c
647
env->len_identity = (unsigned int)strlen(env->identity);
usr.sbin/nsd/dnstap/dnstap.c
649
env->identity));
usr.sbin/nsd/dnstap/dnstap.c
653
dt_apply_version(struct dt_env *env, struct nsd_options *cfg)
usr.sbin/nsd/dnstap/dnstap.c
657
free(env->version);
usr.sbin/nsd/dnstap/dnstap.c
659
env->version = strdup(PACKAGE_STRING);
usr.sbin/nsd/dnstap/dnstap.c
661
env->version = strdup(cfg->dnstap_version);
usr.sbin/nsd/dnstap/dnstap.c
662
if (env->version == NULL)
usr.sbin/nsd/dnstap/dnstap.c
664
env->len_version = (unsigned int)strlen(env->version);
usr.sbin/nsd/dnstap/dnstap.c
666
env->version));
usr.sbin/nsd/dnstap/dnstap.c
670
dt_apply_cfg(struct dt_env *env, struct nsd_options *cfg)
usr.sbin/nsd/dnstap/dnstap.c
675
dt_apply_identity(env, cfg);
usr.sbin/nsd/dnstap/dnstap.c
676
dt_apply_version(env, cfg);
usr.sbin/nsd/dnstap/dnstap.c
677
if ((env->log_auth_query_messages = (unsigned int)
usr.sbin/nsd/dnstap/dnstap.c
682
if ((env->log_auth_response_messages = (unsigned int)
usr.sbin/nsd/dnstap/dnstap.c
690
dt_init(struct dt_env *env)
usr.sbin/nsd/dnstap/dnstap.c
692
env->ioq = fstrm_iothr_get_input_queue(env->iothr);
usr.sbin/nsd/dnstap/dnstap.c
693
if (env->ioq == NULL)
usr.sbin/nsd/dnstap/dnstap.c
699
dt_delete(struct dt_env *env)
usr.sbin/nsd/dnstap/dnstap.c
701
if (!env)
usr.sbin/nsd/dnstap/dnstap.c
704
fstrm_iothr_destroy(&env->iothr);
usr.sbin/nsd/dnstap/dnstap.c
705
free(env->identity);
usr.sbin/nsd/dnstap/dnstap.c
706
free(env->version);
usr.sbin/nsd/dnstap/dnstap.c
707
free(env);
usr.sbin/nsd/dnstap/dnstap.c
826
dt_msg_send_auth_query(struct dt_env *env,
usr.sbin/nsd/dnstap/dnstap.c
842
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__AUTH_QUERY);
usr.sbin/nsd/dnstap/dnstap.c
868
dt_send(env, dm.buf, dm.len_buf);
usr.sbin/nsd/dnstap/dnstap.c
872
dt_msg_send_auth_response(struct dt_env *env,
usr.sbin/nsd/dnstap/dnstap.c
888
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__AUTH_RESPONSE);
usr.sbin/nsd/dnstap/dnstap.c
913
dt_send(env, dm.buf, dm.len_buf);
usr.sbin/nsd/dnstap/dnstap.c
98
dt_send(const struct dt_env *env, void *buf, size_t len_buf)
usr.sbin/nsd/dnstap/dnstap.h
106
dt_apply_cfg(struct dt_env *env, struct nsd_options *cfg);
usr.sbin/nsd/dnstap/dnstap.h
114
dt_init(struct dt_env *env);
usr.sbin/nsd/dnstap/dnstap.h
121
dt_delete(struct dt_env *env);
usr.sbin/nsd/dnstap/dnstap.h
135
dt_msg_send_auth_query(struct dt_env *env,
usr.sbin/nsd/dnstap/dnstap.h
157
dt_msg_send_auth_response(struct dt_env *env,
usr.sbin/relayd/agentx_control.c
1084
snmp_hosttrap(struct relayd *env, struct table *table, struct host *host)
usr.sbin/relayd/agentx_control.c
1088
if (snmp_agentx == NULL || env->sc_snmp == -1)
usr.sbin/relayd/agentx_control.c
1114
snmp_event_add(env, EV_WRITE);
usr.sbin/relayd/agentx_control.c
130
struct relayd *env;
usr.sbin/relayd/agentx_control.c
213
env = nenv;
usr.sbin/relayd/agentx_control.c
215
if ((env->sc_conf.flags & F_AGENTX) == 0) {
usr.sbin/relayd/agentx_control.c
231
env->sc_conf.agentx_context[0] == '\0' ? NULL :
usr.sbin/relayd/agentx_control.c
232
env->sc_conf.agentx_context)) == NULL)
usr.sbin/relayd/agentx_control.c
431
proc_compose(env->sc_ps, PROC_PARENT, IMSG_AGENTXSOCK, NULL, 0);
usr.sbin/relayd/agentx_control.c
434
agentx_init(env);
usr.sbin/relayd/agentx_control.c
435
event_del(&(env->sc_agentxev));
usr.sbin/relayd/agentx_control.c
472
event_del(&(env->sc_agentxev));
usr.sbin/relayd/agentx_control.c
473
event_set(&(env->sc_agentxev), fd, EV_READ | EV_PERSIST,
usr.sbin/relayd/agentx_control.c
474
agentx_sock, env);
usr.sbin/relayd/agentx_control.c
475
event_add(&(env->sc_agentxev), NULL);
usr.sbin/relayd/agentx_control.c
480
evtimer_set(&env->sc_agentxev, agentx_sock, env);
usr.sbin/relayd/agentx_control.c
481
evtimer_add(&env->sc_agentxev, &tv);
usr.sbin/relayd/agentx_control.c
488
proc_compose(env->sc_ps, PROC_PARENT, IMSG_AGENTXSOCK, NULL, 0);
usr.sbin/relayd/agentx_control.c
492
event_del(&(env->sc_agentxev));
usr.sbin/relayd/agentx_control.c
493
event_set(&(env->sc_agentxev), fd, EV_READ | EV_PERSIST,
usr.sbin/relayd/agentx_control.c
495
event_add(&(env->sc_agentxev), NULL);
usr.sbin/relayd/agentx_control.c
528
TAILQ_FOREACH(rdr, env->sc_rdrs, entry) {
usr.sbin/relayd/agentx_control.c
592
TAILQ_FOREACH(rly, env->sc_relays, rl_entry) {
usr.sbin/relayd/agentx_control.c
614
int i, nrelay = env->sc_conf.prefork_relay;
usr.sbin/relayd/agentx_control.c
669
TAILQ_FOREACH(router, env->sc_rts, rt_entry) {
usr.sbin/relayd/agentx_control.c
724
TAILQ_FOREACH(nr, env->sc_routes, nr_route) {
usr.sbin/relayd/agentx_control.c
779
TAILQ_FOREACH(host, &(env->sc_hosts), globalentry) {
usr.sbin/relayd/agentx_control.c
859
TAILQ_FOREACH(session, &(env->sc_sessions), se_entry) {
usr.sbin/relayd/agentx_control.c
953
TAILQ_FOREACH(table, env->sc_tables, entry) {
usr.sbin/relayd/ca.c
110
TAILQ_FOREACH(cert, env->sc_certs, cert_entry) {
usr.sbin/relayd/ca.c
142
if (pkey_add(env, pkey, hash) == NULL)
usr.sbin/relayd/ca.c
149
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry) {
usr.sbin/relayd/ca.c
183
if (pkey_add(env, pkey, hash) == NULL)
usr.sbin/relayd/ca.c
198
if (config_getrelay(env, imsg) != 0)
usr.sbin/relayd/ca.c
202
if (config_getrelayfd(env, imsg) != 0)
usr.sbin/relayd/ca.c
206
if (config_getcfg(env, imsg) != 0)
usr.sbin/relayd/ca.c
213
if (config_getreset(env, imsg) != 0)
usr.sbin/relayd/ca.c
249
if (cko.cko_proc > env->sc_conf.prefork_relay)
usr.sbin/relayd/ca.c
254
if ((pkey = pkey_find(env, cko.cko_hash)) == NULL) {
usr.sbin/relayd/ca.c
261
if (proc_composev_imsg(env->sc_ps, PROC_RELAY,
usr.sbin/relayd/ca.c
301
if (proc_composev_imsg(env->sc_ps, PROC_RELAY, cko.cko_proc,
usr.sbin/relayd/ca.c
320
if (cko.cko_proc > env->sc_conf.prefork_relay)
usr.sbin/relayd/ca.c
325
if ((pkey = pkey_find(env, cko.cko_hash)) == NULL) {
usr.sbin/relayd/ca.c
332
if (proc_composev_imsg(env->sc_ps, PROC_RELAY,
usr.sbin/relayd/ca.c
358
if (proc_composev_imsg(env->sc_ps, PROC_RELAY, cko.cko_proc,
usr.sbin/relayd/ca.c
385
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/ca.c
48
static struct relayd *env = NULL;
usr.sbin/relayd/ca.c
572
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/ca.c
58
env = ps->ps_env;
usr.sbin/relayd/ca.c
72
env->sc_id = getpid() & 0xffff;
usr.sbin/relayd/ca.c
745
if (env == NULL)
usr.sbin/relayd/ca.c
746
env = x_env;
usr.sbin/relayd/check_icmp.c
103
check_icmp(struct relayd *env, struct timeval *tv)
usr.sbin/relayd/check_icmp.c
105
if (env->sc_has_icmp) {
usr.sbin/relayd/check_icmp.c
106
check_icmp_add(&env->sc_icmp_recv, EV_READ, tv, recv_icmp);
usr.sbin/relayd/check_icmp.c
107
check_icmp_add(&env->sc_icmp_send, EV_WRITE, tv, send_icmp);
usr.sbin/relayd/check_icmp.c
109
if (env->sc_has_icmp6) {
usr.sbin/relayd/check_icmp.c
110
check_icmp_add(&env->sc_icmp6_recv, EV_READ, tv, recv_icmp);
usr.sbin/relayd/check_icmp.c
111
check_icmp_add(&env->sc_icmp6_send, EV_WRITE, tv, send_icmp);
usr.sbin/relayd/check_icmp.c
121
TAILQ_FOREACH(table, cie->env->sc_tables, entry) {
usr.sbin/relayd/check_icmp.c
142
TAILQ_FOREACH(table, cie->env->sc_tables, entry) {
usr.sbin/relayd/check_icmp.c
184
icp->icmp_id = htons(cie->env->sc_id);
usr.sbin/relayd/check_icmp.c
191
icp6->icmp6_id = htons(cie->env->sc_id);
usr.sbin/relayd/check_icmp.c
195
TAILQ_FOREACH(table, cie->env->sc_tables, entry) {
usr.sbin/relayd/check_icmp.c
282
&cie->tv_start, &cie->env->sc_conf.timeout, cie);
usr.sbin/relayd/check_icmp.c
325
if (icpid != cie->env->sc_id)
usr.sbin/relayd/check_icmp.c
328
host = host_find(cie->env, id);
usr.sbin/relayd/check_icmp.c
347
&cie->tv_start, &cie->env->sc_conf.timeout, cie);
usr.sbin/relayd/check_icmp.c
50
icmp_setup(struct relayd *env, struct ctl_icmp_event *cie, int af)
usr.sbin/relayd/check_icmp.c
61
cie->env = env;
usr.sbin/relayd/check_icmp.c
66
icmp_init(struct relayd *env)
usr.sbin/relayd/check_icmp.c
68
icmp_setup(env, &env->sc_icmp_send, AF_INET);
usr.sbin/relayd/check_icmp.c
69
icmp_setup(env, &env->sc_icmp_recv, AF_INET);
usr.sbin/relayd/check_icmp.c
70
icmp_setup(env, &env->sc_icmp6_send, AF_INET6);
usr.sbin/relayd/check_icmp.c
71
icmp_setup(env, &env->sc_icmp6_recv, AF_INET6);
usr.sbin/relayd/check_icmp.c
72
env->sc_id = getpid() & 0xffff;
usr.sbin/relayd/check_icmp.c
76
schedule_icmp(struct relayd *env, struct host *host)
usr.sbin/relayd/check_icmp.c
82
env->sc_has_icmp = 1;
usr.sbin/relayd/check_icmp.c
84
env->sc_has_icmp6 = 1;
usr.sbin/relayd/check_icmp.c
95
bcopy(&cie->env->sc_conf.timeout, &tv, sizeof(tv));
usr.sbin/relayd/check_script.c
104
if ((env->sc_conf.flags & F_SCRIPT) == 0) {
usr.sbin/relayd/check_script.c
37
check_script(struct relayd *env, struct host *host)
usr.sbin/relayd/check_script.c
45
if ((table = table_find(env, host->conf.tableid)) == NULL)
usr.sbin/relayd/check_script.c
59
if (proc_compose(env->sc_ps, PROC_PARENT, IMSG_SCRIPT, &scr,
usr.sbin/relayd/check_script.c
65
script_done(struct relayd *env, struct ctl_script *scr)
usr.sbin/relayd/check_script.c
69
if ((host = host_find(env, scr->host)) == NULL)
usr.sbin/relayd/check_script.c
95
script_exec(struct relayd *env, struct ctl_script *scr)
usr.sbin/relayd/config.c
100
bzero(&env->sc_proto_default, sizeof(env->sc_proto_default));
usr.sbin/relayd/config.c
101
env->sc_proto_default.id = EMPTY_ID;
usr.sbin/relayd/config.c
102
env->sc_proto_default.flags = F_USED;
usr.sbin/relayd/config.c
103
env->sc_proto_default.tcpflags = TCPFLAG_DEFAULT;
usr.sbin/relayd/config.c
1036
TAILQ_FOREACH(cert, env->sc_certs, cert_entry) {
usr.sbin/relayd/config.c
104
env->sc_proto_default.tcpbacklog = RELAY_BACKLOG;
usr.sbin/relayd/config.c
105
env->sc_proto_default.tlsflags = TLSFLAG_DEFAULT;
usr.sbin/relayd/config.c
1058
config_getrelay(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
106
TAILQ_INIT(&env->sc_proto_default.tlscerts);
usr.sbin/relayd/config.c
1061
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/config.c
107
(void)strlcpy(env->sc_proto_default.tlsciphers,
usr.sbin/relayd/config.c
1086
rlay->rl_proto = &env->sc_proto_default;
usr.sbin/relayd/config.c
1088
proto_find(env, rlay->rl_conf.proto)) == NULL) {
usr.sbin/relayd/config.c
109
sizeof(env->sc_proto_default.tlsciphers));
usr.sbin/relayd/config.c
110
(void)strlcpy(env->sc_proto_default.tlsecdhecurves,
usr.sbin/relayd/config.c
1105
TAILQ_INSERT_TAIL(env->sc_relays, rlay, rl_entry);
usr.sbin/relayd/config.c
1107
env->sc_relaycount++;
usr.sbin/relayd/config.c
112
sizeof(env->sc_proto_default.tlsecdhecurves));
usr.sbin/relayd/config.c
1123
config_getrelaytable(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
113
(void)strlcpy(env->sc_proto_default.tlsdhparams,
usr.sbin/relayd/config.c
1138
if ((rlay = relay_find(env, crt.relayid)) == NULL) {
usr.sbin/relayd/config.c
1143
if ((table = table_find(env, crt.id)) == NULL) {
usr.sbin/relayd/config.c
115
sizeof(env->sc_proto_default.tlsdhparams));
usr.sbin/relayd/config.c
1155
env->sc_ps->ps_title[privsep_process], env->sc_ps->ps_instance,
usr.sbin/relayd/config.c
116
env->sc_proto_default.type = RELAY_PROTO_TCP;
usr.sbin/relayd/config.c
1166
config_getrelayfd(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
117
(void)strlcpy(env->sc_proto_default.name, "default",
usr.sbin/relayd/config.c
118
sizeof(env->sc_proto_default.name));
usr.sbin/relayd/config.c
1181
if ((cert = cert_find(env, crfd.id)) == NULL) {
usr.sbin/relayd/config.c
1182
if ((cert = cert_add(env, crfd.id)) == NULL)
usr.sbin/relayd/config.c
1188
if ((rlay = relay_find(env, crfd.relayid)) == NULL) {
usr.sbin/relayd/config.c
121
if ((env->sc_rts =
usr.sbin/relayd/config.c
1217
env->sc_ps->ps_title[privsep_process], env->sc_ps->ps_instance,
usr.sbin/relayd/config.c
122
calloc(1, sizeof(*env->sc_rts))) == NULL)
usr.sbin/relayd/config.c
124
TAILQ_INIT(env->sc_rts);
usr.sbin/relayd/config.c
127
if ((env->sc_routes =
usr.sbin/relayd/config.c
128
calloc(1, sizeof(*env->sc_routes))) == NULL)
usr.sbin/relayd/config.c
130
TAILQ_INIT(env->sc_routes);
usr.sbin/relayd/config.c
137
config_purge(struct relayd *env, u_int reset)
usr.sbin/relayd/config.c
139
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/config.c
154
if (what & CONFIG_TABLES && env->sc_tables != NULL) {
usr.sbin/relayd/config.c
155
while ((table = TAILQ_FIRST(env->sc_tables)) != NULL)
usr.sbin/relayd/config.c
156
purge_table(env, env->sc_tables, table);
usr.sbin/relayd/config.c
157
env->sc_tablecount = 0;
usr.sbin/relayd/config.c
159
if (what & CONFIG_RDRS && env->sc_rdrs != NULL) {
usr.sbin/relayd/config.c
160
while ((rdr = TAILQ_FIRST(env->sc_rdrs)) != NULL) {
usr.sbin/relayd/config.c
161
TAILQ_REMOVE(env->sc_rdrs, rdr, entry);
usr.sbin/relayd/config.c
168
env->sc_rdrcount = 0;
usr.sbin/relayd/config.c
170
if (what & CONFIG_RELAYS && env->sc_pkeys != NULL) {
usr.sbin/relayd/config.c
171
while ((pkey = TAILQ_FIRST(env->sc_pkeys)) != NULL) {
usr.sbin/relayd/config.c
172
TAILQ_REMOVE(env->sc_pkeys, pkey, pkey_entry);
usr.sbin/relayd/config.c
176
if (what & CONFIG_RELAYS && env->sc_relays != NULL) {
usr.sbin/relayd/config.c
177
while ((rlay = TAILQ_FIRST(env->sc_relays)) != NULL)
usr.sbin/relayd/config.c
178
purge_relay(env, rlay);
usr.sbin/relayd/config.c
179
env->sc_relaycount = 0;
usr.sbin/relayd/config.c
181
if (what & CONFIG_PROTOS && env->sc_protos != NULL) {
usr.sbin/relayd/config.c
182
while ((proto = TAILQ_FIRST(env->sc_protos)) != NULL) {
usr.sbin/relayd/config.c
183
TAILQ_REMOVE(env->sc_protos, proto, entry);
usr.sbin/relayd/config.c
197
env->sc_protocount = 0;
usr.sbin/relayd/config.c
199
if (what & CONFIG_RTS && env->sc_rts != NULL) {
usr.sbin/relayd/config.c
200
while ((rt = TAILQ_FIRST(env->sc_rts)) != NULL) {
usr.sbin/relayd/config.c
201
TAILQ_REMOVE(env->sc_rts, rt, rt_entry);
usr.sbin/relayd/config.c
204
TAILQ_REMOVE(env->sc_routes, nr, nr_route);
usr.sbin/relayd/config.c
206
env->sc_routecount--;
usr.sbin/relayd/config.c
210
env->sc_routercount = 0;
usr.sbin/relayd/config.c
212
if (what & CONFIG_ROUTES && env->sc_routes != NULL) {
usr.sbin/relayd/config.c
213
while ((nr = TAILQ_FIRST(env->sc_routes)) != NULL) {
usr.sbin/relayd/config.c
216
TAILQ_REMOVE(env->sc_routes, nr, nr_route);
usr.sbin/relayd/config.c
219
env->sc_routecount = 0;
usr.sbin/relayd/config.c
224
config_setreset(struct relayd *env, u_int reset)
usr.sbin/relayd/config.c
226
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/config.c
248
config_getreset(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
256
config_purge(env, mode);
usr.sbin/relayd/config.c
262
config_getcfg(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
264
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/config.c
270
if (imsg_get_data(imsg, &env->sc_conf,
usr.sbin/relayd/config.c
280
TAILQ_FOREACH(tb, env->sc_tables, entry) {
usr.sbin/relayd/config.c
282
if (h->conf.parentid && (ph = host_find(env,
usr.sbin/relayd/config.c
291
if (env->sc_conf.flags & (F_TLS|F_TLSCLIENT)) {
usr.sbin/relayd/config.c
293
ca_engine_init(env);
usr.sbin/relayd/config.c
297
proc_compose(env->sc_ps, PROC_PARENT, IMSG_CFG_DONE, NULL, 0);
usr.sbin/relayd/config.c
303
config_settable(struct relayd *env, struct table *tb)
usr.sbin/relayd/config.c
305
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/config.c
320
tb->conf.name, tb->conf.id, env->sc_ps->ps_title[id]);
usr.sbin/relayd/config.c
342
config_gettable(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
35
config_init(struct relayd *env)
usr.sbin/relayd/config.c
37
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/config.c
378
TAILQ_INSERT_TAIL(env->sc_tables, tb, entry);
usr.sbin/relayd/config.c
380
env->sc_tablecount++;
usr.sbin/relayd/config.c
383
env->sc_ps->ps_title[privsep_process], env->sc_ps->ps_instance,
usr.sbin/relayd/config.c
390
config_gethost(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
404
if (host_find(env, host->conf.id) != NULL) {
usr.sbin/relayd/config.c
411
if ((tb = table_find(env, host->conf.tableid)) == NULL) {
usr.sbin/relayd/config.c
42
env->sc_conf.timeout.tv_sec = CHECK_TIMEOUT / 1000;
usr.sbin/relayd/config.c
424
TAILQ_INSERT_TAIL(&env->sc_hosts, host, globalentry);
usr.sbin/relayd/config.c
427
env->sc_ps->ps_title[privsep_process], env->sc_ps->ps_instance,
usr.sbin/relayd/config.c
43
env->sc_conf.timeout.tv_usec = (CHECK_TIMEOUT % 1000) * 1000;
usr.sbin/relayd/config.c
434
config_setrdr(struct relayd *env, struct rdr *rdr)
usr.sbin/relayd/config.c
436
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/config.c
44
env->sc_conf.interval.tv_sec = CHECK_INTERVAL;
usr.sbin/relayd/config.c
45
env->sc_conf.interval.tv_usec = 0;
usr.sbin/relayd/config.c
46
env->sc_conf.prefork_relay = RELAY_NUMPROC;
usr.sbin/relayd/config.c
462
config_getrdr(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
47
env->sc_conf.statinterval.tv_sec = RELAY_STATINTERVAL;
usr.sbin/relayd/config.c
475
if ((rdr->table = table_find(env, rdr->conf.table_id)) == NULL) {
usr.sbin/relayd/config.c
48
env->sc_ps->ps_csock.cs_name = RELAYD_SOCKET;
usr.sbin/relayd/config.c
480
if ((rdr->backup = table_find(env, rdr->conf.backup_id)) == NULL) {
usr.sbin/relayd/config.c
482
rdr->backup = &env->sc_empty_table;
usr.sbin/relayd/config.c
486
TAILQ_INSERT_TAIL(env->sc_rdrs, rdr, entry);
usr.sbin/relayd/config.c
488
env->sc_rdrcount++;
usr.sbin/relayd/config.c
491
env->sc_ps->ps_title[privsep_process], env->sc_ps->ps_instance,
usr.sbin/relayd/config.c
498
config_getvirt(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
512
if ((rdr = rdr_find(env, virt->rdrid)) == NULL) {
usr.sbin/relayd/config.c
521
env->sc_ps->ps_title[privsep_process], env->sc_ps->ps_instance,
usr.sbin/relayd/config.c
528
config_setrt(struct relayd *env, struct router *rt)
usr.sbin/relayd/config.c
530
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/config.c
555
config_getrt(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
568
if ((rt->rt_gwtable = table_find(env, rt->rt_conf.gwtable)) == NULL) {
usr.sbin/relayd/config.c
575
TAILQ_INSERT_TAIL(env->sc_rts, rt, rt_entry);
usr.sbin/relayd/config.c
577
env->sc_routercount++;
usr.sbin/relayd/config.c
580
env->sc_ps->ps_title[privsep_process], env->sc_ps->ps_instance,
usr.sbin/relayd/config.c
587
config_getroute(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
601
if (route_find(env, nr->nr_conf.id) != NULL) {
usr.sbin/relayd/config.c
608
if ((rt = router_find(env, nr->nr_conf.routerid)) == NULL) {
usr.sbin/relayd/config.c
61
if ((env->sc_tables =
usr.sbin/relayd/config.c
616
TAILQ_INSERT_TAIL(env->sc_routes, nr, nr_route);
usr.sbin/relayd/config.c
619
env->sc_routecount++;
usr.sbin/relayd/config.c
62
calloc(1, sizeof(*env->sc_tables))) == NULL)
usr.sbin/relayd/config.c
622
env->sc_ps->ps_title[privsep_process], env->sc_ps->ps_instance,
usr.sbin/relayd/config.c
629
config_setproto(struct relayd *env, struct protocol *proto)
usr.sbin/relayd/config.c
631
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/config.c
64
TAILQ_INIT(env->sc_tables);
usr.sbin/relayd/config.c
66
memset(&env->sc_empty_table, 0, sizeof(env->sc_empty_table));
usr.sbin/relayd/config.c
660
config_setrule(struct relayd *env, struct protocol *proto)
usr.sbin/relayd/config.c
662
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/config.c
67
env->sc_empty_table.conf.id = EMPTY_TABLE;
usr.sbin/relayd/config.c
68
env->sc_empty_table.conf.flags |= F_DISABLE;
usr.sbin/relayd/config.c
69
(void)strlcpy(env->sc_empty_table.conf.name, "empty",
usr.sbin/relayd/config.c
70
sizeof(env->sc_empty_table.conf.name));
usr.sbin/relayd/config.c
712
config_getproto(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
73
if ((env->sc_rdrs =
usr.sbin/relayd/config.c
74
calloc(1, sizeof(*env->sc_rdrs))) == NULL)
usr.sbin/relayd/config.c
745
TAILQ_INSERT_TAIL(env->sc_protos, proto, entry);
usr.sbin/relayd/config.c
747
env->sc_protocount++;
usr.sbin/relayd/config.c
750
env->sc_ps->ps_title[privsep_process], env->sc_ps->ps_instance,
usr.sbin/relayd/config.c
757
config_getrule(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
76
TAILQ_INIT(env->sc_rdrs);
usr.sbin/relayd/config.c
779
if ((proto = proto_find(env, rule->rule_protoid)) == NULL) {
usr.sbin/relayd/config.c
79
if ((env->sc_relays =
usr.sbin/relayd/config.c
80
calloc(1, sizeof(*env->sc_relays))) == NULL)
usr.sbin/relayd/config.c
82
TAILQ_INIT(env->sc_relays);
usr.sbin/relayd/config.c
822
env->sc_ps->ps_title[privsep_process], env->sc_ps->ps_instance,
usr.sbin/relayd/config.c
84
if ((env->sc_certs =
usr.sbin/relayd/config.c
849
config_setrelay(struct relayd *env, struct relay *rlay)
usr.sbin/relayd/config.c
85
calloc(1, sizeof(*env->sc_certs))) == NULL)
usr.sbin/relayd/config.c
851
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/config.c
87
TAILQ_INIT(env->sc_certs);
usr.sbin/relayd/config.c
89
if ((env->sc_pkeys =
usr.sbin/relayd/config.c
90
calloc(1, sizeof(*env->sc_pkeys))) == NULL)
usr.sbin/relayd/config.c
92
TAILQ_INIT(env->sc_pkeys);
usr.sbin/relayd/config.c
921
TAILQ_FOREACH(cert, env->sc_certs, cert_entry) {
usr.sbin/relayd/config.c
95
if ((env->sc_protos =
usr.sbin/relayd/config.c
96
calloc(1, sizeof(*env->sc_protos))) == NULL)
usr.sbin/relayd/config.c
98
TAILQ_INIT(env->sc_protos);
usr.sbin/relayd/control.c
232
struct relayd *env = cs->cs_env;
usr.sbin/relayd/control.c
233
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/control.c
362
proc_forward_imsg(env->sc_ps, &imsg, PROC_PARENT);
usr.sbin/relayd/control.c
365
proc_compose(env->sc_ps, PROC_HCE,
usr.sbin/relayd/control.c
385
proc_forward_imsg(env->sc_ps, &imsg, PROC_PARENT);
usr.sbin/relayd/control.c
386
proc_forward_imsg(env->sc_ps, &imsg, PROC_HCE);
usr.sbin/relayd/control.c
387
proc_forward_imsg(env->sc_ps, &imsg, PROC_RELAY);
usr.sbin/relayd/control.c
46
struct relayd *env = ps->ps_env;
usr.sbin/relayd/control.c
98
cs->cs_env = env;
usr.sbin/relayd/hce.c
109
evtimer_del(&env->sc_ev);
usr.sbin/relayd/hce.c
110
TAILQ_FOREACH(table, env->sc_tables, entry) {
usr.sbin/relayd/hce.c
119
if (env->sc_has_icmp) {
usr.sbin/relayd/hce.c
120
event_del(&env->sc_icmp_send.ev);
usr.sbin/relayd/hce.c
121
event_del(&env->sc_icmp_recv.ev);
usr.sbin/relayd/hce.c
123
if (env->sc_has_icmp6) {
usr.sbin/relayd/hce.c
124
event_del(&env->sc_icmp6_send.ev);
usr.sbin/relayd/hce.c
125
event_del(&env->sc_icmp6_recv.ev);
usr.sbin/relayd/hce.c
139
proc_compose(env->sc_ps, PROC_PFE, IMSG_SYNC, NULL, 0);
usr.sbin/relayd/hce.c
140
TAILQ_FOREACH(table, env->sc_tables, entry) {
usr.sbin/relayd/hce.c
154
TAILQ_FOREACH(table, env->sc_tables, entry) {
usr.sbin/relayd/hce.c
173
schedule_icmp(env, host);
usr.sbin/relayd/hce.c
176
check_script(env, host);
usr.sbin/relayd/hce.c
188
check_icmp(env, &tv);
usr.sbin/relayd/hce.c
190
bcopy(&env->sc_conf.interval, &tv, sizeof(tv));
usr.sbin/relayd/hce.c
191
evtimer_add(&env->sc_ev, &tv);
usr.sbin/relayd/hce.c
207
if ((hostnst = host_find(env, host->conf.id)) == NULL)
usr.sbin/relayd/hce.c
210
if ((table = table_find(env, host->conf.tableid)) == NULL)
usr.sbin/relayd/hce.c
214
if (env->sc_conf.opts & RELAYD_OPT_LOGUPDATE) {
usr.sbin/relayd/hce.c
249
proc_compose(env->sc_ps, PROC_PFE, IMSG_HOST_STATUS, &st, sizeof(st));
usr.sbin/relayd/hce.c
260
if (env->sc_conf.opts & logopt) {
usr.sbin/relayd/hce.c
296
if ((host = host_find(env, id)) == NULL)
usr.sbin/relayd/hce.c
307
if ((host = host_find(env, id)) == NULL)
usr.sbin/relayd/hce.c
316
if ((table = table_find(env, id)) == NULL)
usr.sbin/relayd/hce.c
325
if ((table = table_find(env, id)) == NULL)
usr.sbin/relayd/hce.c
332
evtimer_del(&env->sc_ev);
usr.sbin/relayd/hce.c
333
TAILQ_FOREACH(table, env->sc_tables, entry)
usr.sbin/relayd/hce.c
335
hce_launch_checks(-1, EV_TIMEOUT, env);
usr.sbin/relayd/hce.c
353
script_done(env, &scr);
usr.sbin/relayd/hce.c
356
if (config_gettable(env, imsg) != 0)
usr.sbin/relayd/hce.c
360
if (config_gethost(env, imsg) != 0)
usr.sbin/relayd/hce.c
364
if (config_getcfg(env, imsg) != 0)
usr.sbin/relayd/hce.c
371
if (config_getreset(env, imsg) != 0)
usr.sbin/relayd/hce.c
42
static struct relayd *env = NULL;
usr.sbin/relayd/hce.c
54
env = ps->ps_env;
usr.sbin/relayd/hce.c
57
icmp_init(env);
usr.sbin/relayd/hce.c
68
env->sc_id = getpid() & 0xffff;
usr.sbin/relayd/hce.c
83
if (!event_initialized(&env->sc_ev)) {
usr.sbin/relayd/hce.c
84
evtimer_set(&env->sc_ev, hce_launch_checks, env);
usr.sbin/relayd/hce.c
86
evtimer_add(&env->sc_ev, &tv);
usr.sbin/relayd/hce.c
89
if (env->sc_conf.flags & F_TLS) {
usr.sbin/relayd/hce.c
90
TAILQ_FOREACH(table, env->sc_tables, entry) {
usr.sbin/relayd/pfe.c
107
if (!event_initialized(&env->sc_statev)) {
usr.sbin/relayd/pfe.c
108
evtimer_set(&env->sc_statev, pfe_statistics, NULL);
usr.sbin/relayd/pfe.c
109
bcopy(&env->sc_conf.statinterval, &tv, sizeof(tv));
usr.sbin/relayd/pfe.c
110
evtimer_add(&env->sc_statev, &tv);
usr.sbin/relayd/pfe.c
117
event_del(&env->sc_statev);
usr.sbin/relayd/pfe.c
133
if ((host = host_find(env, st.id)) == NULL)
usr.sbin/relayd/pfe.c
154
proc_compose(env->sc_ps, PROC_RELAY,
usr.sbin/relayd/pfe.c
157
if ((table = table_find(env, host->conf.tableid)) ==
usr.sbin/relayd/pfe.c
166
snmp_hosttrap(env, table, host);
usr.sbin/relayd/pfe.c
204
if (config_gettable(env, imsg) != 0)
usr.sbin/relayd/pfe.c
208
if (config_gethost(env, imsg) != 0)
usr.sbin/relayd/pfe.c
212
if (config_getrdr(env, imsg) != 0)
usr.sbin/relayd/pfe.c
216
if (config_getvirt(env, imsg) != 0)
usr.sbin/relayd/pfe.c
220
if (config_getrt(env, imsg) != 0)
usr.sbin/relayd/pfe.c
224
if (config_getroute(env, imsg) != 0)
usr.sbin/relayd/pfe.c
228
if (config_getproto(env, imsg) != 0)
usr.sbin/relayd/pfe.c
232
if (config_getrelay(env, imsg) != 0)
usr.sbin/relayd/pfe.c
236
if (config_getrelaytable(env, imsg) != 0)
usr.sbin/relayd/pfe.c
240
if (config_getcfg(env, imsg) != 0)
usr.sbin/relayd/pfe.c
242
init_tables(env);
usr.sbin/relayd/pfe.c
243
agentx_init(env);
usr.sbin/relayd/pfe.c
250
if (config_getreset(env, imsg) != 0)
usr.sbin/relayd/pfe.c
278
if (cnl.proc > env->sc_conf.prefork_relay)
usr.sbin/relayd/pfe.c
280
if (natlook(env, &cnl) != 0)
usr.sbin/relayd/pfe.c
282
proc_compose_imsg(env->sc_ps, PROC_RELAY, cnl.proc,
usr.sbin/relayd/pfe.c
288
if (crs.proc > env->sc_conf.prefork_relay)
usr.sbin/relayd/pfe.c
290
if ((rlay = relay_find(env, crs.id)) == NULL)
usr.sbin/relayd/pfe.c
294
env->sc_conf.statinterval.tv_sec;
usr.sbin/relayd/pfe.c
330
TAILQ_FOREACH(t, &env->sc_sessions, se_entry) {
usr.sbin/relayd/pfe.c
342
TAILQ_INSERT_TAIL(&env->sc_sessions, s, se_entry);
usr.sbin/relayd/pfe.c
347
TAILQ_FOREACH(s, &env->sc_sessions, se_entry)
usr.sbin/relayd/pfe.c
351
TAILQ_REMOVE(&env->sc_sessions, s, se_entry);
usr.sbin/relayd/pfe.c
374
if (env->sc_rdrs == NULL)
usr.sbin/relayd/pfe.c
376
TAILQ_FOREACH(rdr, env->sc_rdrs, entry) {
usr.sbin/relayd/pfe.c
402
if (env->sc_relays == NULL)
usr.sbin/relayd/pfe.c
404
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry) {
usr.sbin/relayd/pfe.c
405
rlay->rl_stats[env->sc_conf.prefork_relay].id = EMPTY_ID;
usr.sbin/relayd/pfe.c
424
if (env->sc_rts == NULL)
usr.sbin/relayd/pfe.c
426
TAILQ_FOREACH(rt, env->sc_rts, rt_entry) {
usr.sbin/relayd/pfe.c
452
for (proc = 0; proc < env->sc_conf.prefork_relay; proc++) {
usr.sbin/relayd/pfe.c
458
proc_compose_imsg(env->sc_ps, PROC_RELAY, proc,
usr.sbin/relayd/pfe.c
470
rdr = rdr_findbyname(env, id->name);
usr.sbin/relayd/pfe.c
472
rdr = rdr_find(env, id->id);
usr.sbin/relayd/pfe.c
49
static struct relayd *env = NULL;
usr.sbin/relayd/pfe.c
496
rdr = rdr_findbyname(env, id->name);
usr.sbin/relayd/pfe.c
498
rdr = rdr_find(env, id->id);
usr.sbin/relayd/pfe.c
532
table = table_findbyname(env, id->name);
usr.sbin/relayd/pfe.c
534
table = table_find(env, id->id);
usr.sbin/relayd/pfe.c
538
if (table->conf.rdrid > 0 && rdr_find(env, table->conf.rdrid) == NULL)
usr.sbin/relayd/pfe.c
547
proc_compose(env->sc_ps, PROC_HCE, IMSG_TABLE_DISABLE,
usr.sbin/relayd/pfe.c
551
proc_compose(env->sc_ps, PROC_RELAY, IMSG_TABLE_DISABLE,
usr.sbin/relayd/pfe.c
566
table = table_findbyname(env, id->name);
usr.sbin/relayd/pfe.c
568
table = table_find(env, id->id);
usr.sbin/relayd/pfe.c
573
if (table->conf.rdrid > 0 && rdr_find(env, table->conf.rdrid) == NULL)
usr.sbin/relayd/pfe.c
583
proc_compose(env->sc_ps, PROC_HCE, IMSG_TABLE_ENABLE,
usr.sbin/relayd/pfe.c
587
proc_compose(env->sc_ps, PROC_RELAY, IMSG_TABLE_ENABLE,
usr.sbin/relayd/pfe.c
604
host = host_findbyname(env, id->name);
usr.sbin/relayd/pfe.c
607
host = host_find(env, id->id);
usr.sbin/relayd/pfe.c
617
if ((table = table_find(env, host->conf.tableid)) == NULL)
usr.sbin/relayd/pfe.c
63
env = ps->ps_env;
usr.sbin/relayd/pfe.c
630
proc_compose(env->sc_ps, PROC_HCE, IMSG_HOST_DISABLE,
usr.sbin/relayd/pfe.c
634
proc_compose(env->sc_ps, PROC_RELAY, IMSG_HOST_DISABLE,
usr.sbin/relayd/pfe.c
645
TAILQ_FOREACH(t, env->sc_tables, entry)
usr.sbin/relayd/pfe.c
666
host = host_findbyname(env, id->name);
usr.sbin/relayd/pfe.c
669
host = host_find(env, id->id);
usr.sbin/relayd/pfe.c
68
if (env->sc_pf == NULL) {
usr.sbin/relayd/pfe.c
683
proc_compose(env->sc_ps, PROC_HCE, IMSG_HOST_ENABLE,
usr.sbin/relayd/pfe.c
687
proc_compose(env->sc_ps, PROC_RELAY, IMSG_HOST_ENABLE,
usr.sbin/relayd/pfe.c
69
if ((env->sc_pf = calloc(1, sizeof(*(env->sc_pf)))) == NULL)
usr.sbin/relayd/pfe.c
699
TAILQ_FOREACH(t, env->sc_tables, entry)
usr.sbin/relayd/pfe.c
71
env->sc_pf->dev = s;
usr.sbin/relayd/pfe.c
724
TAILQ_FOREACH(rdr, env->sc_rdrs, entry) {
usr.sbin/relayd/pfe.c
73
if (ioctl(env->sc_pf->dev, DIOCGETSTATUS, &status) == -1)
usr.sbin/relayd/pfe.c
747
sync_table(env, rdr, active);
usr.sbin/relayd/pfe.c
753
flush_table(env, rdr);
usr.sbin/relayd/pfe.c
760
sync_ruleset(env, rdr, 0);
usr.sbin/relayd/pfe.c
770
sync_ruleset(env, rdr, 1);
usr.sbin/relayd/pfe.c
775
TAILQ_FOREACH(rt, env->sc_rts, rt_entry) {
usr.sbin/relayd/pfe.c
780
sync_routes(env, rt);
usr.sbin/relayd/pfe.c
783
TAILQ_FOREACH(table, env->sc_tables, entry) {
usr.sbin/relayd/pfe.c
811
proc_compose(env->sc_ps, PROC_PARENT, IMSG_DEMOTE,
usr.sbin/relayd/pfe.c
828
TAILQ_FOREACH(rdr, env->sc_rdrs, entry) {
usr.sbin/relayd/pfe.c
829
cnt = check_table(env, rdr, rdr->table);
usr.sbin/relayd/pfe.c
831
cnt += check_table(env, rdr, rdr->backup);
usr.sbin/relayd/pfe.c
843
(3600 / env->sc_conf.statinterval.tv_sec)) == 0) {
usr.sbin/relayd/pfe.c
849
(86400 / env->sc_conf.statinterval.tv_sec)) == 0) {
usr.sbin/relayd/pfe.c
858
rdr->stats.interval = env->sc_conf.statinterval.tv_sec;
usr.sbin/relayd/pfe.c
862
evtimer_set(&env->sc_statev, pfe_statistics, NULL);
usr.sbin/relayd/pfe.c
863
bcopy(&env->sc_conf.statinterval, &tv, sizeof(tv));
usr.sbin/relayd/pfe.c
864
evtimer_add(&env->sc_statev, &tv);
usr.sbin/relayd/pfe.c
97
flush_rulesets(env);
usr.sbin/relayd/pfe.c
98
config_purge(env, CONFIG_ALL);
usr.sbin/relayd/pfe_filter.c
107
kill_tables(struct relayd *env)
usr.sbin/relayd/pfe_filter.c
113
if (!(env->sc_conf.flags & F_NEEDPF))
usr.sbin/relayd/pfe_filter.c
116
TAILQ_FOREACH(rdr, env->sc_rdrs, entry) {
usr.sbin/relayd/pfe_filter.c
124
if (ioctl(env->sc_pf->dev, DIOCRCLRTABLES, &io) == -1)
usr.sbin/relayd/pfe_filter.c
136
sync_table(struct relayd *env, struct rdr *rdr, struct table *table)
usr.sbin/relayd/pfe_filter.c
145
if (!(env->sc_conf.flags & F_NEEDPF))
usr.sbin/relayd/pfe_filter.c
152
flush_table(env, rdr);
usr.sbin/relayd/pfe_filter.c
204
if (ioctl(env->sc_pf->dev, DIOCRSETADDRS, &io) == -1)
usr.sbin/relayd/pfe_filter.c
207
cnt = kill_srcnodes(env, table);
usr.sbin/relayd/pfe_filter.c
210
if (env->sc_conf.opts & RELAYD_OPT_LOGUPDATE)
usr.sbin/relayd/pfe_filter.c
221
kill_srcnodes(struct relayd *env, struct table *table)
usr.sbin/relayd/pfe_filter.c
260
if (ioctl(env->sc_pf->dev,
usr.sbin/relayd/pfe_filter.c
270
flush_table(struct relayd *env, struct rdr *rdr)
usr.sbin/relayd/pfe_filter.c
274
if (!(env->sc_conf.flags & F_NEEDPF))
usr.sbin/relayd/pfe_filter.c
288
if (ioctl(env->sc_pf->dev, DIOCRCLRADDRS, &io) == -1)
usr.sbin/relayd/pfe_filter.c
294
if (ioctl(env->sc_pf->dev, DIOCRCLRTSTATS, &io) == -1)
usr.sbin/relayd/pfe_filter.c
305
transaction_init(struct relayd *env, const char *anchor)
usr.sbin/relayd/pfe_filter.c
307
env->sc_pf->pft.size = 1;
usr.sbin/relayd/pfe_filter.c
308
env->sc_pf->pft.esize = sizeof(env->sc_pf->pfte);
usr.sbin/relayd/pfe_filter.c
309
env->sc_pf->pft.array = &env->sc_pf->pfte;
usr.sbin/relayd/pfe_filter.c
311
bzero(&env->sc_pf->pfte, sizeof(env->sc_pf->pfte));
usr.sbin/relayd/pfe_filter.c
312
(void)strlcpy(env->sc_pf->pfte.anchor,
usr.sbin/relayd/pfe_filter.c
314
env->sc_pf->pfte.type = PF_TRANS_RULESET;
usr.sbin/relayd/pfe_filter.c
316
if (ioctl(env->sc_pf->dev, DIOCXBEGIN,
usr.sbin/relayd/pfe_filter.c
317
&env->sc_pf->pft) == -1)
usr.sbin/relayd/pfe_filter.c
324
transaction_commit(struct relayd *env)
usr.sbin/relayd/pfe_filter.c
326
if (ioctl(env->sc_pf->dev, DIOCXCOMMIT,
usr.sbin/relayd/pfe_filter.c
327
&env->sc_pf->pft) == -1)
usr.sbin/relayd/pfe_filter.c
334
sync_ruleset(struct relayd *env, struct rdr *rdr, int enable)
usr.sbin/relayd/pfe_filter.c
343
if ((env->sc_conf.flags & F_NEEDPF) == 0)
usr.sbin/relayd/pfe_filter.c
353
if (transaction_init(env, anchor) == -1) {
usr.sbin/relayd/pfe_filter.c
359
if (transaction_commit(env) == -1)
usr.sbin/relayd/pfe_filter.c
406
rio.ticket = env->sc_pf->pfte.ticket;
usr.sbin/relayd/pfe_filter.c
416
rio.rule.onrdomain = env->sc_rtable;
usr.sbin/relayd/pfe_filter.c
417
DPRINTF("%s rtable %d", __func__, env->sc_rtable);
usr.sbin/relayd/pfe_filter.c
49
init_tables(struct relayd *env)
usr.sbin/relayd/pfe_filter.c
492
if (ioctl(env->sc_pf->dev, DIOCADDRULE, &rio) == -1)
usr.sbin/relayd/pfe_filter.c
496
if (transaction_commit(env) == -1)
usr.sbin/relayd/pfe_filter.c
505
flush_rulesets(struct relayd *env)
usr.sbin/relayd/pfe_filter.c
510
if (!(env->sc_conf.flags & F_NEEDPF))
usr.sbin/relayd/pfe_filter.c
513
kill_tables(env);
usr.sbin/relayd/pfe_filter.c
514
TAILQ_FOREACH(rdr, env->sc_rdrs, entry) {
usr.sbin/relayd/pfe_filter.c
521
if (transaction_init(env, anchor) == -1 ||
usr.sbin/relayd/pfe_filter.c
522
transaction_commit(env) == -1)
usr.sbin/relayd/pfe_filter.c
529
if (transaction_init(env, anchor) == -1 ||
usr.sbin/relayd/pfe_filter.c
530
transaction_commit(env) == -1)
usr.sbin/relayd/pfe_filter.c
541
natlook(struct relayd *env, struct ctl_natlook *cnl)
usr.sbin/relayd/pfe_filter.c
548
if (!(env->sc_conf.flags & F_NEEDPF))
usr.sbin/relayd/pfe_filter.c
56
if (!(env->sc_conf.flags & F_NEEDPF))
usr.sbin/relayd/pfe_filter.c
576
if (ioctl(env->sc_pf->dev, DIOCNATLOOK, &pnl) == -1) {
usr.sbin/relayd/pfe_filter.c
579
if (ioctl(env->sc_pf->dev, DIOCNATLOOK, &pnl) == -1) {
usr.sbin/relayd/pfe_filter.c
59
if ((tables = calloc(env->sc_rdrcount, sizeof(*tables))) == NULL)
usr.sbin/relayd/pfe_filter.c
617
check_table(struct relayd *env, struct rdr *rdr, struct table *table)
usr.sbin/relayd/pfe_filter.c
63
TAILQ_FOREACH(rdr, env->sc_rdrs, entry) {
usr.sbin/relayd/pfe_filter.c
640
if (ioctl(env->sc_pf->dev, DIOCRGETTSTATS, &io) == -1)
usr.sbin/relayd/pfe_filter.c
77
if (i != env->sc_rdrcount)
usr.sbin/relayd/pfe_filter.c
81
io.pfrio_size = env->sc_rdrcount;
usr.sbin/relayd/pfe_filter.c
85
if (ioctl(env->sc_pf->dev, DIOCRADDTABLES, &io) == -1)
usr.sbin/relayd/pfe_filter.c
91
if (io.pfrio_nadd == env->sc_rdrcount)
usr.sbin/relayd/pfe_filter.c
97
TAILQ_FOREACH(rdr, env->sc_rdrs, entry)
usr.sbin/relayd/pfe_filter.c
98
flush_table(env, rdr);
usr.sbin/relayd/pfe_route.c
124
pfe_route(struct relayd *env, struct ctl_netroute *crt)
usr.sbin/relayd/pfe_route.c
138
hdr.rtm_seq = env->sc_rtseq++;
usr.sbin/relayd/pfe_route.c
174
if (writev(env->sc_rtsock, iov, iovcnt) == -1) {
usr.sbin/relayd/pfe_route.c
39
init_routes(struct relayd *env)
usr.sbin/relayd/pfe_route.c
43
if (!(env->sc_conf.flags & F_NEEDRT))
usr.sbin/relayd/pfe_route.c
46
if ((env->sc_rtsock = socket(AF_ROUTE, SOCK_RAW, 0)) == -1)
usr.sbin/relayd/pfe_route.c
50
if (setsockopt(env->sc_rtsock, AF_ROUTE, ROUTE_MSGFILTER,
usr.sbin/relayd/pfe_route.c
56
sync_routes(struct relayd *env, struct router *rt)
usr.sbin/relayd/pfe_route.c
63
if (!(env->sc_conf.flags & F_NEEDRT))
usr.sbin/relayd/pfe_route.c
85
proc_compose(env->sc_ps, PROC_PARENT,
usr.sbin/relayd/relay.c
107
env = ps->ps_env;
usr.sbin/relayd/relay.c
109
relay_http(env);
usr.sbin/relayd/relay.c
1110
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/relay.c
115
config_purge(env, CONFIG_ALL);
usr.sbin/relayd/relay.c
1236
proc_compose(env->sc_ps, PROC_PFE, IMSG_NATLOOK,
usr.sbin/relayd/relay.c
1484
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/relay.c
1495
proc_compose(env->sc_ps, PROC_PARENT, IMSG_BINDANY,
usr.sbin/relayd/relay.c
1752
if ((env->sc_conf.opts & (RELAYD_OPT_LOGCON|RELAYD_OPT_LOGCONERR)) &&
usr.sbin/relayd/relay.c
1763
if (err == 0 && (env->sc_conf.opts & RELAYD_OPT_LOGCON))
usr.sbin/relayd/relay.c
1771
if (err == 1 && (env->sc_conf.opts & RELAYD_OPT_LOGCONERR))
usr.sbin/relayd/relay.c
1818
proc_compose_imsg(env->sc_ps, PROC_PFE, -1, IMSG_KILLSTATES, -1,
usr.sbin/relayd/relay.c
1875
if ((host = host_find(env, id)) == NULL)
usr.sbin/relayd/relay.c
1877
if ((table = table_find(env, host->conf.tableid)) ==
usr.sbin/relayd/relay.c
1888
if ((host = host_find(env, id)) == NULL)
usr.sbin/relayd/relay.c
1896
if ((table = table_find(env, id)) == NULL)
usr.sbin/relayd/relay.c
1906
if ((table = table_find(env, id)) == NULL)
usr.sbin/relayd/relay.c
1916
if ((host = host_find(env, st.id)) == NULL)
usr.sbin/relayd/relay.c
1926
if ((table = table_find(env, host->conf.tableid)) ==
usr.sbin/relayd/relay.c
1948
if ((con = session_find(env, cnl.id)) == NULL ||
usr.sbin/relayd/relay.c
1963
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry) {
usr.sbin/relayd/relay.c
1968
proc_compose(env->sc_ps, p->p_id,
usr.sbin/relayd/relay.c
1972
proc_compose(env->sc_ps, p->p_id, IMSG_CTL_END,
usr.sbin/relayd/relay.c
2011
if ((con = session_find(env, id)) == NULL) {
usr.sbin/relayd/relay.c
2026
if (config_gettable(env, imsg) != 0)
usr.sbin/relayd/relay.c
2030
if (config_gethost(env, imsg) != 0)
usr.sbin/relayd/relay.c
2034
if (config_getproto(env, imsg) != 0)
usr.sbin/relayd/relay.c
2038
if (config_getrule(env, imsg) != 0)
usr.sbin/relayd/relay.c
2042
if (config_getrelay(env, imsg) != 0)
usr.sbin/relayd/relay.c
2046
if (config_getrelaytable(env, imsg) != 0)
usr.sbin/relayd/relay.c
2050
if (config_getrelayfd(env, imsg) != 0)
usr.sbin/relayd/relay.c
2054
if (config_getcfg(env, imsg) != 0)
usr.sbin/relayd/relay.c
2061
if (config_getreset(env, imsg) != 0)
usr.sbin/relayd/relay.c
2065
if (imsg_get_data(imsg, &env->sc_ticket,
usr.sbin/relayd/relay.c
2066
sizeof(env->sc_ticket)) == -1)
usr.sbin/relayd/relay.c
2068
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry) {
usr.sbin/relayd/relay.c
2071
env->sc_ticket.tt_keyrev,
usr.sbin/relayd/relay.c
2072
env->sc_ticket.tt_key,
usr.sbin/relayd/relay.c
2073
sizeof(env->sc_ticket.tt_key));
usr.sbin/relayd/relay.c
2123
if (tls_config_set_session_id(tls_cfg, env->sc_conf.tls_sid,
usr.sbin/relayd/relay.c
2124
sizeof(env->sc_conf.tls_sid)) == -1) {
usr.sbin/relayd/relay.c
2136
env->sc_ticket.tt_keyrev, env->sc_ticket.tt_key,
usr.sbin/relayd/relay.c
2137
sizeof(env->sc_ticket.tt_key));
usr.sbin/relayd/relay.c
2226
TAILQ_FOREACH(cert, env->sc_certs, cert_entry) {
usr.sbin/relayd/relay.c
354
evtimer_set(&env->sc_statev, relay_statistics, ps);
usr.sbin/relayd/relay.c
355
bcopy(&env->sc_conf.statinterval, &tv, sizeof(tv));
usr.sbin/relayd/relay.c
356
evtimer_add(&env->sc_statev, &tv);
usr.sbin/relayd/relay.c
362
proc_compose(env->sc_ps, PROC_PFE, IMSG_SESS_PUBLISH, s, sizeof(*s));
usr.sbin/relayd/relay.c
368
proc_compose(env->sc_ps, PROC_PFE, IMSG_SESS_UNPUBLISH,
usr.sbin/relayd/relay.c
390
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry) {
usr.sbin/relayd/relay.c
400
(3600 / env->sc_conf.statinterval.tv_sec)) == 0) {
usr.sbin/relayd/relay.c
406
(86400 / env->sc_conf.statinterval.tv_sec)) == 0) {
usr.sbin/relayd/relay.c
420
proc_compose(env->sc_ps, PROC_PFE, IMSG_STATISTICS,
usr.sbin/relayd/relay.c
434
evtimer_set(&env->sc_statev, relay_statistics, ps);
usr.sbin/relayd/relay.c
435
bcopy(&env->sc_conf.statinterval, &tv, sizeof(tv));
usr.sbin/relayd/relay.c
436
evtimer_add(&env->sc_statev, &tv);
usr.sbin/relayd/relay.c
447
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry) {
usr.sbin/relayd/relay.c
476
relay_udp_init(env, rlay);
usr.sbin/relayd/relay.c
731
(env->sc_conf.opts & (RELAYD_OPT_LOGCON|RELAYD_OPT_LOGCONERR))) {
usr.sbin/relayd/relay.c
95
static struct relayd *env = NULL;
usr.sbin/relayd/relay_http.c
85
static struct relayd *env = NULL;
usr.sbin/relayd/relay_http.c
94
env = x_env;
usr.sbin/relayd/relay_udp.c
214
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/relay_udp.c
319
proc_compose(env->sc_ps, PROC_PFE,
usr.sbin/relayd/relay_udp.c
44
static struct relayd *env = NULL;
usr.sbin/relayd/relay_udp.c
73
if (env == NULL)
usr.sbin/relayd/relay_udp.c
74
env = x_env;
usr.sbin/relayd/relayd.c
1060
host_find(struct relayd *env, objid_t id)
usr.sbin/relayd/relayd.c
1065
TAILQ_FOREACH(table, env->sc_tables, entry)
usr.sbin/relayd/relayd.c
1073
table_find(struct relayd *env, objid_t id)
usr.sbin/relayd/relayd.c
1077
TAILQ_FOREACH(table, env->sc_tables, entry)
usr.sbin/relayd/relayd.c
1084
rdr_find(struct relayd *env, objid_t id)
usr.sbin/relayd/relayd.c
1088
TAILQ_FOREACH(rdr, env->sc_rdrs, entry)
usr.sbin/relayd/relayd.c
1095
relay_find(struct relayd *env, objid_t id)
usr.sbin/relayd/relayd.c
1099
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry)
usr.sbin/relayd/relayd.c
1106
proto_find(struct relayd *env, objid_t id)
usr.sbin/relayd/relayd.c
1110
TAILQ_FOREACH(p, env->sc_protos, entry)
usr.sbin/relayd/relayd.c
1117
session_find(struct relayd *env, objid_t id)
usr.sbin/relayd/relayd.c
1122
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry)
usr.sbin/relayd/relayd.c
1130
route_find(struct relayd *env, objid_t id)
usr.sbin/relayd/relayd.c
1134
TAILQ_FOREACH(nr, env->sc_routes, nr_route)
usr.sbin/relayd/relayd.c
1141
router_find(struct relayd *env, objid_t id)
usr.sbin/relayd/relayd.c
1145
TAILQ_FOREACH(rt, env->sc_rts, rt_entry)
usr.sbin/relayd/relayd.c
1152
host_findbyname(struct relayd *env, const char *name)
usr.sbin/relayd/relayd.c
1157
TAILQ_FOREACH(table, env->sc_tables, entry)
usr.sbin/relayd/relayd.c
1165
table_findbyname(struct relayd *env, const char *name)
usr.sbin/relayd/relayd.c
1169
TAILQ_FOREACH(table, env->sc_tables, entry)
usr.sbin/relayd/relayd.c
1176
table_findbyconf(struct relayd *env, struct table *tb)
usr.sbin/relayd/relayd.c
1185
TAILQ_FOREACH(table, env->sc_tables, entry) {
usr.sbin/relayd/relayd.c
1204
rdr_findbyname(struct relayd *env, const char *name)
usr.sbin/relayd/relayd.c
1208
TAILQ_FOREACH(rdr, env->sc_rdrs, entry)
usr.sbin/relayd/relayd.c
1215
relay_findbyname(struct relayd *env, const char *name)
usr.sbin/relayd/relayd.c
1219
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry)
usr.sbin/relayd/relayd.c
1226
relay_findbyaddr(struct relayd *env, struct relay_config *rc)
usr.sbin/relayd/relayd.c
1230
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry)
usr.sbin/relayd/relayd.c
1238
pkey_find(struct relayd *env, char *hash)
usr.sbin/relayd/relayd.c
1242
TAILQ_FOREACH(pkey, env->sc_pkeys, pkey_entry)
usr.sbin/relayd/relayd.c
1249
pkey_add(struct relayd *env, EVP_PKEY *pkey, char *hash)
usr.sbin/relayd/relayd.c
1253
if (env->sc_pkeys == NULL)
usr.sbin/relayd/relayd.c
126
struct relayd *env;
usr.sbin/relayd/relayd.c
1266
TAILQ_INSERT_TAIL(env->sc_pkeys, ca_pkey, pkey_entry);
usr.sbin/relayd/relayd.c
1272
cert_add(struct relayd *env, objid_t id)
usr.sbin/relayd/relayd.c
1293
TAILQ_INSERT_TAIL(env->sc_certs, cert, cert_entry);
usr.sbin/relayd/relayd.c
1299
cert_find(struct relayd *env, objid_t id)
usr.sbin/relayd/relayd.c
1303
TAILQ_FOREACH(cert, env->sc_certs, cert_entry)
usr.sbin/relayd/relayd.c
1339
relay_load_certfiles(struct relayd *env, struct relay *rlay,
usr.sbin/relayd/relayd.c
1367
ssl_load_key(env, proto->tlscakey,
usr.sbin/relayd/relayd.c
1470
if ((cert = cert_add(env, 0)) == NULL)
usr.sbin/relayd/relayd.c
179
if ((env = calloc(1, sizeof(*env))) == NULL ||
usr.sbin/relayd/relayd.c
183
relayd_env = env;
usr.sbin/relayd/relayd.c
184
env->sc_ps = ps;
usr.sbin/relayd/relayd.c
185
ps->ps_env = env;
usr.sbin/relayd/relayd.c
186
env->sc_conffile = conffile;
usr.sbin/relayd/relayd.c
187
env->sc_conf.opts = opts;
usr.sbin/relayd/relayd.c
188
TAILQ_INIT(&env->sc_hosts);
usr.sbin/relayd/relayd.c
189
TAILQ_INIT(&env->sc_sessions);
usr.sbin/relayd/relayd.c
190
env->sc_rtable = getrtable();
usr.sbin/relayd/relayd.c
192
arc4random_buf(env->sc_conf.tls_sid, sizeof(env->sc_conf.tls_sid));
usr.sbin/relayd/relayd.c
1925
struct relayd *env = arg;
usr.sbin/relayd/relayd.c
1934
proc_compose_imsg(env->sc_ps, PROC_RELAY, -1, IMSG_TLSTICKET_REKEY,
usr.sbin/relayd/relayd.c
1937
evtimer_set(&rekeyev, parent_tls_ticket_rekey, env);
usr.sbin/relayd/relayd.c
194
if (parse_config(env->sc_conffile, env) == -1)
usr.sbin/relayd/relayd.c
198
env->sc_conf.opts |= RELAYD_OPT_LOGUPDATE;
usr.sbin/relayd/relayd.c
209
if (env->sc_conf.opts & RELAYD_OPT_NOACTION)
usr.sbin/relayd/relayd.c
212
ps->ps_instances[PROC_RELAY] = env->sc_conf.prefork_relay;
usr.sbin/relayd/relayd.c
213
ps->ps_instances[PROC_CA] = env->sc_conf.prefork_relay;
usr.sbin/relayd/relayd.c
228
if (env->sc_conf.flags & F_AGENTX) {
usr.sbin/relayd/relayd.c
229
if (unveil(env->sc_conf.agentx_path, "w") == -1)
usr.sbin/relayd/relayd.c
230
err(1, "unveil %s", env->sc_conf.agentx_path);
usr.sbin/relayd/relayd.c
233
err(1, "unveil %s", env->sc_conf.agentx_path);
usr.sbin/relayd/relayd.c
255
if (load_config(env->sc_conffile, env) == -1) {
usr.sbin/relayd/relayd.c
256
proc_kill(env->sc_ps);
usr.sbin/relayd/relayd.c
260
if (env->sc_conf.opts & RELAYD_OPT_NOACTION) {
usr.sbin/relayd/relayd.c
262
proc_kill(env->sc_ps);
usr.sbin/relayd/relayd.c
267
parent_tls_ticket_rekey(0, 0, env);
usr.sbin/relayd/relayd.c
268
if (parent_configure(env) == -1)
usr.sbin/relayd/relayd.c
271
init_routes(env);
usr.sbin/relayd/relayd.c
275
parent_shutdown(env);
usr.sbin/relayd/relayd.c
282
parent_configure(struct relayd *env)
usr.sbin/relayd/relayd.c
292
TAILQ_FOREACH(tb, env->sc_tables, entry)
usr.sbin/relayd/relayd.c
293
config_settable(env, tb);
usr.sbin/relayd/relayd.c
294
TAILQ_FOREACH(rdr, env->sc_rdrs, entry)
usr.sbin/relayd/relayd.c
295
config_setrdr(env, rdr);
usr.sbin/relayd/relayd.c
296
TAILQ_FOREACH(rt, env->sc_rts, rt_entry)
usr.sbin/relayd/relayd.c
297
config_setrt(env, rt);
usr.sbin/relayd/relayd.c
298
TAILQ_FOREACH(proto, env->sc_protos, entry)
usr.sbin/relayd/relayd.c
299
config_setproto(env, proto);
usr.sbin/relayd/relayd.c
300
TAILQ_FOREACH(proto, env->sc_protos, entry)
usr.sbin/relayd/relayd.c
301
config_setrule(env, proto);
usr.sbin/relayd/relayd.c
302
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry) {
usr.sbin/relayd/relayd.c
308
config_setrelay(env, rlay);
usr.sbin/relayd/relayd.c
312
env->sc_reload = 2 + (2 * env->sc_conf.prefork_relay);
usr.sbin/relayd/relayd.c
317
proc_compose_imsg(env->sc_ps, id, -1, IMSG_CFG_DONE, -1,
usr.sbin/relayd/relayd.c
318
-1, &env->sc_conf, sizeof(env->sc_conf));
usr.sbin/relayd/relayd.c
323
config_purge(env, CONFIG_ALL & ~CONFIG_RELAYS);
usr.sbin/relayd/relayd.c
328
parent_reload(struct relayd *env, u_int reset, const char *filename)
usr.sbin/relayd/relayd.c
330
if (env->sc_reload) {
usr.sbin/relayd/relayd.c
332
__func__, env->sc_reload);
usr.sbin/relayd/relayd.c
338
filename = env->sc_conffile;
usr.sbin/relayd/relayd.c
342
config_purge(env, CONFIG_ALL);
usr.sbin/relayd/relayd.c
345
if (load_config(filename, env) == -1) {
usr.sbin/relayd/relayd.c
350
config_setreset(env, CONFIG_ALL);
usr.sbin/relayd/relayd.c
352
if (parent_configure(env) == -1) {
usr.sbin/relayd/relayd.c
357
config_setreset(env, reset);
usr.sbin/relayd/relayd.c
361
parent_configure_done(struct relayd *env)
usr.sbin/relayd/relayd.c
365
if (env->sc_reload == 0) {
usr.sbin/relayd/relayd.c
370
env->sc_reload--;
usr.sbin/relayd/relayd.c
371
if (env->sc_reload == 0) {
usr.sbin/relayd/relayd.c
376
proc_compose(env->sc_ps, id, IMSG_CTL_START, NULL, 0);
usr.sbin/relayd/relayd.c
382
parent_shutdown(struct relayd *env)
usr.sbin/relayd/relayd.c
384
config_purge(env, CONFIG_ALL);
usr.sbin/relayd/relayd.c
386
proc_kill(env->sc_ps);
usr.sbin/relayd/relayd.c
387
control_cleanup(&env->sc_ps->ps_csock);
usr.sbin/relayd/relayd.c
390
free(env->sc_ps);
usr.sbin/relayd/relayd.c
391
free(env);
usr.sbin/relayd/relayd.c
403
struct relayd *env = ps->ps_env;
usr.sbin/relayd/relayd.c
428
if (pfe_route(env, &crt) != 0)
usr.sbin/relayd/relayd.c
436
parent_reload(env, v, NULL);
usr.sbin/relayd/relayd.c
446
parent_reload(env, CONFIG_RELOAD, str);
usr.sbin/relayd/relayd.c
450
parent_shutdown(env);
usr.sbin/relayd/relayd.c
453
parent_configure_done(env);
usr.sbin/relayd/relayd.c
456
agentx_setsock(env, p->p_id);
usr.sbin/relayd/relayd.c
469
struct relayd *env = ps->ps_env;
usr.sbin/relayd/relayd.c
480
scr.retval = script_exec(env, &scr);
usr.sbin/relayd/relayd.c
484
parent_configure_done(env);
usr.sbin/relayd/relayd.c
497
struct relayd *env = ps->ps_env;
usr.sbin/relayd/relayd.c
509
bnd.bnd_proc > env->sc_conf.prefork_relay)
usr.sbin/relayd/relayd.c
525
parent_configure_done(env);
usr.sbin/relayd/relayd.c
538
struct relayd *env = ps->ps_env;
usr.sbin/relayd/relayd.c
542
parent_configure_done(env);
usr.sbin/relayd/relayd.c
552
purge_table(struct relayd *env, struct tablelist *head, struct table *table)
usr.sbin/relayd/relayd.c
558
TAILQ_REMOVE(&env->sc_hosts, host, globalentry);
usr.sbin/relayd/relayd.c
585
purge_relay(struct relayd *env, struct relay *rlay)
usr.sbin/relayd/relayd.c
595
TAILQ_REMOVE(env->sc_relays, rlay, rl_entry);
usr.sbin/relayd/relayd.c
632
TAILQ_FOREACH_SAFE(cert, env->sc_certs, cert_entry, tmpcert) {
usr.sbin/relayd/relayd.c
643
TAILQ_REMOVE(env->sc_certs, cert, cert_entry);
usr.sbin/relayd/relayd.h
168
struct relayd *env;
usr.sbin/relayd/ssl.c
52
ssl_load_key(struct relayd *env, const char *name, off_t *len, char *pass)
usr.sbin/slowcgi/slowcgi.c
1156
while (!SLIST_EMPTY(&c->env)) {
usr.sbin/slowcgi/slowcgi.c
1157
env_entry = SLIST_FIRST(&c->env);
usr.sbin/slowcgi/slowcgi.c
1158
SLIST_REMOVE_HEAD(&c->env, entry);
usr.sbin/slowcgi/slowcgi.c
129
struct env_head env;
usr.sbin/slowcgi/slowcgi.c
696
SLIST_INIT(&c->env);
usr.sbin/slowcgi/slowcgi.c
797
SLIST_INSERT_HEAD(&c->env, env_entry, entry);
usr.sbin/slowcgi/slowcgi.c
885
char **env;
usr.sbin/slowcgi/slowcgi.c
956
if ((env = calloc(c->env_count + 1, sizeof(char*))) == NULL)
usr.sbin/slowcgi/slowcgi.c
958
SLIST_FOREACH(env_entry, &c->env, entry)
usr.sbin/slowcgi/slowcgi.c
959
env[i++] = env_entry->val;
usr.sbin/slowcgi/slowcgi.c
960
env[i++] = NULL;
usr.sbin/slowcgi/slowcgi.c
961
execve(c->script_name, argv, env);
usr.sbin/smtpd/aliases.c
106
pbuf = strchr(user, *env->sc_subaddressing_delim);
usr.sbin/smtpd/aliases.c
117
user, *env->sc_subaddressing_delim, tag, domain))
usr.sbin/smtpd/aliases.c
138
user, *env->sc_subaddressing_delim, tag))
usr.sbin/smtpd/aliases.c
40
dsp = dict_xget(env->sc_dispatchers, expand->rule->dispatcher);
usr.sbin/smtpd/aliases.c
41
mapping = table_find(env, dsp->u.local.table_alias);
usr.sbin/smtpd/aliases.c
46
pbuf = strchr(buf, *env->sc_subaddressing_delim);
usr.sbin/smtpd/aliases.c
95
dsp = dict_xget(env->sc_dispatchers, expand->rule->dispatcher);
usr.sbin/smtpd/aliases.c
96
mapping = table_find(env, dsp->u.local.table_virtual);
usr.sbin/smtpd/ca.c
109
while (dict_iter(env->sc_pki_dict, &iter_dict, &k, (void **)&pki)) {
usr.sbin/smtpd/compress_backend.c
40
return (env->sc_comp->compress_chunk(ib, ibsz, ob, obsz));
usr.sbin/smtpd/compress_backend.c
46
return (env->sc_comp->uncompress_chunk(ib, ibsz, ob, obsz));
usr.sbin/smtpd/compress_backend.c
52
return (env->sc_comp->compress_file(ifile, ofile));
usr.sbin/smtpd/compress_backend.c
58
return (env->sc_comp->uncompress_file(ifile, ofile));
usr.sbin/smtpd/config.c
234
while ((l = TAILQ_FIRST(env->sc_listeners)) != NULL) {
usr.sbin/smtpd/config.c
235
TAILQ_REMOVE(env->sc_listeners, l, entry);
usr.sbin/smtpd/config.c
241
free(env->sc_listeners);
usr.sbin/smtpd/config.c
242
env->sc_listeners = NULL;
usr.sbin/smtpd/config.c
245
while (dict_root(env->sc_tables_dict, NULL, (void **)&t))
usr.sbin/smtpd/config.c
246
table_destroy(env, t);
usr.sbin/smtpd/config.c
247
free(env->sc_tables_dict);
usr.sbin/smtpd/config.c
248
env->sc_tables_dict = NULL;
usr.sbin/smtpd/config.c
251
while ((r = TAILQ_FIRST(env->sc_rules)) != NULL) {
usr.sbin/smtpd/config.c
252
TAILQ_REMOVE(env->sc_rules, r, r_entry);
usr.sbin/smtpd/config.c
255
free(env->sc_rules);
usr.sbin/smtpd/config.c
256
env->sc_rules = NULL;
usr.sbin/smtpd/config.c
259
while (dict_poproot(env->sc_dispatchers, (void **)&d)) {
usr.sbin/smtpd/config.c
262
free(env->sc_dispatchers);
usr.sbin/smtpd/config.c
263
env->sc_dispatchers = NULL;
usr.sbin/smtpd/config.c
266
while (dict_poproot(env->sc_pki_dict, (void **)&p)) {
usr.sbin/smtpd/config.c
271
free(env->sc_pki_dict);
usr.sbin/smtpd/config.c
272
env->sc_pki_dict = NULL;
usr.sbin/smtpd/config.c
275
while (dict_iter(env->sc_pki_dict, &iter_dict, &k,
usr.sbin/smtpd/control.c
209
stat_backend = env->sc_stat;
usr.sbin/smtpd/control.c
439
if (env->sc_flags & SMTPD_SMTP_PAUSED) {
usr.sbin/smtpd/control.c
556
if (env->sc_flags & SMTPD_MDA_PAUSED) {
usr.sbin/smtpd/control.c
561
env->sc_flags |= SMTPD_MDA_PAUSED;
usr.sbin/smtpd/control.c
570
if (env->sc_flags & SMTPD_MTA_PAUSED) {
usr.sbin/smtpd/control.c
575
env->sc_flags |= SMTPD_MTA_PAUSED;
usr.sbin/smtpd/control.c
584
if (env->sc_flags & SMTPD_SMTP_PAUSED) {
usr.sbin/smtpd/control.c
589
env->sc_flags |= SMTPD_SMTP_PAUSED;
usr.sbin/smtpd/control.c
606
if (!(env->sc_flags & SMTPD_MDA_PAUSED)) {
usr.sbin/smtpd/control.c
611
env->sc_flags &= ~SMTPD_MDA_PAUSED;
usr.sbin/smtpd/control.c
620
if (!(env->sc_flags & SMTPD_MTA_PAUSED)) {
usr.sbin/smtpd/control.c
625
env->sc_flags &= ~SMTPD_MTA_PAUSED;
usr.sbin/smtpd/control.c
634
if (!(env->sc_flags & SMTPD_SMTP_PAUSED)) {
usr.sbin/smtpd/control.c
639
env->sc_flags &= ~SMTPD_SMTP_PAUSED;
usr.sbin/smtpd/control.c
682
m_compose(p, IMSG_CTL_SHOW_STATUS, 0, 0, -1, &env->sc_flags,
usr.sbin/smtpd/control.c
683
sizeof(env->sc_flags));
usr.sbin/smtpd/lka.c
212
table = table_find(env, tablename);
usr.sbin/smtpd/lka.c
262
table = table_find(env, tablename);
usr.sbin/smtpd/lka.c
294
table_dump_all(env);
usr.sbin/smtpd/lka.c
297
table_open_all(env);
usr.sbin/smtpd/lka.c
336
table = table_find(env, imsg->data);
usr.sbin/smtpd/lka.c
732
table = table_find(env, tablename);
usr.sbin/smtpd/lka.c
781
table = table_find(env, tablename);
usr.sbin/smtpd/lka.c
824
table = table_find(env, tablename);
usr.sbin/smtpd/lka.c
854
table = table_find(env, tablename);
usr.sbin/smtpd/lka.c
882
table = table_find(env, tablename);
usr.sbin/smtpd/lka_filter.c
204
env->sc_admd != NULL ? env->sc_admd : env->sc_hostname);
usr.sbin/smtpd/lka_filter.c
367
while (dict_iter(env->sc_filters_dict, &iter, &name, (void **)&filter_config)) {
usr.sbin/smtpd/lka_filter.c
396
while (dict_iter(env->sc_filters_dict, &iter, &name, (void **)&filter_config)) {
usr.sbin/smtpd/lka_session.c
110
dsp = dict_get(env->sc_dispatchers, lks->rule->dispatcher);
usr.sbin/smtpd/lka_session.c
128
dsp = dict_get(env->sc_dispatchers, rule->dispatcher);
usr.sbin/smtpd/lka_session.c
281
if (env->sc_srs_key != NULL &&
usr.sbin/smtpd/lka_session.c
307
dsp = dict_xget(env->sc_dispatchers, rule->dispatcher);
usr.sbin/smtpd/lka_session.c
357
dsp = dict_xget(env->sc_dispatchers, rule->dispatcher);
usr.sbin/smtpd/lka_session.c
380
if ((tag = strchr(xn->u.user, *env->sc_subaddressing_delim)) != NULL) {
usr.sbin/smtpd/lka_session.c
385
userbase = table_find(env, dsp->u.local.table_userbase);
usr.sbin/smtpd/lka_session.c
447
dsp = dict_xget(env->sc_dispatchers, rule->dispatcher);
usr.sbin/smtpd/lka_session.c
459
dsp = dict_xget(env->sc_dispatchers, rule->dispatcher);
usr.sbin/smtpd/lka_session.c
481
dsp = dict_xget(env->sc_dispatchers, rule->dispatcher);
usr.sbin/smtpd/lka_session.c
518
dsp = dict_xget(env->sc_dispatchers, ep->dispatcher);
usr.sbin/smtpd/makemap.c
425
if (parse_config(env, cfgpath, 0))
usr.sbin/smtpd/makemap.c
428
table = table_find(env, "aliases");
usr.sbin/smtpd/makemap.c
84
if ((env = config_default()) == NULL)
usr.sbin/smtpd/mda.c
158
if (u->evpcount >= env->sc_mda_task_hiwat) {
usr.sbin/smtpd/mda.c
588
if (u->running >= env->sc_mda_max_user_session) {
usr.sbin/smtpd/mda.c
596
if (tree_count(&sessions) >= env->sc_mda_max_session) {
usr.sbin/smtpd/mda.c
605
if (u->evpcount == env->sc_mda_task_lowat) {
usr.sbin/smtpd/mda.c
616
m_add_int(p_queue, env->sc_mda_task_release);
usr.sbin/smtpd/mda.c
723
dsp = dict_xget(env->sc_dispatchers, evp->dispatcher);
usr.sbin/smtpd/mda_unpriv.c
76
mda_command_wrap = dict_get(env->sc_mda_wrappers,
usr.sbin/smtpd/mda_variables.c
353
if ((tag = strchr(buf, *env->sc_subaddressing_delim)) != NULL) {
usr.sbin/smtpd/mta.c
1806
dispatcher = dict_xget(env->sc_dispatchers, e->dispatcher);
usr.sbin/smtpd/mta.c
2665
if (tree_count(&hs->deferred) >= env->sc_mta_max_deferred)
usr.sbin/smtpd/mta.c
464
while (dict_iter(env->sc_dispatchers, &iter, &key, (void **)&dispatcher)) {
usr.sbin/smtpd/mta.c
489
ciphers = env->sc_tls_ciphers;
usr.sbin/smtpd/mta.c
505
pki = dict_get(env->sc_pki_dict, remote->pki);
usr.sbin/smtpd/mta.c
518
ca = dict_get(env->sc_ca_dict, remote->ca);
usr.sbin/smtpd/mta.c
697
dispatcher = dict_xget(env->sc_dispatchers, evp->dispatcher);
usr.sbin/smtpd/mta.c
949
relay->limits = dict_get(env->sc_limits_dict, relay->domain->name);
usr.sbin/smtpd/mta.c
951
relay->limits = dict_get(env->sc_limits_dict, "default");
usr.sbin/smtpd/mta.c
989
dispatcher = dict_xget(env->sc_dispatchers, evp->dispatcher);
usr.sbin/smtpd/mta_session.c
470
s->helo = xstrdup(env->sc_hostname);
usr.sbin/smtpd/mta_session.c
778
if (env->sc_srs_key != NULL &&
usr.sbin/smtpd/queue.c
621
env->sc_queue_flags |= QUEUE_EVPCACHE;
usr.sbin/smtpd/queue.c
622
env->sc_queue_evpcache_size = 1024;
usr.sbin/smtpd/queue.c
631
if (env->sc_queue_flags & QUEUE_COMPRESSION)
usr.sbin/smtpd/queue.c
634
if (env->sc_queue_key) {
usr.sbin/smtpd/queue.c
635
if (!crypto_setup(env->sc_queue_key, strlen(env->sc_queue_key)))
usr.sbin/smtpd/queue_backend.c
220
if (env->sc_queue_flags & QUEUE_COMPRESSION) {
usr.sbin/smtpd/queue_backend.c
241
if (env->sc_queue_flags & QUEUE_ENCRYPTION) {
usr.sbin/smtpd/queue_backend.c
300
if (env->sc_queue_flags & QUEUE_ENCRYPTION) {
usr.sbin/smtpd/queue_backend.c
323
if (env->sc_queue_flags & QUEUE_COMPRESSION) {
usr.sbin/smtpd/queue_backend.c
387
if (env->sc_queue_flags & QUEUE_COMPRESSION) {
usr.sbin/smtpd/queue_backend.c
395
if (env->sc_queue_flags & QUEUE_ENCRYPTION) {
usr.sbin/smtpd/queue_backend.c
423
if (env->sc_queue_flags & QUEUE_ENCRYPTION) {
usr.sbin/smtpd/queue_backend.c
431
if (env->sc_queue_flags & QUEUE_COMPRESSION) {
usr.sbin/smtpd/queue_backend.c
447
while (tree_count(&evpcache_tree) >= env->sc_queue_evpcache_size)
usr.sbin/smtpd/queue_backend.c
516
if (r && env->sc_queue_flags & QUEUE_EVPCACHE)
usr.sbin/smtpd/queue_backend.c
527
if (env->sc_queue_flags & QUEUE_EVPCACHE)
usr.sbin/smtpd/queue_backend.c
549
if ((env->sc_queue_flags & QUEUE_EVPCACHE) &&
usr.sbin/smtpd/queue_backend.c
571
if (env->sc_queue_flags & QUEUE_EVPCACHE) {
usr.sbin/smtpd/queue_backend.c
598
if (r && env->sc_queue_flags & QUEUE_EVPCACHE)
usr.sbin/smtpd/queue_backend.c
668
if (env->sc_queue_flags & QUEUE_EVPCACHE)
usr.sbin/smtpd/queue_backend.c
724
if (dict_get(env->sc_dispatchers, ep->dispatcher) == NULL)
usr.sbin/smtpd/ruleset.c
104
table = table_find(env, r->table_for);
usr.sbin/smtpd/ruleset.c
123
table = table_find(env, r->table_smtp_helo);
usr.sbin/smtpd/ruleset.c
158
table = table_find(env, r->table_smtp_auth);
usr.sbin/smtpd/ruleset.c
184
table = table_find(env, r->table_smtp_mail_from);
usr.sbin/smtpd/ruleset.c
207
table = table_find(env, r->table_smtp_rcpt_to);
usr.sbin/smtpd/ruleset.c
225
TAILQ_FOREACH(r, env->sc_rules, r_entry) {
usr.sbin/smtpd/ruleset.c
39
table = table_find(env, r->table_tag);
usr.sbin/smtpd/ruleset.c
85
table = table_find(env, r->table_from);
usr.sbin/smtpd/scheduler.c
192
if (env->sc_bounce_warn[i] == 0)
usr.sbin/smtpd/scheduler.c
194
timestamp = si.creation + env->sc_bounce_warn[i];
usr.sbin/smtpd/scheduler.c
200
req.bounce.delay = env->sc_bounce_warn[i];
usr.sbin/smtpd/scheduler.c
267
env->sc_flags |= SMTPD_MDA_PAUSED;
usr.sbin/smtpd/scheduler.c
272
env->sc_flags &= ~SMTPD_MDA_PAUSED;
usr.sbin/smtpd/scheduler.c
278
env->sc_flags |= SMTPD_MTA_PAUSED;
usr.sbin/smtpd/scheduler.c
283
env->sc_flags &= ~SMTPD_MTA_PAUSED;
usr.sbin/smtpd/scheduler.c
303
n = backend->messages(msgid, msgids, env->sc_scheduler_max_msg_batch_size);
usr.sbin/smtpd/scheduler.c
310
n = backend->envelopes(id, state, env->sc_scheduler_max_evp_batch_size);
usr.sbin/smtpd/scheduler.c
437
evpids = xcalloc(env->sc_scheduler_max_schedule, sizeof *evpids);
usr.sbin/smtpd/scheduler.c
438
types = xcalloc(env->sc_scheduler_max_schedule, sizeof *types);
usr.sbin/smtpd/scheduler.c
439
msgids = xcalloc(env->sc_scheduler_max_msg_batch_size, sizeof *msgids);
usr.sbin/smtpd/scheduler.c
440
state = xcalloc(env->sc_scheduler_max_evp_batch_size, sizeof *state);
usr.sbin/smtpd/scheduler.c
483
if (ninflight < env->sc_scheduler_max_inflight) {
usr.sbin/smtpd/scheduler.c
485
if (!(env->sc_flags & SMTPD_MDA_PAUSED))
usr.sbin/smtpd/scheduler.c
487
if (!(env->sc_flags & SMTPD_MTA_PAUSED))
usr.sbin/smtpd/scheduler.c
491
count = env->sc_scheduler_max_schedule;
usr.sbin/smtpd/scheduler_backend.c
44
env->sc_dispatcher_bounce :
usr.sbin/smtpd/scheduler_backend.c
45
dict_xget(env->sc_dispatchers, evp->dispatcher);
usr.sbin/smtpd/scheduler_backend.c
58
sched->ttl = disp->ttl ? disp->ttl : env->sc_ttl;
usr.sbin/smtpd/smtp.c
130
TAILQ_FOREACH(l, env->sc_listeners, entry) {
usr.sbin/smtpd/smtp.c
165
ciphers = env->sc_tls_ciphers;
usr.sbin/smtpd/smtp.c
206
ca = dict_get(env->sc_ca_dict, l->ca_name);
usr.sbin/smtpd/smtp.c
234
TAILQ_FOREACH(l, env->sc_listeners, entry) {
usr.sbin/smtpd/smtp.c
243
if (!(env->sc_flags & SMTPD_SMTP_PAUSED))
usr.sbin/smtpd/smtp.c
258
if (env->sc_flags & (SMTPD_SMTP_DISABLED|SMTPD_SMTP_PAUSED))
usr.sbin/smtpd/smtp.c
261
TAILQ_FOREACH(l, env->sc_listeners, entry)
usr.sbin/smtpd/smtp.c
270
if (env->sc_flags & (SMTPD_SMTP_DISABLED|SMTPD_SMTP_PAUSED))
usr.sbin/smtpd/smtp.c
273
TAILQ_FOREACH(l, env->sc_listeners, entry)
usr.sbin/smtpd/smtp.c
280
struct listener *listener = env->sc_sock_listener;
usr.sbin/smtpd/smtp.c
288
if (env->sc_flags & SMTPD_SMTP_PAUSED)
usr.sbin/smtpd/smtp.c
294
if ((smtp_session(listener, fd[0], &listener->ss, env->sc_hostname, NULL)) == -1) {
usr.sbin/smtpd/smtp.c
315
if (env->sc_flags & SMTPD_SMTP_PAUSED)
usr.sbin/smtpd/smtp.c
351
env->sc_flags |= SMTPD_SMTP_DISABLED;
usr.sbin/smtpd/smtp.c
372
if (env->sc_flags & SMTPD_SMTP_DISABLED) {
usr.sbin/smtpd/smtp.c
375
env->sc_flags &= ~SMTPD_SMTP_DISABLED;
usr.sbin/smtpd/smtp.c
94
env->sc_flags |= SMTPD_SMTP_PAUSED;
usr.sbin/smtpd/smtp.c
99
env->sc_flags &= ~SMTPD_SMTP_PAUSED;
usr.sbin/smtpd/smtp_session.c
1140
if (s->tx->datain > env->sc_maxsize)
usr.sbin/smtpd/smtp_session.c
1545
if (s->mailcount >= env->sc_session_max_mails) {
usr.sbin/smtpd/smtp_session.c
1579
if (s->tx->rcptcount >= env->sc_session_max_rcpt) {
usr.sbin/smtpd/smtp_session.c
1785
smtp_reply(s, "250-SIZE %zu", env->sc_maxsize);
usr.sbin/smtpd/smtp_session.c
2444
if (tx->rcptcount >= env->sc_session_max_rcpt) {
usr.sbin/smtpd/smtpctl.c
69
struct smtpd *env;
usr.sbin/smtpd/smtpd.c
1106
while (dict_iter(env->sc_pki_dict, &iter_dict, &k, (void **)&pki)) {
usr.sbin/smtpd/smtpd.c
1119
while (dict_iter(env->sc_ca_dict, &iter_dict, &k, (void **)&sca)) {
usr.sbin/smtpd/smtpd.c
1135
while (dict_iter(env->sc_pki_dict, &iter_dict, &k, (void **)&pki)) {
usr.sbin/smtpd/smtpd.c
122
struct smtpd *env = NULL;
usr.sbin/smtpd/smtpd.c
1284
while (dict_iter(env->sc_filters_dict, &iter, (const char **)&fn, (void **)&fc)) {
usr.sbin/smtpd/smtpd.c
1287
fcs = dict_xget(env->sc_filters_dict, fc->chain[i]);
usr.sbin/smtpd/smtpd.c
1295
while (dict_iter(env->sc_filters_dict, &iter, (const char **)&fn, (void **)&fc)) {
usr.sbin/smtpd/smtpd.c
1297
fp = dict_xget(env->sc_filter_processes_dict, fc->proc);
usr.sbin/smtpd/smtpd.c
1303
while (dict_iter(env->sc_filter_processes_dict, &iter, &name, (void **)&fp))
usr.sbin/smtpd/smtpd.c
1343
processor = dict_xget(env->sc_filter_processes_dict, name);
usr.sbin/smtpd/smtpd.c
1422
dsp = dict_xget(env->sc_dispatchers, deliver->dispatcher);
usr.sbin/smtpd/smtpd.c
262
processor = dict_xget(env->sc_filter_processes_dict, procname);
usr.sbin/smtpd/smtpd.c
493
env = conf;
usr.sbin/smtpd/smtpd.c
608
env->sc_opts |= opts;
usr.sbin/smtpd/smtpd.c
613
if (strlcpy(env->sc_conffile, conffile, PATH_MAX)
usr.sbin/smtpd/smtpd.c
617
if (env->sc_opts & SMTPD_OPT_NOACTION) {
usr.sbin/smtpd/smtpd.c
618
if (env->sc_queue_key &&
usr.sbin/smtpd/smtpd.c
619
crypto_setup(env->sc_queue_key,
usr.sbin/smtpd/smtpd.c
620
strlen(env->sc_queue_key)) == 0) {
usr.sbin/smtpd/smtpd.c
630
env->sc_flags |= flags;
usr.sbin/smtpd/smtpd.c
645
if (env->sc_hostname[0] == '\0')
usr.sbin/smtpd/smtpd.c
647
env->sc_uptime = time(NULL);
usr.sbin/smtpd/smtpd.c
652
if (env->sc_queue_flags & QUEUE_ENCRYPTION) {
usr.sbin/smtpd/smtpd.c
653
if (env->sc_queue_key == NULL) {
usr.sbin/smtpd/smtpd.c
660
env->sc_queue_key = strdup(password);
usr.sbin/smtpd/smtpd.c
662
if (env->sc_queue_key == NULL)
usr.sbin/smtpd/smtpd.c
670
if (strcasecmp(env->sc_queue_key, "stdin") == 0) {
usr.sbin/smtpd/smtpd.c
675
env->sc_queue_key = buf;
usr.sbin/smtpd/smtpd.c
717
if (env->sc_queue_key) {
usr.sbin/smtpd/smtpd.c
719
0, -1, env->sc_queue_key, strlen(env->sc_queue_key)
usr.sbin/smtpd/smtpd.c
752
env->sc_stat = stat_backend_lookup(backend_stat);
usr.sbin/smtpd/smtpd.c
753
if (env->sc_stat == NULL)
usr.sbin/smtpd/smtpd.c
777
if (env->sc_queue_flags & QUEUE_COMPRESSION)
usr.sbin/smtpd/smtpd.c
778
env->sc_comp = compress_backend_lookup("gzip");
usr.sbin/smtpd/smtpd.c
791
if (env->sc_bounce_warn[i] == 0)
usr.sbin/smtpd/smtpd.c
794
duration_to_text(env->sc_bounce_warn[i]));
usr.sbin/smtpd/smtpd.c
931
env->sc_queue_key = strdup(imsg.data);
usr.sbin/smtpd/smtpd.h
1014
extern struct smtpd *env;
usr.sbin/smtpd/srs.c
107
base64_encode_rfc3548(srs_hash(env->sc_srs_key, tmp), SHA_DIGEST_LENGTH,
usr.sbin/smtpd/srs.c
139
base64_encode_rfc3548(srs_hash(env->sc_srs_key, tmp), SHA_DIGEST_LENGTH,
usr.sbin/smtpd/srs.c
178
base64_encode_rfc3548(srs_hash(env->sc_srs_key, tmp + 5), SHA_DIGEST_LENGTH,
usr.sbin/smtpd/srs.c
216
base64_encode_rfc3548(srs_hash(env->sc_srs_key, rcpt+5), SHA_DIGEST_LENGTH,
usr.sbin/smtpd/srs.c
221
if (env->sc_srs_key_backup == NULL)
usr.sbin/smtpd/srs.c
223
base64_encode_rfc3548(srs_hash(env->sc_srs_key_backup, rcpt+5),
usr.sbin/smtpd/srs.c
284
base64_encode_rfc3548(srs_hash(env->sc_srs_key, rcpt+5), SHA_DIGEST_LENGTH,
usr.sbin/smtpd/srs.c
289
if (env->sc_srs_key_backup == NULL)
usr.sbin/smtpd/srs.c
291
base64_encode_rfc3548(srs_hash(env->sc_srs_key_backup, rcpt+5),
usr.sbin/smtpd/srs.c
61
if (! minrange(tref, t2, env->sc_srs_ttl, 1024) &&
usr.sbin/smtpd/stat_ramstat.c
57
ramstat_set("uptime", stat_timestamp(env->sc_uptime));
usr.sbin/smtpd/util.c
398
if (strchr(m2.user, *env->sc_subaddressing_delim) == NULL) {
usr.sbin/smtpd/util.c
400
p = strchr(m1.user, *env->sc_subaddressing_delim);
usr.sbin/snmpd/snmpd.c
104
snmpd_shutdown(env);
usr.sbin/snmpd/snmpd.c
131
struct snmpd *env;
usr.sbin/snmpd/snmpd.c
195
if ((env = parse_config(conffile, flags)) == NULL)
usr.sbin/snmpd/snmpd.c
198
ps = &env->sc_ps;
usr.sbin/snmpd/snmpd.c
199
ps->ps_env = env;
usr.sbin/snmpd/snmpd.c
200
snmpd_env = env;
usr.sbin/snmpd/snmpd.c
219
env->sc_engine_boots = 0;
usr.sbin/snmpd/snmpd.c
243
snmpd_backend(env);
usr.sbin/snmpd/snmpd.c
256
snmpd_shutdown(struct snmpd *env)
usr.sbin/snmpd/snmpd.c
258
proc_kill(&env->sc_ps);
usr.sbin/snmpd/snmpd.c
260
free(env);
usr.sbin/snmpd/snmpd.c
339
snmpd_backend(struct snmpd *env)
usr.sbin/snmpd/snmpd.c
352
if (env->sc_rtfilter) {
usr.sbin/snmpd/snmpd.c
356
if (env->sc_flags & SNMPD_F_VERBOSE)
usr.sbin/snmpd/snmpd.c
358
if (env->sc_flags & SNMPD_F_DEBUG)
usr.sbin/snmpd/snmpd.c
383
if (proc_compose_imsg(&env->sc_ps, PROC_SNMPE, -1,
usr.sbin/snmpd/snmpd.c
389
if (proc_compose(&env->sc_ps, PROC_SNMPE,
usr.sbin/snmpd/snmpd.c
53
struct snmpd *env = ps->ps_env;
usr.sbin/snmpd/snmpe.c
117
tohexstr(env->sc_engineid.value, env->sc_engineid.length));
usr.sbin/snmpd/snmpe.c
242
struct snmpd *env = snmpd_env;
usr.sbin/snmpd/snmpe.c
243
struct snmp_stats *stats = &env->sc_stats;
usr.sbin/snmpd/snmpe.c
302
if (MSG_SECLEVEL(msg) < env->sc_min_seclevel ||
usr.sbin/snmpd/snmpe.c
362
strcmp(env->sc_rdcommunity, msg->sm_community) != 0 &&
usr.sbin/snmpd/snmpe.c
363
strcmp(env->sc_rwcommunity, msg->sm_community) != 0) {
usr.sbin/snmpd/snmpe.c
377
strcmp(env->sc_rwcommunity, msg->sm_community) != 0) {
usr.sbin/snmpd/snmpe.c
378
if (strcmp(env->sc_rdcommunity, msg->sm_community) != 0)
usr.sbin/snmpd/snmpe.c
413
if (strcmp(env->sc_trcommunity, msg->sm_community) != 0) {
usr.sbin/snmpd/snmpe.c
71
struct snmpd *env = ps->ps_env;
usr.sbin/snmpd/snmpe.c
80
TAILQ_FOREACH(h, &env->sc_addresses, entry)
usr.sbin/snmpd/snmpe.c
90
struct snmpd *env = ps->ps_env;
usr.sbin/snmpd/snmpe.c
97
TAILQ_FOREACH(h, &env->sc_addresses, entry) {
usr.sbin/snmpd/traphandler.c
276
struct snmpd *env = ps->ps_env;
usr.sbin/snmpd/traphandler.c
297
log_init((env->sc_flags & SNMPD_F_DEBUG) ? 1 : 0, LOG_DAEMON);
usr.sbin/unbound/cachedb/cachedb.c
1017
cachedb_is_enabled(struct module_stack* mods, struct module_env* env)
usr.sbin/unbound/cachedb/cachedb.c
1023
ie = (struct cachedb_env*)env->modinfo[id];
usr.sbin/unbound/cachedb/cachedb.c
1031
cachedb_msg_remove_qinfo(qstate->env, &qstate->qinfo);
usr.sbin/unbound/cachedb/cachedb.c
1034
void cachedb_msg_remove_qinfo(struct module_env* env, struct query_info* qinfo)
usr.sbin/unbound/cachedb/cachedb.c
1037
int id = modstack_find(env->modstack, "cachedb");
usr.sbin/unbound/cachedb/cachedb.c
1038
struct cachedb_env* ie = (struct cachedb_env*)env->modinfo[id];
usr.sbin/unbound/cachedb/cachedb.c
1041
calc_hash(qinfo, env, key, sizeof(key));
usr.sbin/unbound/cachedb/cachedb.c
1042
sldns_buffer_clear(env->scratch_buffer);
usr.sbin/unbound/cachedb/cachedb.c
1043
sldns_buffer_write_u32(env->scratch_buffer, 0);
usr.sbin/unbound/cachedb/cachedb.c
1044
sldns_buffer_flip(env->scratch_buffer);
usr.sbin/unbound/cachedb/cachedb.c
1047
(*ie->backend->store)(env, ie, key,
usr.sbin/unbound/cachedb/cachedb.c
1048
sldns_buffer_begin(env->scratch_buffer),
usr.sbin/unbound/cachedb/cachedb.c
1049
sldns_buffer_limit(env->scratch_buffer),
usr.sbin/unbound/cachedb/cachedb.c
105
testframe_init(struct module_env* env, struct cachedb_env* cachedb_env)
usr.sbin/unbound/cachedb/cachedb.c
120
0 /* no aggregation */, env)) {
usr.sbin/unbound/cachedb/cachedb.c
131
testframe_deinit(struct module_env* env, struct cachedb_env* cachedb_env)
usr.sbin/unbound/cachedb/cachedb.c
135
(void)env;
usr.sbin/unbound/cachedb/cachedb.c
146
testframe_lookup(struct module_env* env, struct cachedb_env* cachedb_env,
usr.sbin/unbound/cachedb/cachedb.c
151
(void)env;
usr.sbin/unbound/cachedb/cachedb.c
173
testframe_store(struct module_env* env, struct cachedb_env* cachedb_env,
usr.sbin/unbound/cachedb/cachedb.c
178
(void)env;
usr.sbin/unbound/cachedb/cachedb.c
245
cachedb_init(struct module_env* env, int id)
usr.sbin/unbound/cachedb/cachedb.c
253
env->modinfo[id] = (void*)cachedb_env;
usr.sbin/unbound/cachedb/cachedb.c
254
if(!cachedb_apply_cfg(cachedb_env, env->cfg)) {
usr.sbin/unbound/cachedb/cachedb.c
257
env->modinfo[id] = NULL;
usr.sbin/unbound/cachedb/cachedb.c
263
if(!(*cachedb_env->backend->init)(env, cachedb_env)) {
usr.sbin/unbound/cachedb/cachedb.c
267
env->modinfo[id] = NULL;
usr.sbin/unbound/cachedb/cachedb.c
275
cachedb_deinit(struct module_env* env, int id)
usr.sbin/unbound/cachedb/cachedb.c
278
if(!env || !env->modinfo[id])
usr.sbin/unbound/cachedb/cachedb.c
280
cachedb_env = (struct cachedb_env*)env->modinfo[id];
usr.sbin/unbound/cachedb/cachedb.c
282
(*cachedb_env->backend->deinit)(env, cachedb_env);
usr.sbin/unbound/cachedb/cachedb.c
285
env->modinfo[id] = NULL;
usr.sbin/unbound/cachedb/cachedb.c
332
calc_hash(struct query_info* qinfo, struct module_env* env, char* buf,
usr.sbin/unbound/cachedb/cachedb.c
339
const char* secret = env->cfg->cachedb_secret;
usr.sbin/unbound/cachedb/cachedb.c
410
if (qstate->env->cfg->ede && qstate->return_msg->rep->reason_bogus != LDNS_EDE_NONE) {
usr.sbin/unbound/cachedb/cachedb.c
411
edns_opt_list_append_ede(&edns.opt_list_out, qstate->env->scratch,
usr.sbin/unbound/cachedb/cachedb.c
421
buf, 0, 1, qstate->env->scratch, 65535, &edns, 1, 0))
usr.sbin/unbound/cachedb/cachedb.c
428
timestamp = (uint64_t)*qstate->env->now;
usr.sbin/unbound/cachedb/cachedb.c
460
if(TTL_IS_EXPIRED((time_t)expiry, *qstate->env->now) &&
usr.sbin/unbound/cachedb/cachedb.c
461
(!qstate->env->cfg->serve_expired ||
usr.sbin/unbound/cachedb/cachedb.c
463
*qstate->env->now - (time_t)expiry > SERVE_EXPIRED_TTL)))
usr.sbin/unbound/cachedb/cachedb.c
560
regional_free_all(qstate->env->scratch);
usr.sbin/unbound/cachedb/cachedb.c
561
prs = (struct msg_parse*)regional_alloc(qstate->env->scratch,
usr.sbin/unbound/cachedb/cachedb.c
568
if(parse_packet(buf, prs, qstate->env->scratch) != LDNS_RCODE_NOERROR) {
usr.sbin/unbound/cachedb/cachedb.c
572
if(parse_extract_edns_from_response_msg(prs, &edns, qstate->env->scratch) !=
usr.sbin/unbound/cachedb/cachedb.c
584
if(qstate->env->cfg->ede &&
usr.sbin/unbound/cachedb/cachedb.c
604
if(*qstate->env->now <= (time_t)timestamp) {
usr.sbin/unbound/cachedb/cachedb.c
608
adjust = *qstate->env->now - (time_t)timestamp;
usr.sbin/unbound/cachedb/cachedb.c
609
if(TTL_IS_EXPIRED((time_t)expiry, *qstate->env->now)) {
usr.sbin/unbound/cachedb/cachedb.c
612
if(!qstate->env->cfg->serve_expired ||
usr.sbin/unbound/cachedb/cachedb.c
627
if(qstate->env->cfg->aggressive_nsec) {
usr.sbin/unbound/cachedb/cachedb.c
634
if(*msg_expired && !qstate->env->cfg->serve_expired_client_timeout) {
usr.sbin/unbound/cachedb/cachedb.c
650
calc_hash(&qstate->qinfo, qstate->env, key, sizeof(key));
usr.sbin/unbound/cachedb/cachedb.c
653
if( !(*ie->backend->lookup)(qstate->env, ie, key,
usr.sbin/unbound/cachedb/cachedb.c
654
qstate->env->scratch_buffer)) {
usr.sbin/unbound/cachedb/cachedb.c
659
if( !good_expiry_and_qinfo(qstate, qstate->env->scratch_buffer) ) {
usr.sbin/unbound/cachedb/cachedb.c
664
if( !parse_data(qstate, qstate->env->scratch_buffer, msg_expired,
usr.sbin/unbound/cachedb/cachedb.c
678
calc_hash(&qstate->qinfo, qstate->env, key, sizeof(key));
usr.sbin/unbound/cachedb/cachedb.c
681
if(!prep_data(qstate, qstate->env->scratch_buffer))
usr.sbin/unbound/cachedb/cachedb.c
685
(*ie->backend->store)(qstate->env, ie, key,
usr.sbin/unbound/cachedb/cachedb.c
686
sldns_buffer_begin(qstate->env->scratch_buffer),
usr.sbin/unbound/cachedb/cachedb.c
687
sldns_buffer_limit(qstate->env->scratch_buffer),
usr.sbin/unbound/cachedb/cachedb.c
708
msg = dns_cache_lookup(qstate->env, qstate->qinfo.qname,
usr.sbin/unbound/cachedb/cachedb.c
711
qstate->region, qstate->env->scratch,
usr.sbin/unbound/cachedb/cachedb.c
715
if(!msg && qstate->env->neg_cache &&
usr.sbin/unbound/cachedb/cachedb.c
716
iter_qname_indicates_dnssec(qstate->env, &qstate->qinfo)) {
usr.sbin/unbound/cachedb/cachedb.c
719
msg = val_neg_getmsg(qstate->env->neg_cache, &qstate->qinfo,
usr.sbin/unbound/cachedb/cachedb.c
720
qstate->region, qstate->env->rrset_cache,
usr.sbin/unbound/cachedb/cachedb.c
721
qstate->env->scratch_buffer,
usr.sbin/unbound/cachedb/cachedb.c
722
*qstate->env->now, 1/*add SOA*/, NULL,
usr.sbin/unbound/cachedb/cachedb.c
723
qstate->env->cfg);
usr.sbin/unbound/cachedb/cachedb.c
741
int serve_expired = qstate->env->cfg->serve_expired;
usr.sbin/unbound/cachedb/cachedb.c
759
if(qstate->env->cfg->cachedb_check_when_serve_expired)
usr.sbin/unbound/cachedb/cachedb.c
762
(void)dns_cache_store(qstate->env, &qstate->qinfo,
usr.sbin/unbound/cachedb/cachedb.c
767
if(qstate->env->cfg->serve_expired_client_timeout) {
usr.sbin/unbound/cachedb/cachedb.c
850
if(qstate->env->cfg->serve_expired && msg_expired) {
usr.sbin/unbound/cachedb/cachedb.c
874
qstate->env->cfg->cachedb_check_when_serve_expired &&
usr.sbin/unbound/cachedb/cachedb.c
875
!qstate->env->cfg->serve_expired_client_timeout) {
usr.sbin/unbound/cachedb/cachedb.c
907
if(qstate->env->cfg->cachedb_no_store) {
usr.sbin/unbound/cachedb/cachedb.c
924
struct cachedb_env* ie = (struct cachedb_env*)qstate->env->modinfo[id];
usr.sbin/unbound/cachedb/cachedb.c
993
cachedb_get_mem(struct module_env* env, int id)
usr.sbin/unbound/cachedb/cachedb.c
995
struct cachedb_env* ie = (struct cachedb_env*)env->modinfo[id];
usr.sbin/unbound/cachedb/cachedb.h
106
size_t cachedb_get_mem(struct module_env* env, int id);
usr.sbin/unbound/cachedb/cachedb.h
120
int cachedb_is_enabled(struct module_stack* mods, struct module_env* env);
usr.sbin/unbound/cachedb/cachedb.h
135
void cachedb_msg_remove_qinfo(struct module_env* env,
usr.sbin/unbound/cachedb/cachedb.h
94
int cachedb_init(struct module_env* env, int id);
usr.sbin/unbound/cachedb/cachedb.h
96
void cachedb_deinit(struct module_env* env, int id);
usr.sbin/unbound/cachedb/redis.c
258
redis_init(struct module_env* env, struct cachedb_env* cachedb_env)
usr.sbin/unbound/cachedb/redis.c
277
moddata->numctxs = env->cfg->num_threads;
usr.sbin/unbound/cachedb/redis.c
281
moddata->server_host = env->cfg->redis_server_host;
usr.sbin/unbound/cachedb/redis.c
282
moddata->replica_server_host = env->cfg->redis_replica_server_host;
usr.sbin/unbound/cachedb/redis.c
284
moddata->server_port = env->cfg->redis_server_port;
usr.sbin/unbound/cachedb/redis.c
285
moddata->replica_server_port = env->cfg->redis_replica_server_port;
usr.sbin/unbound/cachedb/redis.c
287
moddata->server_path = env->cfg->redis_server_path;
usr.sbin/unbound/cachedb/redis.c
288
moddata->replica_server_path = env->cfg->redis_replica_server_path;
usr.sbin/unbound/cachedb/redis.c
290
moddata->server_password = env->cfg->redis_server_password;
usr.sbin/unbound/cachedb/redis.c
291
moddata->replica_server_password = env->cfg->redis_replica_server_password;
usr.sbin/unbound/cachedb/redis.c
294
env->cfg->redis_timeout,
usr.sbin/unbound/cachedb/redis.c
295
env->cfg->redis_command_timeout);
usr.sbin/unbound/cachedb/redis.c
297
env->cfg->redis_replica_timeout,
usr.sbin/unbound/cachedb/redis.c
298
env->cfg->redis_replica_command_timeout);
usr.sbin/unbound/cachedb/redis.c
300
env->cfg->redis_timeout,
usr.sbin/unbound/cachedb/redis.c
301
env->cfg->redis_connect_timeout);
usr.sbin/unbound/cachedb/redis.c
303
env->cfg->redis_replica_timeout,
usr.sbin/unbound/cachedb/redis.c
304
env->cfg->redis_replica_connect_timeout);
usr.sbin/unbound/cachedb/redis.c
308
moddata->logical_db = env->cfg->redis_logical_db;
usr.sbin/unbound/cachedb/redis.c
309
moddata->replica_logical_db = env->cfg->redis_replica_logical_db;
usr.sbin/unbound/cachedb/redis.c
311
moddata->ctxs = calloc(env->cfg->num_threads, sizeof(redisContext*));
usr.sbin/unbound/cachedb/redis.c
319
moddata->replica_ctxs = calloc(env->cfg->num_threads, sizeof(redisContext*));
usr.sbin/unbound/cachedb/redis.c
338
env->now_tv,
usr.sbin/unbound/cachedb/redis.c
362
env->now_tv,
usr.sbin/unbound/cachedb/redis.c
374
if(env->cfg->redis_expire_records &&
usr.sbin/unbound/cachedb/redis.c
375
moddata->ctxs[env->alloc->thread_num] != NULL) {
usr.sbin/unbound/cachedb/redis.c
379
rep = redis_command(env, cachedb_env,
usr.sbin/unbound/cachedb/redis.c
409
redis_deinit(struct module_env* env, struct cachedb_env* cachedb_env)
usr.sbin/unbound/cachedb/redis.c
413
(void)env;
usr.sbin/unbound/cachedb/redis.c
432
redis_command(struct module_env* env, struct cachedb_env* cachedb_env,
usr.sbin/unbound/cachedb/redis.c
445
log_assert(env->alloc->thread_num < d->numctxs);
usr.sbin/unbound/cachedb/redis.c
450
ctx = ctx_selector[env->alloc->thread_num];
usr.sbin/unbound/cachedb/redis.c
469
env->now_tv,
usr.sbin/unbound/cachedb/redis.c
484
env->now_tv,
usr.sbin/unbound/cachedb/redis.c
487
ctx_selector[env->alloc->thread_num] = ctx;
usr.sbin/unbound/cachedb/redis.c
499
ctx_selector[env->alloc->thread_num] = NULL;
usr.sbin/unbound/cachedb/redis.c
513
redis_lookup(struct module_env* env, struct cachedb_env* cachedb_env,
usr.sbin/unbound/cachedb/redis.c
536
rep = redis_command(env, cachedb_env, cmdbuf, NULL, 0, 0);
usr.sbin/unbound/cachedb/redis.c
568
redis_store(struct module_env* env, struct cachedb_env* cachedb_env,
usr.sbin/unbound/cachedb/redis.c
576
env->cfg->redis_expire_records &&
usr.sbin/unbound/cachedb/redis.c
577
(!env->cfg->serve_expired || env->cfg->serve_expired_ttl > 0));
usr.sbin/unbound/cachedb/redis.c
606
ttl += env->cfg->serve_expired_ttl;
usr.sbin/unbound/cachedb/redis.c
620
rep = redis_command(env, cachedb_env, cmdbuf, data, data_len, 1);
usr.sbin/unbound/daemon/cachedump.c
1006
(worker->env.cfg->do_ip4 && worker->back->num_ip4 != 0),
usr.sbin/unbound/daemon/cachedump.c
1007
(worker->env.cfg->do_ip6 && worker->back->num_ip6 != 0),
usr.sbin/unbound/daemon/cachedump.c
1008
worker->env.cfg->do_nat64)) {
usr.sbin/unbound/daemon/cachedump.c
1029
stub = hints_lookup_stub(worker->env.hints, nm, qinfo.qclass,
usr.sbin/unbound/daemon/cachedump.c
1035
lock_rw_unlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/cachedump.c
1041
lock_rw_unlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/cachedump.c
1047
lock_rw_unlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/cachedump.c
269
*dump_info->worker->env.now);
usr.sbin/unbound/daemon/cachedump.c
277
struct rrset_cache* r = worker->env.rrset_cache;
usr.sbin/unbound/daemon/cachedump.c
402
dump_msg(txt, k, d, *dump_info->worker->env.now);
usr.sbin/unbound/daemon/cachedump.c
413
if(!dump_slabhash(worker->env.msg_cache, &dump_msg_entry, ssl,
usr.sbin/unbound/daemon/cachedump.c
557
(void)rrset_cache_update(worker->env.rrset_cache, &ref,
usr.sbin/unbound/daemon/cachedump.c
558
worker->alloc, *worker->env.now);
usr.sbin/unbound/daemon/cachedump.c
611
d->ttl = (time_t)ttl + *worker->env.now;
usr.sbin/unbound/daemon/cachedump.c
627
&go_on, *worker->env.now)) {
usr.sbin/unbound/daemon/cachedump.c
634
&go_on, *worker->env.now)) {
usr.sbin/unbound/daemon/cachedump.c
651
sldns_buffer* buf = worker->env.scratch_buffer;
usr.sbin/unbound/daemon/cachedump.c
732
k = rrset_cache_lookup(worker->env.rrset_cache, qinfo.qname,
usr.sbin/unbound/daemon/cachedump.c
734
(uint32_t)flags, *worker->env.now, 0);
usr.sbin/unbound/daemon/cachedump.c
742
*rrset = packed_rrset_copy_region(k, region, *worker->env.now);
usr.sbin/unbound/daemon/cachedump.c
817
if(!dns_cache_store(&worker->env, &qinf, &rep, 0, 0, 0, NULL, flags,
usr.sbin/unbound/daemon/cachedump.c
818
*worker->env.now, 1)) {
usr.sbin/unbound/daemon/cachedump.c
829
sldns_buffer* buf = worker->env.scratch_buffer;
usr.sbin/unbound/daemon/cachedump.c
846
return read_fixed(ssl, worker->env.scratch_buffer, "EOF");
usr.sbin/unbound/daemon/cachedump.c
870
entry_ttl = infra_get_host_rto(worker->env.infra_cache,
usr.sbin/unbound/daemon/cachedump.c
872
&ri, &delay, *worker->env.now, &tA, &tAAAA, &tother);
usr.sbin/unbound/daemon/cachedump.c
888
if(!infra_get_lame_rtt(worker->env.infra_cache,
usr.sbin/unbound/daemon/cachedump.c
891
*worker->env.now)) {
usr.sbin/unbound/daemon/cachedump.c
907
if(infra_host(worker->env.infra_cache, &a->addr, a->addrlen,
usr.sbin/unbound/daemon/cachedump.c
908
dp->name, dp->namelen, *worker->env.now, &edns_vs,
usr.sbin/unbound/daemon/cachedump.c
984
dp = forwards_lookup(worker->env.fwds, nm, qinfo.qclass, nolock);
usr.sbin/unbound/daemon/cachedump.c
987
lock_rw_unlock(&worker->env.fwds->lock);
usr.sbin/unbound/daemon/cachedump.c
992
lock_rw_unlock(&worker->env.fwds->lock);
usr.sbin/unbound/daemon/cachedump.c
997
dp = dns_cache_find_delegation(&worker->env, nm, nmlen,
usr.sbin/unbound/daemon/cachedump.c
999
*worker->env.now, 0, NULL, 0);
usr.sbin/unbound/daemon/daemon.c
1007
if(!(daemon->env->views = views_create()))
usr.sbin/unbound/daemon/daemon.c
1010
if(!views_apply_cfg(daemon->env->views, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
1013
if(!acl_list_apply_cfg(daemon->acl, daemon->cfg, daemon->env->views))
usr.sbin/unbound/daemon/daemon.c
1016
daemon->env->views))
usr.sbin/unbound/daemon/daemon.c
1044
if(!(daemon->env->fwds = forwards_create()) ||
usr.sbin/unbound/daemon/daemon.c
1045
!forwards_apply_cfg(daemon->env->fwds, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
1047
if(!(daemon->env->hints = hints_create()) ||
usr.sbin/unbound/daemon/daemon.c
1048
!hints_apply_cfg(daemon->env->hints, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
1052
if(!(daemon->env->respip_set = respip_set_create()))
usr.sbin/unbound/daemon/daemon.c
1054
if(!respip_global_apply_cfg(daemon->env->respip_set, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
1056
if(!respip_views_apply_cfg(daemon->env->views, daemon->cfg,
usr.sbin/unbound/daemon/daemon.c
1060
daemon->env->respip_set) || have_view_respip_cfg;
usr.sbin/unbound/daemon/daemon.c
1066
if(!auth_zones_apply_cfg(daemon->env->auth_zones, daemon->cfg, 1,
usr.sbin/unbound/daemon/daemon.c
1067
&daemon->use_rpz, daemon->env, &daemon->mods))
usr.sbin/unbound/daemon/daemon.c
1071
if(!edns_strings_apply_cfg(daemon->env->edns_strings, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
1075
daemon->env->cachedb_enabled = cachedb_is_enabled(&daemon->mods,
usr.sbin/unbound/daemon/daemon.c
1076
daemon->env);
usr.sbin/unbound/daemon/daemon.c
1176
slabhash_clear(&daemon->env->rrset_cache->table);
usr.sbin/unbound/daemon/daemon.c
1177
slabhash_clear(daemon->env->msg_cache);
usr.sbin/unbound/daemon/daemon.c
1180
forwards_delete(daemon->env->fwds);
usr.sbin/unbound/daemon/daemon.c
1181
daemon->env->fwds = NULL;
usr.sbin/unbound/daemon/daemon.c
1182
hints_delete(daemon->env->hints);
usr.sbin/unbound/daemon/daemon.c
1183
daemon->env->hints = NULL;
usr.sbin/unbound/daemon/daemon.c
1186
respip_set_delete(daemon->env->respip_set);
usr.sbin/unbound/daemon/daemon.c
1187
daemon->env->respip_set = NULL;
usr.sbin/unbound/daemon/daemon.c
1188
views_delete(daemon->env->views);
usr.sbin/unbound/daemon/daemon.c
1189
daemon->env->views = NULL;
usr.sbin/unbound/daemon/daemon.c
1190
if(daemon->env->auth_zones)
usr.sbin/unbound/daemon/daemon.c
1191
auth_zones_cleanup(daemon->env->auth_zones);
usr.sbin/unbound/daemon/daemon.c
1234
modstack_call_deinit(&daemon->mods, daemon->env);
usr.sbin/unbound/daemon/daemon.c
1235
modstack_call_destartup(&daemon->mods, daemon->env);
usr.sbin/unbound/daemon/daemon.c
1242
if(daemon->env) {
usr.sbin/unbound/daemon/daemon.c
1243
slabhash_delete(daemon->env->msg_cache);
usr.sbin/unbound/daemon/daemon.c
1244
rrset_cache_delete(daemon->env->rrset_cache);
usr.sbin/unbound/daemon/daemon.c
1245
infra_delete(daemon->env->infra_cache);
usr.sbin/unbound/daemon/daemon.c
1246
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
1247
edns_strings_delete(daemon->env->edns_strings);
usr.sbin/unbound/daemon/daemon.c
1248
auth_zones_delete(daemon->env->auth_zones);
usr.sbin/unbound/daemon/daemon.c
1260
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
1338
!slabhash_is_size(daemon->env->msg_cache, cfg->msg_cache_size,
usr.sbin/unbound/daemon/daemon.c
1340
!slabhash_is_size(&daemon->env->rrset_cache->table,
usr.sbin/unbound/daemon/daemon.c
1344
slabhash_clear(&daemon->env->rrset_cache->table);
usr.sbin/unbound/daemon/daemon.c
1345
slabhash_clear(daemon->env->msg_cache);
usr.sbin/unbound/daemon/daemon.c
1349
if(!slabhash_is_size(daemon->env->msg_cache, cfg->msg_cache_size,
usr.sbin/unbound/daemon/daemon.c
1351
slabhash_delete(daemon->env->msg_cache);
usr.sbin/unbound/daemon/daemon.c
1352
daemon->env->msg_cache = slabhash_create(cfg->msg_cache_slabs,
usr.sbin/unbound/daemon/daemon.c
1356
if(!daemon->env->msg_cache) {
usr.sbin/unbound/daemon/daemon.c
1360
if((daemon->env->rrset_cache = rrset_cache_adjust(
usr.sbin/unbound/daemon/daemon.c
1361
daemon->env->rrset_cache, cfg, &daemon->superalloc)) == 0)
usr.sbin/unbound/daemon/daemon.c
1363
if((daemon->env->infra_cache = infra_adjust(daemon->env->infra_cache,
usr.sbin/unbound/daemon/daemon.c
521
if(!(daemon->env = (struct module_env*)calloc(1,
usr.sbin/unbound/daemon/daemon.c
522
sizeof(*daemon->env)))) {
usr.sbin/unbound/daemon/daemon.c
526
daemon->env->modstack = &daemon->mods;
usr.sbin/unbound/daemon/daemon.c
528
if(!edns_known_options_init(daemon->env)) {
usr.sbin/unbound/daemon/daemon.c
529
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
536
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
537
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
544
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
545
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
553
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
554
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
562
if((daemon->env->auth_zones = auth_zones_create()) == 0) {
usr.sbin/unbound/daemon/daemon.c
566
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
567
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
571
if(!(daemon->env->edns_strings = edns_strings_create())) {
usr.sbin/unbound/daemon/daemon.c
572
auth_zones_delete(daemon->env->auth_zones);
usr.sbin/unbound/daemon/daemon.c
576
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
577
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
707
daemon->env->cfg = daemon->cfg;
usr.sbin/unbound/daemon/daemon.c
708
daemon->env->alloc = &daemon->superalloc;
usr.sbin/unbound/daemon/daemon.c
709
daemon->env->worker = NULL;
usr.sbin/unbound/daemon/daemon.c
711
daemon->env)) {
usr.sbin/unbound/daemon/daemon.c
723
daemon->env->cfg = daemon->cfg;
usr.sbin/unbound/daemon/daemon.c
724
daemon->env->alloc = &daemon->superalloc;
usr.sbin/unbound/daemon/daemon.c
725
daemon->env->worker = NULL;
usr.sbin/unbound/daemon/daemon.c
727
modstack_call_deinit(&daemon->mods, daemon->env);
usr.sbin/unbound/daemon/daemon.c
729
daemon->env->need_to_validate = 0; /* set by module init below */
usr.sbin/unbound/daemon/daemon.c
731
daemon->env)) {
usr.sbin/unbound/daemon/daemon.c
735
log_edns_known_options(VERB_ALGO, daemon->env);
usr.sbin/unbound/daemon/daemon.h
140
struct module_env* env;
usr.sbin/unbound/daemon/remote.c
1002
struct timeval now = *worker->env.now_tv;
usr.sbin/unbound/daemon/remote.c
1596
v = views_find_view(worker->env.views, arg, 1 /* get write lock*/);
usr.sbin/unbound/daemon/remote.c
1628
v = views_find_view(worker->env.views, arg, 1 /* get write lock*/);
usr.sbin/unbound/daemon/remote.c
1650
v = views_find_view(worker->env.views, arg, 1 /* get write lock*/);
usr.sbin/unbound/daemon/remote.c
1683
v = views_find_view(worker->env.views, arg, 1 /* get write lock*/);
usr.sbin/unbound/daemon/remote.c
1732
v = views_find_view(worker->env.views, arg, 1 /* get write lock*/);
usr.sbin/unbound/daemon/remote.c
1755
v = views_find_view(worker->env.views, arg, 1 /* get write lock*/);
usr.sbin/unbound/daemon/remote.c
1840
*inf->worker->env.now)) {
usr.sbin/unbound/daemon/remote.c
1846
s, cl, tp, (long long)(ttl-*inf->worker->env.now))) {
usr.sbin/unbound/daemon/remote.c
1854
(long long)(d->ttl-*inf->worker->env.now),
usr.sbin/unbound/daemon/remote.c
1867
*inf->worker->env.now, s, sizeof(s))) {
usr.sbin/unbound/daemon/remote.c
1944
addrtree_traverse(d->tree4, 0, *inf->worker->env.now, &k->key,
usr.sbin/unbound/daemon/remote.c
1948
addrtree_traverse(d->tree6, 1, *inf->worker->env.now, &k->key,
usr.sbin/unbound/daemon/remote.c
1960
if(*inf->worker->env.now < d->ttl &&
usr.sbin/unbound/daemon/remote.c
1966
if(!packed_rr_to_string(k, i, *inf->worker->env.now,
usr.sbin/unbound/daemon/remote.c
1983
if(*inf->worker->env.now < d->ttl &&
usr.sbin/unbound/daemon/remote.c
2003
*inf->worker->env.now)) {
usr.sbin/unbound/daemon/remote.c
2011
(long long)(d->ttl-*inf->worker->env.now),
usr.sbin/unbound/daemon/remote.c
2024
*inf->worker->env.now, s, sizeof(s))) {
usr.sbin/unbound/daemon/remote.c
2053
m = modstack_find(worker->env.modstack, "subnetcache");
usr.sbin/unbound/daemon/remote.c
2054
if(m != -1) sn_env = (struct subnet_env*)worker->env.modinfo[m];
usr.sbin/unbound/daemon/remote.c
2063
slabhash_traverse(&worker->env.rrset_cache->table, 0,
usr.sbin/unbound/daemon/remote.c
2065
slabhash_traverse(worker->env.msg_cache, 0, &cache_lookup_msg, &inf);
usr.sbin/unbound/daemon/remote.c
2137
rrset_cache_remove(worker->env.rrset_cache, nm, nmlen, t, c, 0);
usr.sbin/unbound/daemon/remote.c
2139
rrset_cache_remove(worker->env.rrset_cache, nm, nmlen, t, c,
usr.sbin/unbound/daemon/remote.c
2147
slabhash_remove(worker->env.msg_cache, h, &k);
usr.sbin/unbound/daemon/remote.c
2151
slabhash_remove(worker->env.msg_cache, h, &k);
usr.sbin/unbound/daemon/remote.c
2154
if(remcachedb && worker->env.cachedb_enabled)
usr.sbin/unbound/daemon/remote.c
2155
cachedb_msg_remove_qinfo(&worker->env, &k);
usr.sbin/unbound/daemon/remote.c
2271
slabhash_clear(worker->env.infra_cache->hosts);
usr.sbin/unbound/daemon/remote.c
2285
inf.expired = *worker->env.now;
usr.sbin/unbound/daemon/remote.c
2293
slabhash_traverse(worker->env.infra_cache->hosts, 1, &infra_del_host,
usr.sbin/unbound/daemon/remote.c
2302
mesh_delete_all(worker->env.mesh);
usr.sbin/unbound/daemon/remote.c
2339
if(inf->remcachedb && inf->worker->env.cachedb_enabled)
usr.sbin/unbound/daemon/remote.c
2340
cachedb_msg_remove_qinfo(&inf->worker->env, &k->key);
usr.sbin/unbound/daemon/remote.c
2380
inf.expired = *worker->env.now;
usr.sbin/unbound/daemon/remote.c
2386
slabhash_traverse(&worker->env.rrset_cache->table, 1,
usr.sbin/unbound/daemon/remote.c
2389
slabhash_traverse(worker->env.msg_cache, 1, &zone_del_msg, &inf);
usr.sbin/unbound/daemon/remote.c
2392
if(worker->env.key_cache) {
usr.sbin/unbound/daemon/remote.c
2393
slabhash_traverse(worker->env.key_cache->slab, 1,
usr.sbin/unbound/daemon/remote.c
2430
if(inf->remcachedb && inf->worker->env.cachedb_enabled)
usr.sbin/unbound/daemon/remote.c
2431
cachedb_msg_remove_qinfo(&inf->worker->env,
usr.sbin/unbound/daemon/remote.c
2460
inf.expired = *worker->env.now;
usr.sbin/unbound/daemon/remote.c
2466
slabhash_traverse(&worker->env.rrset_cache->table, 1,
usr.sbin/unbound/daemon/remote.c
2469
slabhash_traverse(worker->env.msg_cache, 1, &bogus_del_msg, &inf);
usr.sbin/unbound/daemon/remote.c
2472
if(worker->env.key_cache) {
usr.sbin/unbound/daemon/remote.c
2473
slabhash_traverse(worker->env.key_cache->slab, 1,
usr.sbin/unbound/daemon/remote.c
2516
if(inf->remcachedb && inf->worker->env.cachedb_enabled)
usr.sbin/unbound/daemon/remote.c
2517
cachedb_msg_remove_qinfo(&inf->worker->env,
usr.sbin/unbound/daemon/remote.c
2548
inf.expired = *worker->env.now;
usr.sbin/unbound/daemon/remote.c
2554
slabhash_traverse(&worker->env.rrset_cache->table, 1,
usr.sbin/unbound/daemon/remote.c
2557
slabhash_traverse(worker->env.msg_cache, 1, &negative_del_msg, &inf);
usr.sbin/unbound/daemon/remote.c
2560
if(worker->env.key_cache) {
usr.sbin/unbound/daemon/remote.c
2561
slabhash_traverse(worker->env.key_cache->slab, 1,
usr.sbin/unbound/daemon/remote.c
2720
struct iter_forwards* fwd = worker->env.fwds;
usr.sbin/unbound/daemon/remote.c
2734
mesh_delete_all(worker->env.mesh);
usr.sbin/unbound/daemon/remote.c
2799
struct iter_forwards* fwd = worker->env.fwds;
usr.sbin/unbound/daemon/remote.c
2810
if(insecure && worker->env.anchors) {
usr.sbin/unbound/daemon/remote.c
2811
if(!anchors_add_insecure(worker->env.anchors, LDNS_RR_CLASS_IN,
usr.sbin/unbound/daemon/remote.c
2835
struct iter_forwards* fwd = worker->env.fwds;
usr.sbin/unbound/daemon/remote.c
2843
if(insecure && worker->env.anchors)
usr.sbin/unbound/daemon/remote.c
2844
anchors_delete_insecure(worker->env.anchors, LDNS_RR_CLASS_IN,
usr.sbin/unbound/daemon/remote.c
2856
struct iter_forwards* fwd = worker->env.fwds;
usr.sbin/unbound/daemon/remote.c
2867
lock_rw_wrlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/remote.c
2868
if(insecure && worker->env.anchors) {
usr.sbin/unbound/daemon/remote.c
2869
if(!anchors_add_insecure(worker->env.anchors, LDNS_RR_CLASS_IN,
usr.sbin/unbound/daemon/remote.c
2872
lock_rw_unlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/remote.c
2880
if(insecure && worker->env.anchors)
usr.sbin/unbound/daemon/remote.c
2881
anchors_delete_insecure(worker->env.anchors,
usr.sbin/unbound/daemon/remote.c
2884
lock_rw_unlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/remote.c
2890
if(!hints_add_stub(worker->env.hints, LDNS_RR_CLASS_IN, dp, !prime,
usr.sbin/unbound/daemon/remote.c
2894
if(insecure && worker->env.anchors)
usr.sbin/unbound/daemon/remote.c
2895
anchors_delete_insecure(worker->env.anchors,
usr.sbin/unbound/daemon/remote.c
2898
lock_rw_unlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/remote.c
2903
lock_rw_unlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/remote.c
2912
struct iter_forwards* fwd = worker->env.fwds;
usr.sbin/unbound/daemon/remote.c
2920
lock_rw_wrlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/remote.c
2921
if(insecure && worker->env.anchors)
usr.sbin/unbound/daemon/remote.c
2922
anchors_delete_insecure(worker->env.anchors, LDNS_RR_CLASS_IN,
usr.sbin/unbound/daemon/remote.c
2925
hints_delete_stub(worker->env.hints, LDNS_RR_CLASS_IN, nm, nolock);
usr.sbin/unbound/daemon/remote.c
2927
lock_rw_unlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/remote.c
2941
if(worker->env.anchors) {
usr.sbin/unbound/daemon/remote.c
2942
if(!anchors_add_insecure(worker->env.anchors,
usr.sbin/unbound/daemon/remote.c
2962
if(worker->env.anchors)
usr.sbin/unbound/daemon/remote.c
2963
anchors_delete_insecure(worker->env.anchors,
usr.sbin/unbound/daemon/remote.c
2974
if(worker->env.anchors) {
usr.sbin/unbound/daemon/remote.c
2975
RBTREE_FOR(a, struct trust_anchor*, worker->env.anchors->tree) {
usr.sbin/unbound/daemon/remote.c
3022
struct module_env* env)
usr.sbin/unbound/daemon/remote.c
3030
timeval_subtract(&d, env->now_tv, &r->start_time);
usr.sbin/unbound/daemon/remote.c
3107
mesh = worker->env.mesh;
usr.sbin/unbound/daemon/remote.c
3113
get_mesh_age(m, timebuf, sizeof(timebuf), &worker->env);
usr.sbin/unbound/daemon/remote.c
3191
arg.infra = worker->env.infra_cache;
usr.sbin/unbound/daemon/remote.c
3193
arg.now = *worker->env.now;
usr.sbin/unbound/daemon/remote.c
3202
struct config_file* cfg = worker->env.cfg;
usr.sbin/unbound/daemon/remote.c
3214
struct auth_zones* az = worker->env.auth_zones;
usr.sbin/unbound/daemon/remote.c
3240
if(!auth_zone_read_zonefile(z, worker->env.cfg)) {
usr.sbin/unbound/daemon/remote.c
3265
xfr->lease_time = *worker->env.now;
usr.sbin/unbound/daemon/remote.c
3266
xfr->soa_zone_acquired = *worker->env.now;
usr.sbin/unbound/daemon/remote.c
3270
z->soa_zone_acquired = *worker->env.now;
usr.sbin/unbound/daemon/remote.c
3272
auth_zone_verify_zonemd(z, &worker->env, &worker->env.mesh->mods,
usr.sbin/unbound/daemon/remote.c
3296
struct auth_zones* az = worker->env.auth_zones;
usr.sbin/unbound/daemon/remote.c
3299
if(!az || !auth_zones_startprobesequence(az, &worker->env, nm, nmlen,
usr.sbin/unbound/daemon/remote.c
3316
if(!config_set_option(worker->env.cfg, arg, arg2)) {
usr.sbin/unbound/daemon/remote.c
3322
int m = modstack_find(&worker->env.mesh->mods, "validator");
usr.sbin/unbound/daemon/remote.c
3324
if(m != -1) val_env = (struct val_env*)worker->env.modinfo[m];
usr.sbin/unbound/daemon/remote.c
3326
val_env->date_override = worker->env.cfg->val_date_override;
usr.sbin/unbound/daemon/remote.c
3343
r = config_get_option(worker->env.cfg, arg, remote_get_opt_ssl, ssl);
usr.sbin/unbound/daemon/remote.c
3355
struct iter_forwards* fwds = worker->env.fwds;
usr.sbin/unbound/daemon/remote.c
3365
if(worker->env.anchors &&
usr.sbin/unbound/daemon/remote.c
3366
(a=anchor_find(worker->env.anchors, z->name,
usr.sbin/unbound/daemon/remote.c
3390
lock_rw_rdlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/remote.c
3391
RBTREE_FOR(z, struct iter_hints_stub*, &worker->env.hints->tree) {
usr.sbin/unbound/daemon/remote.c
3395
if(worker->env.anchors &&
usr.sbin/unbound/daemon/remote.c
3396
(a=anchor_find(worker->env.anchors, z->node.name,
usr.sbin/unbound/daemon/remote.c
3407
lock_rw_unlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/remote.c
3411
lock_rw_unlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/remote.c
3496
char* s = (char*)sldns_buffer_begin(worker->env.scratch_buffer);
usr.sbin/unbound/daemon/remote.c
3497
size_t slen = sldns_buffer_capacity(worker->env.scratch_buffer);
usr.sbin/unbound/daemon/remote.c
3532
struct view* v = views_find_view(worker->env.views,
usr.sbin/unbound/daemon/remote.c
3548
struct view* v = views_find_view(worker->env.views,
usr.sbin/unbound/daemon/remote.c
3618
a.infra = worker->env.infra_cache;
usr.sbin/unbound/daemon/remote.c
3619
a.now = *worker->env.now;
usr.sbin/unbound/daemon/remote.c
3621
a.backoff = worker->env.cfg->ratelimit_backoff;
usr.sbin/unbound/daemon/remote.c
3637
a.infra = worker->env.infra_cache;
usr.sbin/unbound/daemon/remote.c
3638
a.now = *worker->env.now;
usr.sbin/unbound/daemon/remote.c
3640
a.backoff = worker->env.cfg->ip_ratelimit_backoff;
usr.sbin/unbound/daemon/remote.c
3656
struct auth_zones *az = worker->env.auth_zones;
usr.sbin/unbound/daemon/remote.c
3705
char const* secret_file = worker->env.cfg->cookie_secret_file;
usr.sbin/unbound/daemon/remote.c
3747
char const* secret_file = worker->env.cfg->cookie_secret_file;
usr.sbin/unbound/daemon/remote.c
3782
char const* secret_file = worker->env.cfg->cookie_secret_file;
usr.sbin/unbound/daemon/remote.c
3818
char const* secret_file = worker->env.cfg->cookie_secret_file;
usr.sbin/unbound/daemon/remote.c
4040
do_list_auth_zones(ssl, worker->env.auth_zones);
usr.sbin/unbound/daemon/remote.c
4950
struct config_file* cfg = fr->worker->env.cfg;
usr.sbin/unbound/daemon/remote.c
5020
struct config_file* cfg = fr->worker->env.cfg;
usr.sbin/unbound/daemon/remote.c
5505
struct module_env* env = &fr->worker->env;
usr.sbin/unbound/daemon/remote.c
5514
lock_rw_rdlock(&env->auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
5515
RBTREE_FOR(old_z, struct auth_zone*, &env->auth_zones->ztree) {
usr.sbin/unbound/daemon/remote.c
5522
lock_rw_unlock(&env->auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
5528
lock_rw_unlock(&env->auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
5532
lock_rw_rdlock(&env->auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
5533
old_z = auth_zone_find(env->auth_zones, new_z->name,
usr.sbin/unbound/daemon/remote.c
5537
lock_rw_unlock(&env->auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
5551
old_xfr = auth_xfer_find(env->auth_zones, old_z->name,
usr.sbin/unbound/daemon/remote.c
5559
lock_rw_unlock(&env->auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
5762
fr->worker->daemon->env, &fr->worker->daemon->mods)) {
usr.sbin/unbound/daemon/remote.c
5836
if(fr->worker->env.anchors) {
usr.sbin/unbound/daemon/remote.c
6409
fr_adjust_cache(struct module_env* env, struct config_file* oldcfg)
usr.sbin/unbound/daemon/remote.c
6411
if(env->cfg->msg_cache_size != oldcfg->msg_cache_size)
usr.sbin/unbound/daemon/remote.c
6412
slabhash_adjust_size(env->msg_cache, env->cfg->msg_cache_size);
usr.sbin/unbound/daemon/remote.c
6413
if(env->cfg->rrset_cache_size != oldcfg->rrset_cache_size)
usr.sbin/unbound/daemon/remote.c
6414
slabhash_adjust_size(&env->rrset_cache->table,
usr.sbin/unbound/daemon/remote.c
6415
env->cfg->rrset_cache_size);
usr.sbin/unbound/daemon/remote.c
6416
if(env->key_cache &&
usr.sbin/unbound/daemon/remote.c
6417
env->cfg->key_cache_size != oldcfg->key_cache_size)
usr.sbin/unbound/daemon/remote.c
6418
slabhash_adjust_size(env->key_cache->slab,
usr.sbin/unbound/daemon/remote.c
6419
env->cfg->key_cache_size);
usr.sbin/unbound/daemon/remote.c
6420
if(env->cfg->infra_cache_numhosts != oldcfg->infra_cache_numhosts) {
usr.sbin/unbound/daemon/remote.c
6421
size_t inframem = env->cfg->infra_cache_numhosts *
usr.sbin/unbound/daemon/remote.c
6424
slabhash_adjust_size(env->infra_cache->hosts, inframem);
usr.sbin/unbound/daemon/remote.c
6426
if(env->cfg->ratelimit_size != oldcfg->ratelimit_size) {
usr.sbin/unbound/daemon/remote.c
6427
slabhash_adjust_size(env->infra_cache->domain_rates,
usr.sbin/unbound/daemon/remote.c
6428
env->cfg->ratelimit_size);
usr.sbin/unbound/daemon/remote.c
6429
slabhash_adjust_size(env->infra_cache->client_ip_rates,
usr.sbin/unbound/daemon/remote.c
6430
env->cfg->ratelimit_size);
usr.sbin/unbound/daemon/remote.c
6432
if(env->neg_cache &&
usr.sbin/unbound/daemon/remote.c
6433
env->cfg->neg_cache_size != oldcfg->neg_cache_size) {
usr.sbin/unbound/daemon/remote.c
6434
val_neg_adjust_size(env->neg_cache, env->cfg->neg_cache_size);
usr.sbin/unbound/daemon/remote.c
6440
fr_adjust_iter_env(struct module_env* env, struct fast_reload_construct* ct)
usr.sbin/unbound/daemon/remote.c
6452
m = modstack_find(env->modstack, "iterator");
usr.sbin/unbound/daemon/remote.c
6453
if(m != -1) iter_env = (struct iter_env*)env->modinfo[m];
usr.sbin/unbound/daemon/remote.c
6469
iter_env->outbound_msg_retry = env->cfg->outbound_msg_retry;
usr.sbin/unbound/daemon/remote.c
6470
iter_env->max_sent_count = env->cfg->max_sent_count;
usr.sbin/unbound/daemon/remote.c
6471
iter_env->max_query_restarts = env->cfg->max_query_restarts;
usr.sbin/unbound/daemon/remote.c
6484
fr_adjust_val_env(struct module_env* env, struct fast_reload_construct* ct,
usr.sbin/unbound/daemon/remote.c
6489
if(env->cfg->bogus_ttl == oldcfg->bogus_ttl &&
usr.sbin/unbound/daemon/remote.c
6490
env->cfg->val_date_override == oldcfg->val_date_override &&
usr.sbin/unbound/daemon/remote.c
6491
env->cfg->val_sig_skew_min == oldcfg->val_sig_skew_min &&
usr.sbin/unbound/daemon/remote.c
6492
env->cfg->val_sig_skew_max == oldcfg->val_sig_skew_max &&
usr.sbin/unbound/daemon/remote.c
6493
env->cfg->val_max_restart == oldcfg->val_max_restart &&
usr.sbin/unbound/daemon/remote.c
6494
strcmp(env->cfg->val_nsec3_key_iterations,
usr.sbin/unbound/daemon/remote.c
6501
m = modstack_find(env->modstack, "validator");
usr.sbin/unbound/daemon/remote.c
6502
if(m != -1) val_env = (struct val_env*)env->modinfo[m];
usr.sbin/unbound/daemon/remote.c
6509
val_env_apply_cfg(val_env, env->cfg, ct->nsec3_keysize,
usr.sbin/unbound/daemon/remote.c
6513
if(env->neg_cache) {
usr.sbin/unbound/daemon/remote.c
6514
lock_basic_lock(&env->neg_cache->lock);
usr.sbin/unbound/daemon/remote.c
6515
env->neg_cache->nsec3_max_iter = val_env->
usr.sbin/unbound/daemon/remote.c
6517
lock_basic_unlock(&env->neg_cache->lock);
usr.sbin/unbound/daemon/remote.c
6524
fr_adjust_infra(struct module_env* env, struct fast_reload_construct* ct)
usr.sbin/unbound/daemon/remote.c
6526
struct infra_cache* infra = env->infra_cache;
usr.sbin/unbound/daemon/remote.c
6527
struct config_file* cfg = env->cfg;
usr.sbin/unbound/daemon/remote.c
6556
struct module_env* env = daemon->env;
usr.sbin/unbound/daemon/remote.c
6565
lock_rw_wrlock(&env->views->lock);
usr.sbin/unbound/daemon/remote.c
6567
lock_rw_wrlock(&env->respip_set->lock);
usr.sbin/unbound/daemon/remote.c
6571
lock_rw_wrlock(&env->auth_zones->rpz_lock);
usr.sbin/unbound/daemon/remote.c
6573
lock_rw_wrlock(&env->auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
6575
lock_rw_wrlock(&env->fwds->lock);
usr.sbin/unbound/daemon/remote.c
6577
lock_rw_wrlock(&env->hints->lock);
usr.sbin/unbound/daemon/remote.c
6580
lock_basic_lock(&env->anchors->lock);
usr.sbin/unbound/daemon/remote.c
6585
fr_atomic_copy_cfg(ct->oldcfg, env->cfg, newcfg);
usr.sbin/unbound/daemon/remote.c
6589
*ct->oldcfg = *env->cfg;
usr.sbin/unbound/daemon/remote.c
6591
*env->cfg = *newcfg;
usr.sbin/unbound/daemon/remote.c
6596
if(env->cfg->log_identity || ct->oldcfg->log_identity) {
usr.sbin/unbound/daemon/remote.c
6598
log_ident_set_or_default(env->cfg->log_identity);
usr.sbin/unbound/daemon/remote.c
6612
forwards_swap_tree(env->fwds, ct->fwds);
usr.sbin/unbound/daemon/remote.c
6613
hints_swap_tree(env->hints, ct->hints);
usr.sbin/unbound/daemon/remote.c
6614
views_swap_tree(env->views, ct->views);
usr.sbin/unbound/daemon/remote.c
6619
respip_set_swap_tree(env->respip_set, ct->respip_set);
usr.sbin/unbound/daemon/remote.c
6622
auth_zones_swap(env->auth_zones, ct->auth_zones);
usr.sbin/unbound/daemon/remote.c
6623
edns_strings_swap_tree(env->edns_strings, ct->edns_strings);
usr.sbin/unbound/daemon/remote.c
6624
anchors_swap_tree(env->anchors, ct->anchors);
usr.sbin/unbound/daemon/remote.c
6626
daemon->env->cachedb_enabled = cachedb_is_enabled(&daemon->mods,
usr.sbin/unbound/daemon/remote.c
6627
daemon->env);
usr.sbin/unbound/daemon/remote.c
6633
if(env->cfg->dnstap) {
usr.sbin/unbound/daemon/remote.c
6635
dt_apply_cfg(daemon->dtenv, env->cfg);
usr.sbin/unbound/daemon/remote.c
6636
else dt_apply_logcfg(daemon->dtenv, env->cfg);
usr.sbin/unbound/daemon/remote.c
6639
fr_adjust_cache(env, ct->oldcfg);
usr.sbin/unbound/daemon/remote.c
6641
fr_adjust_iter_env(env, ct);
usr.sbin/unbound/daemon/remote.c
6642
fr_adjust_val_env(env, ct, ct->oldcfg);
usr.sbin/unbound/daemon/remote.c
6643
fr_adjust_infra(env, ct);
usr.sbin/unbound/daemon/remote.c
6647
config_apply(env->cfg);
usr.sbin/unbound/daemon/remote.c
6650
lock_rw_unlock(&env->views->lock);
usr.sbin/unbound/daemon/remote.c
6652
lock_rw_unlock(&env->respip_set->lock);
usr.sbin/unbound/daemon/remote.c
6656
lock_rw_unlock(&env->auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
6658
lock_rw_unlock(&env->auth_zones->rpz_lock);
usr.sbin/unbound/daemon/remote.c
6660
lock_rw_unlock(&env->fwds->lock);
usr.sbin/unbound/daemon/remote.c
6662
lock_rw_unlock(&env->hints->lock);
usr.sbin/unbound/daemon/remote.c
6665
lock_basic_unlock(&env->anchors->lock);
usr.sbin/unbound/daemon/remote.c
7257
fr->thread_tid_log = worker->env.cfg->log_thread_id;
usr.sbin/unbound/daemon/remote.c
7533
struct mesh_area* mesh = worker->env.mesh;
usr.sbin/unbound/daemon/remote.c
7534
struct config_file* cfg = worker->env.cfg;
usr.sbin/unbound/daemon/remote.c
7611
lock_rw_wrlock(&worker->env.auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
7622
*xfr = auth_xfer_find(worker->env.auth_zones, nm, nmlen,
usr.sbin/unbound/daemon/remote.c
7645
auth_zone_zonemd_stop_lookup(item->old_z, worker->env.mesh);
usr.sbin/unbound/daemon/remote.c
7653
lock_rw_unlock(&worker->env.auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
7676
(void)rbtree_delete(&worker->env.auth_zones->xtree,
usr.sbin/unbound/daemon/remote.c
7678
lock_rw_unlock(&worker->env.auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
7682
lock_rw_unlock(&worker->env.auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
7722
xfr = auth_xfer_create(worker->env.auth_zones, item->new_z);
usr.sbin/unbound/daemon/remote.c
7733
auth_zone_pickup_initial_zone(item->new_z, &worker->env);
usr.sbin/unbound/daemon/remote.c
7735
lock_rw_unlock(&worker->env.auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
7741
auth_xfer_pickup_initial_zone(xfr, &worker->env);
usr.sbin/unbound/daemon/remote.c
7751
auth_zone_verify_zonemd(item->new_z, &worker->env,
usr.sbin/unbound/daemon/remote.c
7752
&worker->env.mesh->mods, NULL, 0, 1);
usr.sbin/unbound/daemon/remote.c
7785
(void)rbtree_delete(&worker->env.auth_zones->xtree,
usr.sbin/unbound/daemon/remote.c
7791
xfr = auth_xfer_create(worker->env.auth_zones, item->new_z);
usr.sbin/unbound/daemon/remote.c
7798
lock_rw_unlock(&worker->env.auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
7876
struct config_file* cfg = worker->env.cfg;
usr.sbin/unbound/daemon/remote.c
7956
worker->env.cachedb_enabled = worker->daemon->env->cachedb_enabled;
usr.sbin/unbound/daemon/remote.c
8000
mesh_delete_all(fr->worker->env.mesh);
usr.sbin/unbound/daemon/remote.c
930
msg = slabhash_get_mem(daemon->env->msg_cache);
usr.sbin/unbound/daemon/remote.c
931
rrset = slabhash_get_mem(&daemon->env->rrset_cache->table);
usr.sbin/unbound/daemon/remote.c
932
val = mod_get_mem(&worker->env, "validator");
usr.sbin/unbound/daemon/remote.c
933
iter = mod_get_mem(&worker->env, "iterator");
usr.sbin/unbound/daemon/remote.c
934
respip = mod_get_mem(&worker->env, "respip");
usr.sbin/unbound/daemon/remote.c
936
subnet = mod_get_mem(&worker->env, "subnetcache");
usr.sbin/unbound/daemon/remote.c
939
ipsecmod = mod_get_mem(&worker->env, "ipsecmod");
usr.sbin/unbound/daemon/remote.c
949
dynlib = mod_get_mem(&worker->env, "dynlib");
usr.sbin/unbound/daemon/stats.c
100
if((long long)worker->env.mesh->all.count > stats->max_query_list_size)
usr.sbin/unbound/daemon/stats.c
101
stats->max_query_list_size = (long long)worker->env.mesh->all.count;
usr.sbin/unbound/daemon/stats.c
108
stats->sum_query_list_size += worker->env.mesh->all.count;
usr.sbin/unbound/daemon/stats.c
109
if((long long)worker->env.mesh->all.count > stats->max_query_list_size)
usr.sbin/unbound/daemon/stats.c
110
stats->max_query_list_size = (long long)worker->env.mesh->all.count;
usr.sbin/unbound/daemon/stats.c
132
(unsigned)worker->env.mesh->stats_dropped,
usr.sbin/unbound/daemon/stats.c
133
(unsigned)worker->env.mesh->stats_jostled);
usr.sbin/unbound/daemon/stats.c
143
int m = modstack_find(&worker->env.mesh->mods, "subnetcache");
usr.sbin/unbound/daemon/stats.c
147
sne = (struct subnet_env*)worker->env.modinfo[m];
usr.sbin/unbound/daemon/stats.c
148
if(reset && !worker->env.cfg->stat_cumulative) {
usr.sbin/unbound/daemon/stats.c
155
if(reset && !worker->env.cfg->stat_cumulative) {
usr.sbin/unbound/daemon/stats.c
168
int m = modstack_find(&worker->env.mesh->mods, "validator");
usr.sbin/unbound/daemon/stats.c
173
ve = (struct val_env*)worker->env.modinfo[m];
usr.sbin/unbound/daemon/stats.c
180
if(reset && !worker->env.cfg->stat_cumulative) {
usr.sbin/unbound/daemon/stats.c
191
int m = modstack_find(&worker->env.mesh->mods, "validator");
usr.sbin/unbound/daemon/stats.c
196
ve = (struct val_env*)worker->env.modinfo[m];
usr.sbin/unbound/daemon/stats.c
199
if(reset && !worker->env.cfg->stat_cumulative)
usr.sbin/unbound/daemon/stats.c
209
int m = modstack_find(&worker->env.mesh->mods, "iterator");
usr.sbin/unbound/daemon/stats.c
214
ie = (struct iter_env*)worker->env.modinfo[m];
usr.sbin/unbound/daemon/stats.c
217
if(reset && !worker->env.cfg->stat_cumulative)
usr.sbin/unbound/daemon/stats.c
234
if(reset && !worker->env.cfg->stat_cumulative)
usr.sbin/unbound/daemon/stats.c
249
if(reset && !worker->env.cfg->stat_cumulative)
usr.sbin/unbound/daemon/stats.c
263
s->mesh_num_states = (long long)worker->env.mesh->all.count;
usr.sbin/unbound/daemon/stats.c
264
s->mesh_num_reply_states = (long long)worker->env.mesh->num_reply_states;
usr.sbin/unbound/daemon/stats.c
265
s->mesh_num_reply_addrs = (long long)worker->env.mesh->num_reply_addrs;
usr.sbin/unbound/daemon/stats.c
266
s->mesh_jostled = (long long)worker->env.mesh->stats_jostled;
usr.sbin/unbound/daemon/stats.c
267
s->mesh_dropped = (long long)worker->env.mesh->stats_dropped;
usr.sbin/unbound/daemon/stats.c
268
s->mesh_replies_sent = (long long)worker->env.mesh->replies_sent;
usr.sbin/unbound/daemon/stats.c
269
s->mesh_replies_sum_wait_sec = (long long)worker->env.mesh->replies_sum_wait.tv_sec;
usr.sbin/unbound/daemon/stats.c
270
s->mesh_replies_sum_wait_usec = (long long)worker->env.mesh->replies_sum_wait.tv_usec;
usr.sbin/unbound/daemon/stats.c
271
s->mesh_time_median = timehist_quartile(worker->env.mesh->histogram,
usr.sbin/unbound/daemon/stats.c
275
s->svr.ans_secure += (long long)worker->env.mesh->ans_secure;
usr.sbin/unbound/daemon/stats.c
276
s->svr.ans_bogus += (long long)worker->env.mesh->ans_bogus;
usr.sbin/unbound/daemon/stats.c
277
s->svr.val_ops += (long long)worker->env.mesh->val_ops;
usr.sbin/unbound/daemon/stats.c
278
s->svr.ans_rcode_nodata += (long long)worker->env.mesh->ans_nodata;
usr.sbin/unbound/daemon/stats.c
279
s->svr.ans_expired += (long long)worker->env.mesh->ans_expired;
usr.sbin/unbound/daemon/stats.c
281
s->svr.ans_rcode[i] += (long long)worker->env.mesh->ans_rcode[i];
usr.sbin/unbound/daemon/stats.c
283
s->svr.rpz_action[i] += (long long)worker->env.mesh->rpz_action[i];
usr.sbin/unbound/daemon/stats.c
284
timehist_export(worker->env.mesh->histogram, s->svr.hist,
usr.sbin/unbound/daemon/stats.c
287
(long long)worker->env.mesh->num_queries_discard_timeout;
usr.sbin/unbound/daemon/stats.c
289
(long long)worker->env.mesh->num_queries_replyaddr_limit;
usr.sbin/unbound/daemon/stats.c
291
(long long)worker->env.mesh->num_queries_wait_limit;
usr.sbin/unbound/daemon/stats.c
293
(long long)worker->env.mesh->num_dns_error_reports;
usr.sbin/unbound/daemon/stats.c
306
get_slabhash_stats(worker->env.msg_cache,
usr.sbin/unbound/daemon/stats.c
308
get_slabhash_stats(&worker->env.rrset_cache->table,
usr.sbin/unbound/daemon/stats.c
310
s->svr.infra_cache_count = (long long)count_slabhash_entries(worker->env.infra_cache->hosts);
usr.sbin/unbound/daemon/stats.c
311
if(worker->env.key_cache)
usr.sbin/unbound/daemon/stats.c
312
s->svr.key_cache_count = (long long)count_slabhash_entries(worker->env.key_cache->slab);
usr.sbin/unbound/daemon/stats.c
337
if(worker->env.auth_zones) {
usr.sbin/unbound/daemon/stats.c
338
s->svr.num_query_authzone_up += (long long)worker->env.mesh->num_query_authzone_up;
usr.sbin/unbound/daemon/stats.c
339
s->svr.num_query_authzone_down += (long long)worker->env.mesh->num_query_authzone_down;
usr.sbin/unbound/daemon/stats.c
364
s->svr.num_query_cachedb = (long long)worker->env.mesh->ans_cachedb;
usr.sbin/unbound/daemon/stats.c
376
if(reset && !worker->env.cfg->stat_cumulative) {
usr.sbin/unbound/daemon/stats.c
99
stats->sum_query_list_size += worker->env.mesh->all.count;
usr.sbin/unbound/daemon/worker.c
1014
if(!inplace_cb_reply_local_call(&worker->env, NULL, NULL, NULL,
usr.sbin/unbound/daemon/worker.c
1016
worker->env.now_tv))
usr.sbin/unbound/daemon/worker.c
1079
if(!w->env.need_to_validate) {
usr.sbin/unbound/daemon/worker.c
1086
lock_basic_lock(&w->env.anchors->lock);
usr.sbin/unbound/daemon/worker.c
1087
RBTREE_FOR(ta, struct trust_anchor*, w->env.anchors->tree) {
usr.sbin/unbound/daemon/worker.c
1113
lock_basic_unlock(&w->env.anchors->lock);
usr.sbin/unbound/daemon/worker.c
1132
struct config_file* cfg = w->env.cfg;
usr.sbin/unbound/daemon/worker.c
1199
if(!w->env.auth_zones) return;
usr.sbin/unbound/daemon/worker.c
1201
if(auth_zones_notify(w->env.auth_zones, &w->env, qinfo->qname,
usr.sbin/unbound/daemon/worker.c
134
msg = slabhash_get_mem(worker->env.msg_cache);
usr.sbin/unbound/daemon/worker.c
135
rrset = slabhash_get_mem(&worker->env.rrset_cache->table);
usr.sbin/unbound/daemon/worker.c
136
infra = infra_get_mem(worker->env.infra_cache);
usr.sbin/unbound/daemon/worker.c
137
mesh = mesh_get_mem(worker->env.mesh);
usr.sbin/unbound/daemon/worker.c
140
anch = anchors_get_mem(worker->env.anchors);
usr.sbin/unbound/daemon/worker.c
143
for(i=0; i<worker->env.mesh->mods.num; i++) {
usr.sbin/unbound/daemon/worker.c
1433
if(!infra_ip_ratelimit_inc(worker->env.infra_cache, addr, addrlen,
usr.sbin/unbound/daemon/worker.c
1434
*worker->env.now, has_cookie,
usr.sbin/unbound/daemon/worker.c
1435
worker->env.cfg->ip_ratelimit_backoff, pkt)) {
usr.sbin/unbound/daemon/worker.c
1437
if(!has_cookie && worker->env.cfg->ip_ratelimit_factor != 0 &&
usr.sbin/unbound/daemon/worker.c
1438
ub_random_max(worker->env.rnd,
usr.sbin/unbound/daemon/worker.c
1439
worker->env.cfg->ip_ratelimit_factor) == 0) {
usr.sbin/unbound/daemon/worker.c
144
fptr_ok(fptr_whitelist_mod_get_mem(worker->env.mesh->
usr.sbin/unbound/daemon/worker.c
146
if(strcmp(worker->env.mesh->mods.mod[i]->name, "validator")==0)
usr.sbin/unbound/daemon/worker.c
147
val += (*worker->env.mesh->mods.mod[i]->get_mem)
usr.sbin/unbound/daemon/worker.c
148
(&worker->env, i);
usr.sbin/unbound/daemon/worker.c
150
else if(strcmp(worker->env.mesh->mods.mod[i]->name,
usr.sbin/unbound/daemon/worker.c
1508
if (worker->env.cfg->sock_queue_timeout && timeval_isset(&c->recv_tv)) {
usr.sbin/unbound/daemon/worker.c
1509
timeval_subtract(&wait_time, worker->env.now_tv, &c->recv_tv);
usr.sbin/unbound/daemon/worker.c
1514
(long long)(worker->env.cfg->sock_queue_timeout * 1000000)) {
usr.sbin/unbound/daemon/worker.c
152
subnet += (*worker->env.mesh->mods.mod[i]->get_mem)
usr.sbin/unbound/daemon/worker.c
153
(&worker->env, i);
usr.sbin/unbound/daemon/worker.c
155
else iter += (*worker->env.mesh->mods.mod[i]->get_mem)
usr.sbin/unbound/daemon/worker.c
156
(&worker->env, i);
usr.sbin/unbound/daemon/worker.c
1589
((worker->env.cfg->sock_queue_timeout && timeval_isset(&c->recv_tv))?&c->recv_tv:NULL));
usr.sbin/unbound/daemon/worker.c
1595
worker->env.cfg->ede, 1, &check_result)) != -1) {
usr.sbin/unbound/daemon/worker.c
1602
worker->env.cfg->ede, 0, &check_result)) != -1) {
usr.sbin/unbound/daemon/worker.c
162
+ sizeof(*worker->env.scratch_buffer)
usr.sbin/unbound/daemon/worker.c
1621
pre_edns_ip_ratelimit = !worker->env.cfg->do_answer_cookie
usr.sbin/unbound/daemon/worker.c
163
+ sldns_buffer_capacity(worker->env.scratch_buffer);
usr.sbin/unbound/daemon/worker.c
164
if(worker->daemon->env->fwds)
usr.sbin/unbound/daemon/worker.c
165
log_info("forwards=%u", (unsigned)forwards_get_mem(worker->env.fwds));
usr.sbin/unbound/daemon/worker.c
1650
if(worker->env.cfg->log_queries) {
usr.sbin/unbound/daemon/worker.c
166
if(worker->daemon->env->hints)
usr.sbin/unbound/daemon/worker.c
167
log_info("hints=%u", (unsigned)hints_get_mem(worker->env.hints));
usr.sbin/unbound/daemon/worker.c
1690
c->buffer, &edns, worker->env.cfg, c, repinfo,
usr.sbin/unbound/daemon/worker.c
1691
*worker->env.now, worker->scratchpad,
usr.sbin/unbound/daemon/worker.c
1852
if(local_zones_answer(worker->daemon->local_zones, &worker->env, &qinfo,
usr.sbin/unbound/daemon/worker.c
1865
if(worker->env.auth_zones &&
usr.sbin/unbound/daemon/worker.c
1866
rpz_callback_from_worker_request(worker->env.auth_zones,
usr.sbin/unbound/daemon/worker.c
1867
&worker->env, &qinfo, &edns, c->buffer, worker->scratchpad,
usr.sbin/unbound/daemon/worker.c
1877
if(worker->env.auth_zones &&
usr.sbin/unbound/daemon/worker.c
1878
auth_zones_downstream_answer(worker->env.auth_zones,
usr.sbin/unbound/daemon/worker.c
1879
&worker->env, &qinfo, &edns, repinfo, c->buffer,
usr.sbin/unbound/daemon/worker.c
1897
worker->env.cfg->ede, &check_result)) != -1)
usr.sbin/unbound/daemon/worker.c
1925
if(worker->env.cfg->ede) {
usr.sbin/unbound/daemon/worker.c
1974
if(!edns_bypass_cache_stage(edns.opt_list_in, &worker->env)) {
usr.sbin/unbound/daemon/worker.c
1978
if((e=slabhash_lookup(worker->env.msg_cache, h, lookup_qinfo, 0))) {
usr.sbin/unbound/daemon/worker.c
1991
if((worker->env.cfg->prefetch &&
usr.sbin/unbound/daemon/worker.c
1992
rep->prefetch_ttl <= *worker->env.now) ||
usr.sbin/unbound/daemon/worker.c
1993
(worker->env.cfg->serve_expired &&
usr.sbin/unbound/daemon/worker.c
1994
TTL_IS_EXPIRED(rep->ttl, *worker->env.now) &&
usr.sbin/unbound/daemon/worker.c
1995
!(*worker->env.now < rep->serve_expired_norec_ttl))) {
usr.sbin/unbound/daemon/worker.c
1997
TTL_IS_EXPIRED(rep->ttl, *worker->env.now)
usr.sbin/unbound/daemon/worker.c
1998
? 0 : rep->ttl - *worker->env.now;
usr.sbin/unbound/daemon/worker.c
204
for(i=0; i<worker->env.mesh->mods.num; i++) {
usr.sbin/unbound/daemon/worker.c
205
fptr_ok(fptr_whitelist_mod_get_mem(worker->env.mesh->
usr.sbin/unbound/daemon/worker.c
2068
mesh_new_client(worker->env.mesh, &qinfo, cinfo,
usr.sbin/unbound/daemon/worker.c
207
if(strcmp(worker->env.mesh->mods.mod[i]->name, "validator")==0)
usr.sbin/unbound/daemon/worker.c
208
val += (*worker->env.mesh->mods.mod[i]->get_mem)
usr.sbin/unbound/daemon/worker.c
209
(&worker->env, i);
usr.sbin/unbound/daemon/worker.c
2100
if(worker->env.cfg->log_replies)
usr.sbin/unbound/daemon/worker.c
211
else if(strcmp(worker->env.mesh->mods.mod[i]->name,
usr.sbin/unbound/daemon/worker.c
2112
(worker->env.cfg->log_destaddr?(void*)repinfo->c->socket->addr:NULL),
usr.sbin/unbound/daemon/worker.c
2118
(worker->env.cfg->log_destaddr?(void*)repinfo->c->socket->addr:NULL),
usr.sbin/unbound/daemon/worker.c
213
subnet += (*worker->env.mesh->mods.mod[i]->get_mem)
usr.sbin/unbound/daemon/worker.c
214
(&worker->env, i);
usr.sbin/unbound/daemon/worker.c
2169
if(worker->env.cfg->stat_interval > 0) {
usr.sbin/unbound/daemon/worker.c
2173
int interval = worker->env.cfg->stat_interval;
usr.sbin/unbound/daemon/worker.c
2198
tv.tv_sec = worker->env.cfg->stat_interval;
usr.sbin/unbound/daemon/worker.c
220
(unsigned)slabhash_get_mem(worker->env.msg_cache),
usr.sbin/unbound/daemon/worker.c
221
(unsigned)slabhash_get_mem(&worker->env.rrset_cache->table),
usr.sbin/unbound/daemon/worker.c
2210
mesh_stats(worker->env.mesh, "mesh has");
usr.sbin/unbound/daemon/worker.c
222
(unsigned)infra_get_mem(worker->env.infra_cache),
usr.sbin/unbound/daemon/worker.c
2228
tv.tv_sec = (time_t)autr_probe_timer(&worker->env);
usr.sbin/unbound/daemon/worker.c
2232
comm_timer_set(worker->env.probe_timer, &tv);
usr.sbin/unbound/daemon/worker.c
226
(unsigned)slabhash_get_mem(worker->env.msg_cache),
usr.sbin/unbound/daemon/worker.c
227
(unsigned)slabhash_get_mem(&worker->env.rrset_cache->table),
usr.sbin/unbound/daemon/worker.c
228
(unsigned)infra_get_mem(worker->env.infra_cache),
usr.sbin/unbound/daemon/worker.c
2339
dtenv, worker->daemon->doq_table, worker->env.rnd,
usr.sbin/unbound/daemon/worker.c
2350
worker->daemon->env->infra_cache, worker->rndstate,
usr.sbin/unbound/daemon/worker.c
2364
iterator_set_ip46_support(&worker->daemon->mods, worker->daemon->env,
usr.sbin/unbound/daemon/worker.c
2391
worker->env = *worker->daemon->env;
usr.sbin/unbound/daemon/worker.c
2392
comm_base_timept(worker->base, &worker->env.now, &worker->env.now_tv);
usr.sbin/unbound/daemon/worker.c
2393
worker->env.worker = worker;
usr.sbin/unbound/daemon/worker.c
2394
worker->env.worker_base = worker->base;
usr.sbin/unbound/daemon/worker.c
2395
worker->env.send_query = &worker_send_query;
usr.sbin/unbound/daemon/worker.c
2396
worker->env.alloc = worker->alloc;
usr.sbin/unbound/daemon/worker.c
2397
worker->env.outnet = worker->back;
usr.sbin/unbound/daemon/worker.c
2398
worker->env.rnd = worker->rndstate;
usr.sbin/unbound/daemon/worker.c
2404
worker->env.scratch = regional_create_custom(cfg->msg_buffer_size);
usr.sbin/unbound/daemon/worker.c
2405
if(!worker->env.scratch) {
usr.sbin/unbound/daemon/worker.c
2410
worker->env.mesh = mesh_create(&worker->daemon->mods, &worker->env);
usr.sbin/unbound/daemon/worker.c
2411
if(!worker->env.mesh) {
usr.sbin/unbound/daemon/worker.c
2417
worker->env.mesh->use_response_ip = worker->daemon->use_response_ip;
usr.sbin/unbound/daemon/worker.c
2418
worker->env.mesh->use_rpz = worker->daemon->use_rpz;
usr.sbin/unbound/daemon/worker.c
2420
worker->env.detach_subs = &mesh_detach_subs;
usr.sbin/unbound/daemon/worker.c
2421
worker->env.attach_sub = &mesh_attach_sub;
usr.sbin/unbound/daemon/worker.c
2422
worker->env.add_sub = &mesh_add_sub;
usr.sbin/unbound/daemon/worker.c
2423
worker->env.kill_sub = &mesh_state_delete;
usr.sbin/unbound/daemon/worker.c
2424
worker->env.detect_cycle = &mesh_detect_cycle;
usr.sbin/unbound/daemon/worker.c
2425
worker->env.scratch_buffer = sldns_buffer_new(cfg->msg_buffer_size);
usr.sbin/unbound/daemon/worker.c
2426
if(!worker->env.scratch_buffer) {
usr.sbin/unbound/daemon/worker.c
2432
if(autr_get_num_anchors(worker->env.anchors) > 0
usr.sbin/unbound/daemon/worker.c
2440
worker->env.probe_timer = comm_timer_create(worker->base,
usr.sbin/unbound/daemon/worker.c
2442
if(!worker->env.probe_timer) {
usr.sbin/unbound/daemon/worker.c
2446
comm_timer_set(worker->env.probe_timer, &tv);
usr.sbin/unbound/daemon/worker.c
2450
if(worker->env.auth_zones
usr.sbin/unbound/daemon/worker.c
2455
auth_xfer_pickup_initial(worker->env.auth_zones, &worker->env);
usr.sbin/unbound/daemon/worker.c
2456
auth_zones_pickup_zonemd_verify(worker->env.auth_zones,
usr.sbin/unbound/daemon/worker.c
2457
&worker->env);
usr.sbin/unbound/daemon/worker.c
2475
if(worker->env.cfg->stat_interval > 0) {
usr.sbin/unbound/daemon/worker.c
2477
worker->env.cfg->stat_interval);
usr.sbin/unbound/daemon/worker.c
248
struct worker* worker = e->qstate->env->worker;
usr.sbin/unbound/daemon/worker.c
2495
if(worker->env.mesh && verbosity >= VERB_OPS) {
usr.sbin/unbound/daemon/worker.c
2497
mesh_stats(worker->env.mesh, "mesh has");
usr.sbin/unbound/daemon/worker.c
2501
mesh_delete(worker->env.mesh);
usr.sbin/unbound/daemon/worker.c
2502
sldns_buffer_free(worker->env.scratch_buffer);
usr.sbin/unbound/daemon/worker.c
2508
comm_timer_delete(worker->env.probe_timer);
usr.sbin/unbound/daemon/worker.c
2527
regional_destroy(worker->env.scratch);
usr.sbin/unbound/daemon/worker.c
253
mesh_report_reply(worker->env.mesh, e, reply_info, error);
usr.sbin/unbound/daemon/worker.c
2539
struct worker* worker = q->env->worker;
usr.sbin/unbound/daemon/worker.c
2548
worker_handle_service_reply, e, worker->back->udp_buff, q->env,
usr.sbin/unbound/daemon/worker.c
2560
slabhash_clear(&worker->env.rrset_cache->table);
usr.sbin/unbound/daemon/worker.c
2561
slabhash_clear(worker->env.msg_cache);
usr.sbin/unbound/daemon/worker.c
2566
server_stats_init(&worker->stats, worker->env.cfg);
usr.sbin/unbound/daemon/worker.c
2567
mesh_stats_clear(worker->env.mesh);
usr.sbin/unbound/daemon/worker.c
266
mesh_report_reply(worker->env.mesh, e, reply_info,
usr.sbin/unbound/daemon/worker.c
271
mesh_report_reply(worker->env.mesh, e, reply_info, NETEVENT_NOERROR);
usr.sbin/unbound/daemon/worker.c
284
if(worker->err_limit_time == *worker->env.now) {
usr.sbin/unbound/daemon/worker.c
290
worker->err_limit_time = *worker->env.now;
usr.sbin/unbound/daemon/worker.c
483
mesh_delete_all(worker->env.mesh);
usr.sbin/unbound/daemon/worker.c
605
time_t timenow = *worker->env.now;
usr.sbin/unbound/daemon/worker.c
607
int must_validate = (!has_cd_bit || worker->env.cfg->ignore_cd)
usr.sbin/unbound/daemon/worker.c
608
&& worker->env.need_to_validate;
usr.sbin/unbound/daemon/worker.c
612
dp = dns_cache_find_delegation(&worker->env, qinfo->qname,
usr.sbin/unbound/daemon/worker.c
635
if(!inplace_cb_reply_servfail_call(&worker->env, qinfo, NULL,
usr.sbin/unbound/daemon/worker.c
637
worker->env.now_tv))
usr.sbin/unbound/daemon/worker.c
640
if(worker->env.cfg->ede &&
usr.sbin/unbound/daemon/worker.c
656
if(worker->env.cfg->val_clean_additional)
usr.sbin/unbound/daemon/worker.c
673
if(worker->env.cfg->disable_edns_do && (edns->bits & EDNS_DO))
usr.sbin/unbound/daemon/worker.c
675
if(!inplace_cb_reply_cache_call(&worker->env, qinfo, NULL, msg->rep,
usr.sbin/unbound/daemon/worker.c
677
worker->env.now_tv))
usr.sbin/unbound/daemon/worker.c
682
if(worker->env.cfg->ede && has_cd_bit &&
usr.sbin/unbound/daemon/worker.c
693
if(!inplace_cb_reply_servfail_call(&worker->env, qinfo, NULL, NULL,
usr.sbin/unbound/daemon/worker.c
695
worker->env.now_tv))
usr.sbin/unbound/daemon/worker.c
729
worker->env.views, worker->env.respip_set))
usr.sbin/unbound/daemon/worker.c
777
time_t timenow = *worker->env.now;
usr.sbin/unbound/daemon/worker.c
782
int must_validate = (!has_cd_bit || worker->env.cfg->ignore_cd)
usr.sbin/unbound/daemon/worker.c
783
&& worker->env.need_to_validate;
usr.sbin/unbound/daemon/worker.c
789
if(worker->env.cfg->serve_expired &&
usr.sbin/unbound/daemon/worker.c
794
(!worker->env.cfg->serve_expired_client_timeout ||
usr.sbin/unbound/daemon/worker.c
797
&& !(worker->env.cachedb_enabled &&
usr.sbin/unbound/daemon/worker.c
798
worker->env.cfg->cachedb_check_when_serve_expired)
usr.sbin/unbound/daemon/worker.c
837
if(worker->env.cfg->disable_edns_do && (edns->bits & EDNS_DO))
usr.sbin/unbound/daemon/worker.c
839
if(!inplace_cb_reply_servfail_call(&worker->env, qinfo, NULL, rep,
usr.sbin/unbound/daemon/worker.c
841
worker->env.now_tv))
usr.sbin/unbound/daemon/worker.c
844
if(worker->env.cfg->ede && rep->reason_bogus != LDNS_EDE_NONE) {
usr.sbin/unbound/daemon/worker.c
851
rrset_array_unlock_touch(worker->env.rrset_cache,
usr.sbin/unbound/daemon/worker.c
879
if(worker->env.cfg->disable_edns_do && (edns->bits & EDNS_DO))
usr.sbin/unbound/daemon/worker.c
885
&encode_rep, worker->env.auth_zones)) {
usr.sbin/unbound/daemon/worker.c
890
worker->env.auth_zones, worker->env.views,
usr.sbin/unbound/daemon/worker.c
891
worker->env.respip_set)) {
usr.sbin/unbound/daemon/worker.c
912
worker->env.cfg->ede_serve_expired && worker->env.cfg->ede) {
usr.sbin/unbound/daemon/worker.c
919
worker->env.cfg->ede && has_cd_bit &&
usr.sbin/unbound/daemon/worker.c
925
if(!inplace_cb_reply_cache_call(&worker->env, qinfo, NULL, encode_rep,
usr.sbin/unbound/daemon/worker.c
927
worker->env.now_tv))
usr.sbin/unbound/daemon/worker.c
933
if(!inplace_cb_reply_servfail_call(&worker->env, qinfo,
usr.sbin/unbound/daemon/worker.c
935
worker->scratchpad, worker->env.now_tv))
usr.sbin/unbound/daemon/worker.c
943
rrset_array_unlock_touch(worker->env.rrset_cache, worker->scratchpad,
usr.sbin/unbound/daemon/worker.c
949
rrset_array_unlock_touch(worker->env.rrset_cache,
usr.sbin/unbound/daemon/worker.c
976
if(modstack_find(&worker->env.mesh->mods, "subnetcache") != -1
usr.sbin/unbound/daemon/worker.c
977
&& worker->env.unique_mesh) {
usr.sbin/unbound/daemon/worker.c
978
mesh_new_prefetch(worker->env.mesh, qinfo, flags, leeway +
usr.sbin/unbound/daemon/worker.c
988
mesh_new_prefetch(worker->env.mesh, qinfo, flags, leeway +
usr.sbin/unbound/daemon/worker.h
130
struct module_env env;
usr.sbin/unbound/dns64/dns64.c
1012
!dns_cache_store(super->env, &super->qinfo, super->return_msg->rep,
usr.sbin/unbound/dns64/dns64.c
1039
dns64_get_mem(struct module_env* env, int id)
usr.sbin/unbound/dns64/dns64.c
1041
struct dns64_env* dns64_env = (struct dns64_env*)env->modinfo[id];
usr.sbin/unbound/dns64/dns64.c
403
dns64_init(struct module_env* env, int id)
usr.sbin/unbound/dns64/dns64.c
411
env->modinfo[id] = (void*)dns64_env;
usr.sbin/unbound/dns64/dns64.c
413
if (!dns64_apply_cfg(dns64_env, env->cfg)) {
usr.sbin/unbound/dns64/dns64.c
437
dns64_deinit(struct module_env* env, int id)
usr.sbin/unbound/dns64/dns64.c
440
if (!env)
usr.sbin/unbound/dns64/dns64.c
442
dns64_env = (struct dns64_env*)env->modinfo[id];
usr.sbin/unbound/dns64/dns64.c
447
free(env->modinfo[id]);
usr.sbin/unbound/dns64/dns64.c
448
env->modinfo[id] = NULL;
usr.sbin/unbound/dns64/dns64.c
463
struct dns64_env* dns64_env = (struct dns64_env*)qstate->env->modinfo[id];
usr.sbin/unbound/dns64/dns64.c
499
fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
usr.sbin/unbound/dns64/dns64.c
500
if(!(*qstate->env->attach_sub)(qstate, &qinfo, qstate->client_info,
usr.sbin/unbound/dns64/dns64.c
525
fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
usr.sbin/unbound/dns64/dns64.c
526
if(!(*qstate->env->attach_sub)(qstate, &qinfo, qstate->client_info,
usr.sbin/unbound/dns64/dns64.c
552
struct dns64_env* dns64_env = (struct dns64_env*)qstate->env->modinfo[id];
usr.sbin/unbound/dns64/dns64.c
577
int synth_all_cfg = qstate->env->cfg->dns64_synthall;
usr.sbin/unbound/dns64/dns64.c
660
qstate->env, &qstate->qinfo, qstate->return_msg->rep,
usr.sbin/unbound/dns64/dns64.c
823
struct dns64_env* dns64_env = (struct dns64_env*)super->env->modinfo[id];
usr.sbin/unbound/dns64/dns64.c
878
rrset_cache_remove(super->env->rrset_cache, dk->rk.dname,
usr.sbin/unbound/dns64/dns64.c
884
msg_cache_remove(super->env, dk->rk.dname,
usr.sbin/unbound/dns64/dns64.h
53
int dns64_init(struct module_env* env, int id);
usr.sbin/unbound/dns64/dns64.h
56
void dns64_deinit(struct module_env* env, int id);
usr.sbin/unbound/dns64/dns64.h
69
size_t dns64_get_mem(struct module_env* env, int id);
usr.sbin/unbound/dnscrypt/dnscrypt.c
1009
lock_basic_unlock(&env->shared_secrets_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
1010
if(!env->shared_secrets_cache){
usr.sbin/unbound/dnscrypt/dnscrypt.c
1013
lock_basic_lock(&env->nonces_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
1014
env->nonces_cache = slabhash_create(
usr.sbin/unbound/dnscrypt/dnscrypt.c
1024
lock_basic_unlock(&env->nonces_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
1029
dnsc_delete(struct dnsc_env *env)
usr.sbin/unbound/dnscrypt/dnscrypt.c
1031
if(!env) {
usr.sbin/unbound/dnscrypt/dnscrypt.c
1035
sodium_free(env->signed_certs);
usr.sbin/unbound/dnscrypt/dnscrypt.c
1036
sodium_free(env->rotated_certs);
usr.sbin/unbound/dnscrypt/dnscrypt.c
1037
sodium_free(env->certs);
usr.sbin/unbound/dnscrypt/dnscrypt.c
1038
sodium_free(env->keypairs);
usr.sbin/unbound/dnscrypt/dnscrypt.c
1039
lock_basic_destroy(&env->shared_secrets_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
1040
lock_basic_destroy(&env->nonces_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
1041
slabhash_delete(env->shared_secrets_cache);
usr.sbin/unbound/dnscrypt/dnscrypt.c
1042
slabhash_delete(env->nonces_cache);
usr.sbin/unbound/dnscrypt/dnscrypt.c
1043
free(env);
usr.sbin/unbound/dnscrypt/dnscrypt.c
244
dnscrypt_server_uncurve(struct dnsc_env* env,
usr.sbin/unbound/dnscrypt/dnscrypt.c
273
lock_basic_lock(&env->nonces_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
275
env->nonces_cache,
usr.sbin/unbound/dnscrypt/dnscrypt.c
283
env->num_query_dnscrypt_replay++;
usr.sbin/unbound/dnscrypt/dnscrypt.c
284
lock_basic_unlock(&env->nonces_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
289
env->nonces_cache,
usr.sbin/unbound/dnscrypt/dnscrypt.c
294
lock_basic_unlock(&env->nonces_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
301
entry = dnsc_shared_secrets_lookup(env->shared_secrets_cache,
usr.sbin/unbound/dnscrypt/dnscrypt.c
306
lock_basic_lock(&env->shared_secrets_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
307
env->num_query_dnscrypt_secret_missed_cache++;
usr.sbin/unbound/dnscrypt/dnscrypt.c
308
lock_basic_unlock(&env->shared_secrets_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
327
dnsc_shared_secret_cache_insert(env->shared_secrets_cache,
usr.sbin/unbound/dnscrypt/dnscrypt.c
586
dnsc_parse_certs(struct dnsc_env *env, struct config_file *cfg)
usr.sbin/unbound/dnscrypt/dnscrypt.c
593
env->signed_certs_count = 0U;
usr.sbin/unbound/dnscrypt/dnscrypt.c
594
env->rotated_certs_count = 0U;
usr.sbin/unbound/dnscrypt/dnscrypt.c
596
env->signed_certs_count++;
usr.sbin/unbound/dnscrypt/dnscrypt.c
599
env->rotated_certs_count++;
usr.sbin/unbound/dnscrypt/dnscrypt.c
601
env->signed_certs = sodium_allocarray(env->signed_certs_count,
usr.sbin/unbound/dnscrypt/dnscrypt.c
602
sizeof *env->signed_certs);
usr.sbin/unbound/dnscrypt/dnscrypt.c
604
env->rotated_certs = sodium_allocarray(env->rotated_certs_count,
usr.sbin/unbound/dnscrypt/dnscrypt.c
605
sizeof env->signed_certs);
usr.sbin/unbound/dnscrypt/dnscrypt.c
612
(char *)(env->signed_certs + signed_cert_id),
usr.sbin/unbound/dnscrypt/dnscrypt.c
618
*(env->rotated_certs + rotated_cert_id) = env->signed_certs + signed_cert_id;
usr.sbin/unbound/dnscrypt/dnscrypt.c
802
dnsc_parse_keys(struct dnsc_env *env, struct config_file *cfg)
usr.sbin/unbound/dnscrypt/dnscrypt.c
809
env->keypairs_count = 0U;
usr.sbin/unbound/dnscrypt/dnscrypt.c
811
env->keypairs_count++;
usr.sbin/unbound/dnscrypt/dnscrypt.c
814
env->keypairs = sodium_allocarray(env->keypairs_count,
usr.sbin/unbound/dnscrypt/dnscrypt.c
815
sizeof *env->keypairs);
usr.sbin/unbound/dnscrypt/dnscrypt.c
816
env->certs = sodium_allocarray(env->signed_certs_count,
usr.sbin/unbound/dnscrypt/dnscrypt.c
817
sizeof *env->certs);
usr.sbin/unbound/dnscrypt/dnscrypt.c
818
memset(env->certs, 0, env->signed_certs_count * sizeof(*env->certs));
usr.sbin/unbound/dnscrypt/dnscrypt.c
825
KeyPair *current_keypair = &env->keypairs[keypair_id];
usr.sbin/unbound/dnscrypt/dnscrypt.c
841
for(c = 0; c < env->signed_certs_count; c++) {
usr.sbin/unbound/dnscrypt/dnscrypt.c
843
env->signed_certs[c].server_publickey,
usr.sbin/unbound/dnscrypt/dnscrypt.c
845
dnsccert *current_cert = &env->certs[cert_id++];
usr.sbin/unbound/dnscrypt/dnscrypt.c
849
env->signed_certs[c].magic_query,
usr.sbin/unbound/dnscrypt/dnscrypt.c
850
sizeof env->signed_certs[c].magic_query);
usr.sbin/unbound/dnscrypt/dnscrypt.c
852
env->signed_certs[c].version_major,
usr.sbin/unbound/dnscrypt/dnscrypt.c
853
sizeof env->signed_certs[c].version_major
usr.sbin/unbound/dnscrypt/dnscrypt.c
953
struct dnsc_env *env;
usr.sbin/unbound/dnscrypt/dnscrypt.c
960
env = (struct dnsc_env *) calloc(1, sizeof(struct dnsc_env));
usr.sbin/unbound/dnscrypt/dnscrypt.c
961
lock_basic_init(&env->shared_secrets_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
962
lock_protect(&env->shared_secrets_cache_lock,
usr.sbin/unbound/dnscrypt/dnscrypt.c
963
&env->num_query_dnscrypt_secret_missed_cache,
usr.sbin/unbound/dnscrypt/dnscrypt.c
964
sizeof(env->num_query_dnscrypt_secret_missed_cache));
usr.sbin/unbound/dnscrypt/dnscrypt.c
965
lock_basic_init(&env->nonces_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
966
lock_protect(&env->nonces_cache_lock,
usr.sbin/unbound/dnscrypt/dnscrypt.c
967
&env->nonces_cache,
usr.sbin/unbound/dnscrypt/dnscrypt.c
968
sizeof(env->nonces_cache));
usr.sbin/unbound/dnscrypt/dnscrypt.c
969
lock_protect(&env->nonces_cache_lock,
usr.sbin/unbound/dnscrypt/dnscrypt.c
970
&env->num_query_dnscrypt_replay,
usr.sbin/unbound/dnscrypt/dnscrypt.c
971
sizeof(env->num_query_dnscrypt_replay));
usr.sbin/unbound/dnscrypt/dnscrypt.c
973
return env;
usr.sbin/unbound/dnscrypt/dnscrypt.c
977
dnsc_apply_cfg(struct dnsc_env *env, struct config_file *cfg)
usr.sbin/unbound/dnscrypt/dnscrypt.c
980
if(dnsc_parse_certs(env, cfg) <= 0) {
usr.sbin/unbound/dnscrypt/dnscrypt.c
983
nkeys = dnsc_parse_keys(env, cfg);
usr.sbin/unbound/dnscrypt/dnscrypt.c
987
if((size_t)nkeys < env->signed_certs_count) {
usr.sbin/unbound/dnscrypt/dnscrypt.c
990
(unsigned)(env->signed_certs_count - (size_t)nkeys));
usr.sbin/unbound/dnscrypt/dnscrypt.c
992
randombytes_buf(env->hash_key, sizeof env->hash_key);
usr.sbin/unbound/dnscrypt/dnscrypt.c
993
env->provider_name = cfg->dnscrypt_provider;
usr.sbin/unbound/dnscrypt/dnscrypt.c
995
if(dnsc_load_local_data(env, cfg) <= 0) {
usr.sbin/unbound/dnscrypt/dnscrypt.c
998
lock_basic_lock(&env->shared_secrets_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
999
env->shared_secrets_cache = slabhash_create(
usr.sbin/unbound/dnscrypt/dnscrypt.h
107
int dnsc_apply_cfg(struct dnsc_env *env, struct config_file *cfg);
usr.sbin/unbound/dnscrypt/dnscrypt.h
113
void dnsc_delete(struct dnsc_env *env);
usr.sbin/unbound/dnstap/dnstap.c
103
env->sample_rate_count = 0;
usr.sbin/unbound/dnstap/dnstap.c
106
env->sample_rate_count++;
usr.sbin/unbound/dnstap/dnstap.c
107
lock_basic_unlock(&env->sample_lock);
usr.sbin/unbound/dnstap/dnstap.c
110
lock_basic_unlock(&env->sample_lock);
usr.sbin/unbound/dnstap/dnstap.c
115
dt_send(const struct dt_env *env, void *buf, size_t len_buf)
usr.sbin/unbound/dnstap/dnstap.c
117
dt_msg_queue_submit(env->msgqueue, buf, len_buf);
usr.sbin/unbound/dnstap/dnstap.c
121
dt_msg_init(const struct dt_env *env,
usr.sbin/unbound/dnstap/dnstap.c
131
if (env->identity != NULL) {
usr.sbin/unbound/dnstap/dnstap.c
132
dm->d.identity.data = (uint8_t *) env->identity;
usr.sbin/unbound/dnstap/dnstap.c
133
dm->d.identity.len = (size_t) env->len_identity;
usr.sbin/unbound/dnstap/dnstap.c
136
if (env->version != NULL) {
usr.sbin/unbound/dnstap/dnstap.c
137
dm->d.version.data = (uint8_t *) env->version;
usr.sbin/unbound/dnstap/dnstap.c
138
dm->d.version.len = (size_t) env->len_version;
usr.sbin/unbound/dnstap/dnstap.c
158
struct dt_env *env;
usr.sbin/unbound/dnstap/dnstap.c
171
env = (struct dt_env *) calloc(1, sizeof(struct dt_env));
usr.sbin/unbound/dnstap/dnstap.c
172
if (!env)
usr.sbin/unbound/dnstap/dnstap.c
174
lock_basic_init(&env->sample_lock);
usr.sbin/unbound/dnstap/dnstap.c
176
env->dtio = dt_io_thread_create();
usr.sbin/unbound/dnstap/dnstap.c
177
if(!env->dtio) {
usr.sbin/unbound/dnstap/dnstap.c
179
free(env);
usr.sbin/unbound/dnstap/dnstap.c
182
if(!dt_io_thread_apply_cfg(env->dtio, cfg)) {
usr.sbin/unbound/dnstap/dnstap.c
183
dt_io_thread_delete(env->dtio);
usr.sbin/unbound/dnstap/dnstap.c
184
free(env);
usr.sbin/unbound/dnstap/dnstap.c
187
dt_apply_cfg(env, cfg);
usr.sbin/unbound/dnstap/dnstap.c
188
return env;
usr.sbin/unbound/dnstap/dnstap.c
192
dt_apply_identity(struct dt_env *env, struct config_file *cfg)
usr.sbin/unbound/dnstap/dnstap.c
196
free(env->identity);
usr.sbin/unbound/dnstap/dnstap.c
197
env->identity = NULL;
usr.sbin/unbound/dnstap/dnstap.c
200
free(env->identity);
usr.sbin/unbound/dnstap/dnstap.c
204
env->identity = strdup(buf);
usr.sbin/unbound/dnstap/dnstap.c
209
env->identity = strdup(cfg->dnstap_identity);
usr.sbin/unbound/dnstap/dnstap.c
211
if (env->identity == NULL)
usr.sbin/unbound/dnstap/dnstap.c
213
env->len_identity = (unsigned int)strlen(env->identity);
usr.sbin/unbound/dnstap/dnstap.c
215
env->identity);
usr.sbin/unbound/dnstap/dnstap.c
219
dt_apply_version(struct dt_env *env, struct config_file *cfg)
usr.sbin/unbound/dnstap/dnstap.c
222
free(env->version);
usr.sbin/unbound/dnstap/dnstap.c
223
env->version = NULL;
usr.sbin/unbound/dnstap/dnstap.c
226
free(env->version);
usr.sbin/unbound/dnstap/dnstap.c
228
env->version = strdup(PACKAGE_STRING);
usr.sbin/unbound/dnstap/dnstap.c
230
env->version = strdup(cfg->dnstap_version);
usr.sbin/unbound/dnstap/dnstap.c
231
if (env->version == NULL)
usr.sbin/unbound/dnstap/dnstap.c
233
env->len_version = (unsigned int)strlen(env->version);
usr.sbin/unbound/dnstap/dnstap.c
235
env->version);
usr.sbin/unbound/dnstap/dnstap.c
239
dt_apply_logcfg(struct dt_env *env, struct config_file *cfg)
usr.sbin/unbound/dnstap/dnstap.c
241
if ((env->log_resolver_query_messages = (unsigned int)
usr.sbin/unbound/dnstap/dnstap.c
246
if ((env->log_resolver_response_messages = (unsigned int)
usr.sbin/unbound/dnstap/dnstap.c
251
if ((env->log_client_query_messages = (unsigned int)
usr.sbin/unbound/dnstap/dnstap.c
256
if ((env->log_client_response_messages = (unsigned int)
usr.sbin/unbound/dnstap/dnstap.c
261
if ((env->log_forwarder_query_messages = (unsigned int)
usr.sbin/unbound/dnstap/dnstap.c
266
if ((env->log_forwarder_response_messages = (unsigned int)
usr.sbin/unbound/dnstap/dnstap.c
271
lock_basic_lock(&env->sample_lock);
usr.sbin/unbound/dnstap/dnstap.c
272
if((env->sample_rate = (unsigned int)cfg->dnstap_sample_rate))
usr.sbin/unbound/dnstap/dnstap.c
274
verbose(VERB_OPS, "dnstap SAMPLE_RATE enabled and set to \"%d\"", (int)env->sample_rate);
usr.sbin/unbound/dnstap/dnstap.c
276
lock_basic_unlock(&env->sample_lock);
usr.sbin/unbound/dnstap/dnstap.c
280
dt_apply_cfg(struct dt_env *env, struct config_file *cfg)
usr.sbin/unbound/dnstap/dnstap.c
285
dt_apply_identity(env, cfg);
usr.sbin/unbound/dnstap/dnstap.c
286
dt_apply_version(env, cfg);
usr.sbin/unbound/dnstap/dnstap.c
287
dt_apply_logcfg(env, cfg);
usr.sbin/unbound/dnstap/dnstap.c
291
dt_init(struct dt_env *env, struct comm_base* base)
usr.sbin/unbound/dnstap/dnstap.c
293
env->msgqueue = dt_msg_queue_create(base);
usr.sbin/unbound/dnstap/dnstap.c
294
if(!env->msgqueue) {
usr.sbin/unbound/dnstap/dnstap.c
298
if(!dt_io_thread_register_queue(env->dtio, env->msgqueue)) {
usr.sbin/unbound/dnstap/dnstap.c
300
dt_msg_queue_delete(env->msgqueue);
usr.sbin/unbound/dnstap/dnstap.c
301
env->msgqueue = NULL;
usr.sbin/unbound/dnstap/dnstap.c
308
dt_deinit(struct dt_env* env)
usr.sbin/unbound/dnstap/dnstap.c
310
dt_io_thread_unregister_queue(env->dtio, env->msgqueue);
usr.sbin/unbound/dnstap/dnstap.c
311
dt_msg_queue_delete(env->msgqueue);
usr.sbin/unbound/dnstap/dnstap.c
315
dt_delete(struct dt_env *env)
usr.sbin/unbound/dnstap/dnstap.c
317
if (!env)
usr.sbin/unbound/dnstap/dnstap.c
319
dt_io_thread_delete(env->dtio);
usr.sbin/unbound/dnstap/dnstap.c
320
lock_basic_destroy(&env->sample_lock);
usr.sbin/unbound/dnstap/dnstap.c
321
free(env->identity);
usr.sbin/unbound/dnstap/dnstap.c
322
free(env->version);
usr.sbin/unbound/dnstap/dnstap.c
323
free(env);
usr.sbin/unbound/dnstap/dnstap.c
446
dt_msg_send_client_query(struct dt_env *env,
usr.sbin/unbound/dnstap/dnstap.c
457
if(dt_sample_rate_limited(env))
usr.sbin/unbound/dnstap/dnstap.c
465
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__CLIENT_QUERY);
usr.sbin/unbound/dnstap/dnstap.c
484
dt_send(env, dm.buf, dm.len_buf);
usr.sbin/unbound/dnstap/dnstap.c
488
dt_msg_send_client_response(struct dt_env *env,
usr.sbin/unbound/dnstap/dnstap.c
498
if(dt_sample_rate_limited(env))
usr.sbin/unbound/dnstap/dnstap.c
504
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__CLIENT_RESPONSE);
usr.sbin/unbound/dnstap/dnstap.c
522
dt_send(env, dm.buf, dm.len_buf);
usr.sbin/unbound/dnstap/dnstap.c
526
dt_msg_send_outside_query(struct dt_env *env,
usr.sbin/unbound/dnstap/dnstap.c
538
if(dt_sample_rate_limited(env))
usr.sbin/unbound/dnstap/dnstap.c
546
if (!env->log_forwarder_query_messages)
usr.sbin/unbound/dnstap/dnstap.c
548
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__FORWARDER_QUERY);
usr.sbin/unbound/dnstap/dnstap.c
550
if (!env->log_resolver_query_messages)
usr.sbin/unbound/dnstap/dnstap.c
552
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__RESOLVER_QUERY);
usr.sbin/unbound/dnstap/dnstap.c
576
dt_send(env, dm.buf, dm.len_buf);
usr.sbin/unbound/dnstap/dnstap.c
580
dt_msg_send_outside_response(struct dt_env *env,
usr.sbin/unbound/dnstap/dnstap.c
594
if(dt_sample_rate_limited(env))
usr.sbin/unbound/dnstap/dnstap.c
603
if (!env->log_forwarder_response_messages)
usr.sbin/unbound/dnstap/dnstap.c
605
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__FORWARDER_RESPONSE);
usr.sbin/unbound/dnstap/dnstap.c
607
if (!env->log_resolver_response_messages)
usr.sbin/unbound/dnstap/dnstap.c
609
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__RESOLVER_RESPONSE);
usr.sbin/unbound/dnstap/dnstap.c
638
dt_send(env, dm.buf, dm.len_buf);
usr.sbin/unbound/dnstap/dnstap.c
91
dt_sample_rate_limited(struct dt_env* env)
usr.sbin/unbound/dnstap/dnstap.c
93
lock_basic_lock(&env->sample_lock);
usr.sbin/unbound/dnstap/dnstap.c
95
if(env->sample_rate > 1) {
usr.sbin/unbound/dnstap/dnstap.c
98
if (env->sample_rate_count > env->sample_rate) {
usr.sbin/unbound/dnstap/dnstap.h
107
dt_apply_cfg(struct dt_env *env, struct config_file *cfg);
usr.sbin/unbound/dnstap/dnstap.h
114
void dt_apply_logcfg(struct dt_env *env, struct config_file *cfg);
usr.sbin/unbound/dnstap/dnstap.h
123
dt_init(struct dt_env *env, struct comm_base* base);
usr.sbin/unbound/dnstap/dnstap.h
128
void dt_deinit(struct dt_env *env);
usr.sbin/unbound/dnstap/dnstap.h
135
dt_delete(struct dt_env *env);
usr.sbin/unbound/dnstap/dnstap.h
147
dt_msg_send_client_query(struct dt_env *env,
usr.sbin/unbound/dnstap/dnstap.h
164
dt_msg_send_client_response(struct dt_env *env,
usr.sbin/unbound/dnstap/dnstap.h
184
dt_msg_send_outside_query(struct dt_env *env,
usr.sbin/unbound/dnstap/dnstap.h
209
dt_msg_send_outside_response(struct dt_env *env,
usr.sbin/unbound/dynlibmod/dynlibmod.c
163
return de->func_init(env, id);
usr.sbin/unbound/dynlibmod/dynlibmod.c
167
void dynlibmod_deinit(struct module_env* env, int id) {
usr.sbin/unbound/dynlibmod/dynlibmod.c
168
struct dynlibmod_env* de = env->modinfo[id];
usr.sbin/unbound/dynlibmod/dynlibmod.c
171
de->func_deinit(env, id);
usr.sbin/unbound/dynlibmod/dynlibmod.c
181
struct dynlibmod_env* de = qstate->env->modinfo[id];
usr.sbin/unbound/dynlibmod/dynlibmod.c
189
struct dynlibmod_env* de = qstate->env->modinfo[id];
usr.sbin/unbound/dynlibmod/dynlibmod.c
196
struct dynlibmod_env* de = qstate->env->modinfo[id];
usr.sbin/unbound/dynlibmod/dynlibmod.c
202
size_t dynlibmod_get_mem(struct module_env* env, int id) {
usr.sbin/unbound/dynlibmod/dynlibmod.c
203
struct dynlibmod_env* de = (struct dynlibmod_env*)env->modinfo[id];
usr.sbin/unbound/dynlibmod/dynlibmod.c
209
size = de->func_get_mem(env, id);
usr.sbin/unbound/dynlibmod/dynlibmod.c
244
struct module_env* env, int id) {
usr.sbin/unbound/dynlibmod/dynlibmod.c
253
return inplace_cb_register(&dynlib_inplace_cb_reply_generic, type, (void*) cb_pair, env, id);
usr.sbin/unbound/dynlibmod/dynlibmod.c
255
return inplace_cb_register(&dynlib_inplace_cb_query_generic, type, (void*) cb_pair, env, id);
usr.sbin/unbound/dynlibmod/dynlibmod.c
257
return inplace_cb_register(&dynlib_inplace_cb_query_response, type, (void*) cb_pair, env, id);
usr.sbin/unbound/dynlibmod/dynlibmod.c
259
return inplace_cb_register(&dynlib_inplace_cb_edns_back_parsed, type, (void*) cb_pair, env, id);
usr.sbin/unbound/dynlibmod/dynlibmod.c
267
inplace_cb_delete_wrapped(struct module_env* env, enum inplace_cb_list_type type,
usr.sbin/unbound/dynlibmod/dynlibmod.c
269
struct inplace_cb* temp = env->inplace_cb_lists[type];
usr.sbin/unbound/dynlibmod/dynlibmod.c
275
env->inplace_cb_lists[type] = temp->next;
usr.sbin/unbound/dynlibmod/dynlibmod.c
278
temp = env->inplace_cb_lists[type];
usr.sbin/unbound/dynlibmod/dynlibmod.c
73
int dynlibmod_init(struct module_env* env, int id) {
usr.sbin/unbound/dynlibmod/dynlibmod.c
75
struct config_strlist* cfg_item = env->cfg->dynlib_file;
usr.sbin/unbound/dynlibmod/dynlibmod.c
85
env->modinfo[id] = (void*) de;
usr.sbin/unbound/dynlibmod/dynlibmod.h
51
int dynlibmod_init(struct module_env* env, int id);
usr.sbin/unbound/dynlibmod/dynlibmod.h
54
void dynlibmod_deinit(struct module_env* env, int id);
usr.sbin/unbound/dynlibmod/dynlibmod.h
68
size_t dynlibmod_get_mem(struct module_env* env, int id);
usr.sbin/unbound/dynlibmod/dynlibmod.h
89
struct module_env* env, int id);
usr.sbin/unbound/dynlibmod/dynlibmod.h
92
inplace_cb_delete_wrapped(struct module_env* env, enum inplace_cb_list_type type,
usr.sbin/unbound/dynlibmod/examples/helloworld.c
102
struct dynlibmod_env* env = qstate->env->modinfo[id];
usr.sbin/unbound/dynlibmod/examples/helloworld.c
103
if (env->dyn_env != NULL) {
usr.sbin/unbound/dynlibmod/examples/helloworld.c
104
free(env->dyn_env);
usr.sbin/unbound/dynlibmod/examples/helloworld.c
105
env->dyn_env = NULL;
usr.sbin/unbound/dynlibmod/examples/helloworld.c
111
EXPORT size_t get_mem(struct module_env* env, int id) {
usr.sbin/unbound/dynlibmod/examples/helloworld.c
124
struct dynlibmod_env* env = qstate->env->modinfo[id];
usr.sbin/unbound/dynlibmod/examples/helloworld.c
125
if (env->dyn_env != NULL) {
usr.sbin/unbound/dynlibmod/examples/helloworld.c
127
((int *)env->dyn_env)[0],
usr.sbin/unbound/dynlibmod/examples/helloworld.c
128
((int *)env->dyn_env)[1],
usr.sbin/unbound/dynlibmod/examples/helloworld.c
129
((int *)env->dyn_env)[2]);
usr.sbin/unbound/dynlibmod/examples/helloworld.c
40
EXPORT int init(struct module_env* env, int id) {
usr.sbin/unbound/dynlibmod/examples/helloworld.c
42
struct dynlibmod_env* de = (struct dynlibmod_env*) env->modinfo[id];
usr.sbin/unbound/dynlibmod/examples/helloworld.c
45
NULL, env, id);
usr.sbin/unbound/dynlibmod/examples/helloworld.c
46
struct dynlibmod_env* local_env = env->modinfo[id];
usr.sbin/unbound/dynlibmod/examples/helloworld.c
53
EXPORT void deinit(struct module_env* env, int id) {
usr.sbin/unbound/dynlibmod/examples/helloworld.c
55
struct dynlibmod_env* de = (struct dynlibmod_env*) env->modinfo[id];
usr.sbin/unbound/dynlibmod/examples/helloworld.c
56
de->inplace_cb_delete_wrapped(env, inplace_cb_reply, id);
usr.sbin/unbound/dynlibmod/examples/helloworld.c
73
struct dynlibmod_env* env = qstate->env->modinfo[id];
usr.sbin/unbound/dynlibmod/examples/helloworld.c
74
if (env->dyn_env == NULL) {
usr.sbin/unbound/dynlibmod/examples/helloworld.c
75
env->dyn_env = calloc(3, sizeof(int));
usr.sbin/unbound/dynlibmod/examples/helloworld.c
76
((int *)env->dyn_env)[0] = 42;
usr.sbin/unbound/dynlibmod/examples/helloworld.c
77
((int *)env->dyn_env)[1] = 102;
usr.sbin/unbound/dynlibmod/examples/helloworld.c
78
((int *)env->dyn_env)[2] = 192;
usr.sbin/unbound/edns-subnet/addrtree.c
123
size_t (*sizefunc)(void *), void *env, uint32_t max_node_count)
usr.sbin/unbound/edns-subnet/addrtree.c
142
tree->env = env;
usr.sbin/unbound/edns-subnet/addrtree.c
158
tree->delfunc(tree->env, node->elem);
usr.sbin/unbound/edns-subnet/addrtree.h
144
size_t (*sizefunc)(void *), void *env, uint32_t max_node_count);
usr.sbin/unbound/edns-subnet/addrtree.h
81
void *env;
usr.sbin/unbound/edns-subnet/subnetmod.c
1003
qstate->env->cfg->client_subnet_opcode)) {
usr.sbin/unbound/edns-subnet/subnetmod.c
1040
qstate->env->cfg->client_subnet_opcode))) {
usr.sbin/unbound/edns-subnet/subnetmod.c
1054
&sq->ecs_client_in, qstate->env->cfg);
usr.sbin/unbound/edns-subnet/subnetmod.c
1059
&sq->ecs_client_in, qstate->env->cfg);
usr.sbin/unbound/edns-subnet/subnetmod.c
1067
qstate->env->cfg->client_subnet_opcode)) {
usr.sbin/unbound/edns-subnet/subnetmod.c
1082
sq->ecs_client_in.subnet_source_mask < qstate->env->cfg->min_client_subnet_ipv4) ||
usr.sbin/unbound/edns-subnet/subnetmod.c
1084
sq->ecs_client_in.subnet_source_mask < qstate->env->cfg->min_client_subnet_ipv6))) {
usr.sbin/unbound/edns-subnet/subnetmod.c
1094
qstate->env->cfg->prefetch)) {
usr.sbin/unbound/edns-subnet/subnetmod.c
1107
qstate->env->cfg->
usr.sbin/unbound/edns-subnet/subnetmod.c
1116
qstate->env->cfg->client_subnet_opcode)) {
usr.sbin/unbound/edns-subnet/subnetmod.c
1130
qstate->env->cfg->max_client_subnet_ipv4)
usr.sbin/unbound/edns-subnet/subnetmod.c
1132
qstate->env->cfg->max_client_subnet_ipv4;
usr.sbin/unbound/edns-subnet/subnetmod.c
1135
qstate->env->cfg->max_client_subnet_ipv6)
usr.sbin/unbound/edns-subnet/subnetmod.c
1137
qstate->env->cfg->max_client_subnet_ipv6;
usr.sbin/unbound/edns-subnet/subnetmod.c
114
sldns_buffer* buf = qstate->env->scratch_buffer;
usr.sbin/unbound/edns-subnet/subnetmod.c
1146
qstate->env->cfg->client_subnet_always_forward &&
usr.sbin/unbound/edns-subnet/subnetmod.c
1172
qstate->env->cfg->
usr.sbin/unbound/edns-subnet/subnetmod.c
1232
subnetmod_get_mem(struct module_env *env, int id)
usr.sbin/unbound/edns-subnet/subnetmod.c
1234
struct subnet_env *sn_env = env->modinfo[id];
usr.sbin/unbound/edns-subnet/subnetmod.c
141
qstate->env->cfg->client_subnet_opcode,
usr.sbin/unbound/edns-subnet/subnetmod.c
158
sn_env = (struct subnet_env*)qstate->env->modinfo[id];
usr.sbin/unbound/edns-subnet/subnetmod.c
191
qstate->env->cfg->client_subnet_always_forward) ||
usr.sbin/unbound/edns-subnet/subnetmod.c
199
qstate->env->cfg->client_subnet_opcode)) {
usr.sbin/unbound/edns-subnet/subnetmod.c
223
qstate->env->cfg->client_subnet_opcode)) {
usr.sbin/unbound/edns-subnet/subnetmod.c
225
qstate->env->cfg->client_subnet_opcode);
usr.sbin/unbound/edns-subnet/subnetmod.c
242
subnetmod_init(struct module_env *env, int id)
usr.sbin/unbound/edns-subnet/subnetmod.c
251
env->modinfo[id] = (void*)sn_env;
usr.sbin/unbound/edns-subnet/subnetmod.c
255
if(env->cfg->serve_expired)
usr.sbin/unbound/edns-subnet/subnetmod.c
259
if(env->cfg->prefetch)
usr.sbin/unbound/edns-subnet/subnetmod.c
264
sn_env->subnet_msg_cache = slabhash_create(env->cfg->msg_cache_slabs,
usr.sbin/unbound/edns-subnet/subnetmod.c
265
HASH_DEFAULT_STARTARRAY, env->cfg->msg_cache_size,
usr.sbin/unbound/edns-subnet/subnetmod.c
271
env->modinfo[id] = NULL;
usr.sbin/unbound/edns-subnet/subnetmod.c
278
!ecs_whitelist_apply_cfg(sn_env->whitelist, env->cfg)) {
usr.sbin/unbound/edns-subnet/subnetmod.c
282
env->modinfo[id] = NULL;
usr.sbin/unbound/edns-subnet/subnetmod.c
287
env->cfg->client_subnet_opcode);
usr.sbin/unbound/edns-subnet/subnetmod.c
289
env->unique_mesh = 1;
usr.sbin/unbound/edns-subnet/subnetmod.c
290
if(!edns_register_option(env->cfg->client_subnet_opcode,
usr.sbin/unbound/edns-subnet/subnetmod.c
291
env->cfg->client_subnet_always_forward /* bypass cache */,
usr.sbin/unbound/edns-subnet/subnetmod.c
292
1 /* no aggregation */, env)) {
usr.sbin/unbound/edns-subnet/subnetmod.c
297
env->modinfo[id] = NULL;
usr.sbin/unbound/edns-subnet/subnetmod.c
301
env, id);
usr.sbin/unbound/edns-subnet/subnetmod.c
303
inplace_cb_edns_back_parsed, NULL, env, id);
usr.sbin/unbound/edns-subnet/subnetmod.c
305
inplace_cb_query_response, NULL, env, id);
usr.sbin/unbound/edns-subnet/subnetmod.c
311
subnetmod_deinit(struct module_env *env, int id)
usr.sbin/unbound/edns-subnet/subnetmod.c
314
if(!env || !env->modinfo[id])
usr.sbin/unbound/edns-subnet/subnetmod.c
316
sn_env = (struct subnet_env*)env->modinfo[id];
usr.sbin/unbound/edns-subnet/subnetmod.c
318
inplace_cb_delete(env, inplace_cb_edns_back_parsed, id);
usr.sbin/unbound/edns-subnet/subnetmod.c
319
inplace_cb_delete(env, inplace_cb_query, id);
usr.sbin/unbound/edns-subnet/subnetmod.c
320
inplace_cb_delete(env, inplace_cb_query_response, id);
usr.sbin/unbound/edns-subnet/subnetmod.c
325
env->modinfo[id] = NULL;
usr.sbin/unbound/edns-subnet/subnetmod.c
342
struct subnet_env *env = (struct subnet_env *)envptr;
usr.sbin/unbound/edns-subnet/subnetmod.c
343
reply_info_parsedelete(elem, &env->alloc);
usr.sbin/unbound/edns-subnet/subnetmod.c
369
struct subnet_env *env, struct config_file* cfg)
usr.sbin/unbound/edns-subnet/subnetmod.c
376
&sizefunc, env, cfg->max_ecs_tree_size_ipv4);
usr.sbin/unbound/edns-subnet/subnetmod.c
382
&sizefunc, env, cfg->max_ecs_tree_size_ipv6);
usr.sbin/unbound/edns-subnet/subnetmod.c
395
struct subnet_env *sne = qstate->env->modinfo[id];
usr.sbin/unbound/edns-subnet/subnetmod.c
442
data->ttl_servfail = *qstate->env->now + NORR_TTL;
usr.sbin/unbound/edns-subnet/subnetmod.c
469
if (!(tree = get_tree(lru_entry->data, edns, sne, qstate->env->cfg))) {
usr.sbin/unbound/edns-subnet/subnetmod.c
488
reply_info_set_ttls(rep, *qstate->env->now);
usr.sbin/unbound/edns-subnet/subnetmod.c
498
rep->ttl, *qstate->env->now, only_match_scope_zero);
usr.sbin/unbound/edns-subnet/subnetmod.c
516
struct module_env *env = qstate->env;
usr.sbin/unbound/edns-subnet/subnetmod.c
519
if(!data->ttl_servfail || TTL_IS_EXPIRED(data->ttl_servfail, *env->now))
usr.sbin/unbound/edns-subnet/subnetmod.c
531
struct module_env *env = qstate->env;
usr.sbin/unbound/edns-subnet/subnetmod.c
532
struct subnet_env *sne = (struct subnet_env*)env->modinfo[id];
usr.sbin/unbound/edns-subnet/subnetmod.c
540
|| qstate->env->cfg->ignore_cd) && qstate->env->need_to_validate;
usr.sbin/unbound/edns-subnet/subnetmod.c
562
ecs->subnet_source_mask, *env->now);
usr.sbin/unbound/edns-subnet/subnetmod.c
573
(struct reply_info *)node->elem, qstate->region, *env->now, 0,
usr.sbin/unbound/edns-subnet/subnetmod.c
574
env->scratch);
usr.sbin/unbound/edns-subnet/subnetmod.c
603
if (prefetch && *qstate->env->now >= ((struct reply_info *)node->elem)->prefetch_ttl) {
usr.sbin/unbound/edns-subnet/subnetmod.c
654
fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
usr.sbin/unbound/edns-subnet/subnetmod.c
655
if(!(*qstate->env->attach_sub)(qstate, &qinf, qstate->client_info,
usr.sbin/unbound/edns-subnet/subnetmod.c
675
qstate->env->cfg->client_subnet_opcode)) {
usr.sbin/unbound/edns-subnet/subnetmod.c
708
struct subnet_env *sne = qstate->env->modinfo[id];
usr.sbin/unbound/edns-subnet/subnetmod.c
775
qstate->env->cfg->client_subnet_opcode);
usr.sbin/unbound/edns-subnet/subnetmod.c
792
if(qstate->env->cfg->serve_expired) {
usr.sbin/unbound/edns-subnet/subnetmod.c
793
msg_cache_remove(qstate->env, qstate->qinfo.qname,
usr.sbin/unbound/edns-subnet/subnetmod.c
797
if(qstate->env->cachedb_enabled)
usr.sbin/unbound/edns-subnet/subnetmod.c
812
qstate->env->cfg->max_client_subnet_ipv4) {
usr.sbin/unbound/edns-subnet/subnetmod.c
814
qstate->env->cfg->max_client_subnet_ipv4;
usr.sbin/unbound/edns-subnet/subnetmod.c
818
qstate->env->cfg->max_client_subnet_ipv6) {
usr.sbin/unbound/edns-subnet/subnetmod.c
820
qstate->env->cfg->max_client_subnet_ipv6;
usr.sbin/unbound/edns-subnet/subnetmod.c
910
qstate->env->cfg->client_subnet_opcode);
usr.sbin/unbound/edns-subnet/subnetmod.c
960
qstate->env->cfg->client_subnet_opcode)) &&
usr.sbin/unbound/edns-subnet/subnetmod.c
991
struct subnet_env *sne = qstate->env->modinfo[id];
usr.sbin/unbound/edns-subnet/subnetmod.h
135
int subnetmod_init(struct module_env* env, int id);
usr.sbin/unbound/edns-subnet/subnetmod.h
138
void subnetmod_deinit(struct module_env* env, int id);
usr.sbin/unbound/edns-subnet/subnetmod.h
152
size_t subnetmod_get_mem(struct module_env* env, int id);
usr.sbin/unbound/ipsecmod/ipsecmod.c
111
iq->enabled = qstate->env->cfg->ipsecmod_enabled;
usr.sbin/unbound/ipsecmod/ipsecmod.c
113
(struct ipsecmod_env*)qstate->env->modinfo[id], qstate->qinfo.qname,
usr.sbin/unbound/ipsecmod/ipsecmod.c
158
fptr_ok(fptr_whitelist_modenv_detect_cycle(qstate->env->detect_cycle));
usr.sbin/unbound/ipsecmod/ipsecmod.c
159
if((*qstate->env->detect_cycle)(qstate, &ask,
usr.sbin/unbound/ipsecmod/ipsecmod.c
165
fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
usr.sbin/unbound/ipsecmod/ipsecmod.c
166
if(!(*qstate->env->attach_sub)(qstate, &ask, NULL,
usr.sbin/unbound/ipsecmod/ipsecmod.c
271
w += sldns_str_print(&s, &slen, "%s", qstate->env->cfg->ipsecmod_hook);
usr.sbin/unbound/ipsecmod/ipsecmod.c
419
if(!qstate->env->cfg->ipsecmod_ignore_bogus &&
usr.sbin/unbound/ipsecmod/ipsecmod.c
428
qstate->env->cfg->ipsecmod_strict) {
usr.sbin/unbound/ipsecmod/ipsecmod.c
439
if(rrset_data->ttl > (time_t)qstate->env->cfg->ipsecmod_max_ttl) {
usr.sbin/unbound/ipsecmod/ipsecmod.c
441
rrset_data->ttl = qstate->env->cfg->ipsecmod_max_ttl;
usr.sbin/unbound/ipsecmod/ipsecmod.c
443
rrset_data->rr_ttl[i] = qstate->env->cfg->ipsecmod_max_ttl;
usr.sbin/unbound/ipsecmod/ipsecmod.c
445
if(qstate->return_msg->rep->ttl > (time_t)qstate->env->cfg->ipsecmod_max_ttl) {
usr.sbin/unbound/ipsecmod/ipsecmod.c
447
qstate->env->cfg->ipsecmod_max_ttl;
usr.sbin/unbound/ipsecmod/ipsecmod.c
451
qstate->env->cfg->serve_expired_ttl;
usr.sbin/unbound/ipsecmod/ipsecmod.c
457
if(!dns_cache_store(qstate->env, &qstate->qinfo,
usr.sbin/unbound/ipsecmod/ipsecmod.c
516
struct ipsecmod_env* ie = (struct ipsecmod_env*)qstate->env->modinfo[id];
usr.sbin/unbound/ipsecmod/ipsecmod.c
606
ipsecmod_get_mem(struct module_env* env, int id)
usr.sbin/unbound/ipsecmod/ipsecmod.c
608
struct ipsecmod_env* ie = (struct ipsecmod_env*)env->modinfo[id];
usr.sbin/unbound/ipsecmod/ipsecmod.c
70
ipsecmod_init(struct module_env* env, int id)
usr.sbin/unbound/ipsecmod/ipsecmod.c
78
env->modinfo[id] = (void*)ipsecmod_env;
usr.sbin/unbound/ipsecmod/ipsecmod.c
80
if(!ipsecmod_apply_cfg(ipsecmod_env, env->cfg)) {
usr.sbin/unbound/ipsecmod/ipsecmod.c
88
ipsecmod_deinit(struct module_env* env, int id)
usr.sbin/unbound/ipsecmod/ipsecmod.c
91
if(!env || !env->modinfo[id])
usr.sbin/unbound/ipsecmod/ipsecmod.c
93
ipsecmod_env = (struct ipsecmod_env*)env->modinfo[id];
usr.sbin/unbound/ipsecmod/ipsecmod.c
97
env->modinfo[id] = NULL;
usr.sbin/unbound/ipsecmod/ipsecmod.h
77
int ipsecmod_init(struct module_env* env, int id);
usr.sbin/unbound/ipsecmod/ipsecmod.h
79
void ipsecmod_deinit(struct module_env* env, int id);
usr.sbin/unbound/ipsecmod/ipsecmod.h
89
size_t ipsecmod_get_mem(struct module_env* env, int id);
usr.sbin/unbound/ipset/ipset.c
225
ipset_check_zones_for_rrset(struct module_env *env, struct ipset_env *ie,
usr.sbin/unbound/ipset/ipset.c
248
for (p = env->cfg->local_zones_ipset; p; p = p->next) {
usr.sbin/unbound/ipset/ipset.c
272
static int ipset_update(struct module_env *env, struct dns_msg *return_msg,
usr.sbin/unbound/ipset/ipset.c
315
if(ipset_check_zones_for_rrset(env, ie, rrset, qname,
usr.sbin/unbound/ipset/ipset.c
324
int ipset_startup(struct module_env* env, int id) {
usr.sbin/unbound/ipset/ipset.c
333
env->modinfo[id] = (void *)ipset_env;
usr.sbin/unbound/ipset/ipset.c
347
void ipset_destartup(struct module_env* env, int id) {
usr.sbin/unbound/ipset/ipset.c
351
if (!env || !env->modinfo[id]) {
usr.sbin/unbound/ipset/ipset.c
354
ipset_env = (struct ipset_env *)env->modinfo[id];
usr.sbin/unbound/ipset/ipset.c
367
env->modinfo[id] = NULL;
usr.sbin/unbound/ipset/ipset.c
370
int ipset_init(struct module_env* env, int id) {
usr.sbin/unbound/ipset/ipset.c
371
struct ipset_env *ipset_env = env->modinfo[id];
usr.sbin/unbound/ipset/ipset.c
373
ipset_env->name_v4 = env->cfg->ipset_name_v4;
usr.sbin/unbound/ipset/ipset.c
374
ipset_env->name_v6 = env->cfg->ipset_name_v6;
usr.sbin/unbound/ipset/ipset.c
387
void ipset_deinit(struct module_env *ATTR_UNUSED(env), int ATTR_UNUSED(id)) {
usr.sbin/unbound/ipset/ipset.c
408
struct ipset_env *ie = (struct ipset_env *)qstate->env->modinfo[id];
usr.sbin/unbound/ipset/ipset.c
432
ipset_update(qstate->env, qstate->return_msg, qstate->qinfo, ie);
usr.sbin/unbound/ipset/ipset.c
481
size_t ipset_get_mem(struct module_env *env, int id) {
usr.sbin/unbound/ipset/ipset.c
482
struct ipset_env *ie = (struct ipset_env *)env->modinfo[id];
usr.sbin/unbound/ipset/ipset.h
54
int ipset_startup(struct module_env* env, int id);
usr.sbin/unbound/ipset/ipset.h
56
void ipset_destartup(struct module_env* env, int id);
usr.sbin/unbound/ipset/ipset.h
58
int ipset_init(struct module_env* env, int id);
usr.sbin/unbound/ipset/ipset.h
60
void ipset_deinit(struct module_env* env, int id);
usr.sbin/unbound/ipset/ipset.h
70
size_t ipset_get_mem(struct module_env* env, int id);
usr.sbin/unbound/iterator/iter_scrub.c
1071
} else if(!env->cfg->harden_glue && (
usr.sbin/unbound/iterator/iter_scrub.c
1077
store_rrset(pkt, msg, env, rrset);
usr.sbin/unbound/iterator/iter_scrub.c
1110
if(env->cfg->harden_unverified_glue && ns_rrset_dname &&
usr.sbin/unbound/iterator/iter_scrub.c
1125
store_rrset(pkt, msg, env, rrset);
usr.sbin/unbound/iterator/iter_scrub.c
1139
struct module_env* env, struct module_qstate* qstate,
usr.sbin/unbound/iterator/iter_scrub.c
1170
if(!scrub_normalize(pkt, msg, qinfo, region, env, zonename))
usr.sbin/unbound/iterator/iter_scrub.c
1173
if(!scrub_sanitize(pkt, msg, qinfo, zonename, env, ie, qstate))
usr.sbin/unbound/iterator/iter_scrub.c
475
struct module_env* env, uint8_t* zonename)
usr.sbin/unbound/iterator/iter_scrub.c
496
if((int)rrset->rrsig_count > env->cfg->iter_scrub_rrsig)
usr.sbin/unbound/iterator/iter_scrub.c
497
shorten_rrsig(pkt, rrset, env->cfg->iter_scrub_rrsig);
usr.sbin/unbound/iterator/iter_scrub.c
498
if(cname_length > env->cfg->iter_scrub_cname) {
usr.sbin/unbound/iterator/iter_scrub.c
622
rrset->rr_count > env->cfg->iter_scrub_ns) {
usr.sbin/unbound/iterator/iter_scrub.c
623
shorten_rrset(pkt, rrset, env->cfg->iter_scrub_ns);
usr.sbin/unbound/iterator/iter_scrub.c
641
rrset->rr_count > env->cfg->iter_scrub_ns) {
usr.sbin/unbound/iterator/iter_scrub.c
642
shorten_rrset(pkt, rrset, env->cfg->iter_scrub_ns);
usr.sbin/unbound/iterator/iter_scrub.c
667
if(env->cfg->harden_unknown_additional &&
usr.sbin/unbound/iterator/iter_scrub.c
673
if((int)rrset->rrsig_count > env->cfg->iter_scrub_rrsig)
usr.sbin/unbound/iterator/iter_scrub.c
674
shorten_rrsig(pkt, rrset, env->cfg->iter_scrub_rrsig);
usr.sbin/unbound/iterator/iter_scrub.c
707
env->cfg->iter_scrub_promiscuous) {
usr.sbin/unbound/iterator/iter_scrub.c
714
&& env->cfg->iter_scrub_promiscuous) {
usr.sbin/unbound/iterator/iter_scrub.c
730
&& env->cfg->iter_scrub_promiscuous) {
usr.sbin/unbound/iterator/iter_scrub.c
742
if(rrset->rr_count > env->cfg->iter_scrub_ns) {
usr.sbin/unbound/iterator/iter_scrub.c
758
shorten_rrset(pkt, rrset, env->cfg->iter_scrub_ns);
usr.sbin/unbound/iterator/iter_scrub.c
817
if(env->cfg->harden_unknown_additional &&
usr.sbin/unbound/iterator/iter_scrub.c
823
if((int)rrset->rrsig_count > env->cfg->iter_scrub_rrsig)
usr.sbin/unbound/iterator/iter_scrub.c
824
shorten_rrsig(pkt, rrset, env->cfg->iter_scrub_rrsig);
usr.sbin/unbound/iterator/iter_scrub.c
843
store_rrset(sldns_buffer* pkt, struct msg_parse* msg, struct module_env* env,
usr.sbin/unbound/iterator/iter_scrub.c
849
time_t now = *env->now;
usr.sbin/unbound/iterator/iter_scrub.c
851
k = alloc_special_obtain(env->alloc);
usr.sbin/unbound/iterator/iter_scrub.c
856
alloc_special_release(env->alloc, k);
usr.sbin/unbound/iterator/iter_scrub.c
864
(void)rrset_cache_update(env->rrset_cache, &ref, env->alloc, now);
usr.sbin/unbound/iterator/iter_scrub.c
975
struct query_info* qinfo, uint8_t* zonename, struct module_env* env,
usr.sbin/unbound/iterator/iter_scrub.h
69
struct module_env* env, struct module_qstate* qstate,
usr.sbin/unbound/iterator/iter_utils.c
1205
iter_store_parentside_rrset(struct module_env* env,
usr.sbin/unbound/iterator/iter_utils.c
1209
rrset = packed_rrset_copy_alloc(rrset, env->alloc, *env->now);
usr.sbin/unbound/iterator/iter_utils.c
1219
(void)rrset_cache_update(env->rrset_cache, &ref, env->alloc, *env->now);
usr.sbin/unbound/iterator/iter_utils.c
1236
iter_store_parentside_NS(struct module_env* env, struct reply_info* rep)
usr.sbin/unbound/iterator/iter_utils.c
1241
iter_store_parentside_rrset(env, rrset);
usr.sbin/unbound/iterator/iter_utils.c
1245
void iter_store_parentside_neg(struct module_env* env,
usr.sbin/unbound/iterator/iter_utils.c
1260
neg = (struct ub_packed_rrset_key*)regional_alloc(env->scratch,
usr.sbin/unbound/iterator/iter_utils.c
1271
neg->rk.dname = regional_alloc_init(env->scratch, qinfo->qname,
usr.sbin/unbound/iterator/iter_utils.c
1279
newd = (struct packed_rrset_data*)regional_alloc_zero(env->scratch,
usr.sbin/unbound/iterator/iter_utils.c
1301
iter_store_parentside_rrset(env, neg);
usr.sbin/unbound/iterator/iter_utils.c
1305
iter_lookup_parent_NS_from_cache(struct module_env* env, struct delegpt* dp,
usr.sbin/unbound/iterator/iter_utils.c
1309
akey = rrset_cache_lookup(env->rrset_cache, dp->name,
usr.sbin/unbound/iterator/iter_utils.c
1311
PACKED_RRSET_PARENT_SIDE, *env->now, 0);
usr.sbin/unbound/iterator/iter_utils.c
1325
int iter_lookup_parent_glue_from_cache(struct module_env* env,
usr.sbin/unbound/iterator/iter_utils.c
1336
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
usr.sbin/unbound/iterator/iter_utils.c
1338
PACKED_RRSET_PARENT_SIDE, *env->now, 0);
usr.sbin/unbound/iterator/iter_utils.c
1348
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
usr.sbin/unbound/iterator/iter_utils.c
1350
PACKED_RRSET_PARENT_SIDE, *env->now, 0);
usr.sbin/unbound/iterator/iter_utils.c
1558
lock_rw_rdlock(&qstate->env->fwds->lock);
usr.sbin/unbound/iterator/iter_utils.c
1559
lock_rw_rdlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iter_utils.c
1560
stub = hints_lookup_stub(qstate->env->hints, qinf->qname,
usr.sbin/unbound/iterator/iter_utils.c
1562
dp = forwards_lookup(qstate->env->fwds, qinf->qname, qinf->qclass,
usr.sbin/unbound/iterator/iter_utils.c
1579
lock_rw_unlock(&qstate->env->fwds->lock);
usr.sbin/unbound/iterator/iter_utils.c
1590
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iter_utils.c
1600
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iter_utils.c
1608
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iter_utils.c
1619
lock_rw_unlock(&qstate->env->fwds->lock);
usr.sbin/unbound/iterator/iter_utils.c
1628
lock_rw_unlock(&qstate->env->fwds->lock);
usr.sbin/unbound/iterator/iter_utils.c
1631
lock_rw_unlock(&qstate->env->fwds->lock);
usr.sbin/unbound/iterator/iter_utils.c
1632
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iter_utils.c
1641
struct module_env* env, struct outside_network* outnet)
usr.sbin/unbound/iterator/iter_utils.c
1647
ie = (struct iter_env*)env->modinfo[m];
usr.sbin/unbound/iterator/iter_utils.c
303
iter_filter_unsuitable(struct iter_env* iter_env, struct module_env* env,
usr.sbin/unbound/iterator/iter_utils.c
358
if(infra_get_lame_rtt(env->infra_cache, &a->addr, a->addrlen,
usr.sbin/unbound/iterator/iter_utils.c
397
iter_fill_rtt(struct iter_env* iter_env, struct module_env* env,
usr.sbin/unbound/iterator/iter_utils.c
409
a->sel_rtt = iter_filter_unsuitable(iter_env, env,
usr.sbin/unbound/iterator/iter_utils.c
476
iter_filter_order(struct iter_env* iter_env, struct module_env* env,
usr.sbin/unbound/iterator/iter_utils.c
487
got_num = iter_fill_rtt(iter_env, env, name, namelen, qtype, now, dp,
usr.sbin/unbound/iterator/iter_utils.c
501
if(env->cfg->fast_server_permil != 0 && prefetch == 0 &&
usr.sbin/unbound/iterator/iter_utils.c
502
num_results > env->cfg->fast_server_num &&
usr.sbin/unbound/iterator/iter_utils.c
503
ub_random_max(env->rnd, 1000) < env->cfg->fast_server_permil) {
usr.sbin/unbound/iterator/iter_utils.c
508
env->cfg->fast_server_num);
usr.sbin/unbound/iterator/iter_utils.c
548
if (env->cfg->prefer_ip6) {
usr.sbin/unbound/iterator/iter_utils.c
606
} else if (env->cfg->prefer_ip4) {
usr.sbin/unbound/iterator/iter_utils.c
670
struct module_env* env, struct delegpt* dp,
usr.sbin/unbound/iterator/iter_utils.c
678
int num = iter_filter_order(iter_env, env, name, namelen, qtype,
usr.sbin/unbound/iterator/iter_utils.c
679
*env->now, dp, &selrtt, open_target, blacklist, prefetch);
usr.sbin/unbound/iterator/iter_utils.c
722
sel = ub_random_max(env->rnd, num);
usr.sbin/unbound/iterator/iter_utils.c
774
iter_dns_store(struct module_env* env, struct query_info* msgqinf,
usr.sbin/unbound/iterator/iter_utils.c
779
if(!dns_cache_store(env, msgqinf, msgrep, is_referral, leeway,
usr.sbin/unbound/iterator/iter_utils.c
808
qstate->env->detect_cycle));
usr.sbin/unbound/iterator/iter_utils.c
809
return (*qstate->env->detect_cycle)(qstate, &qinf,
usr.sbin/unbound/iterator/iter_utils.c
916
iter_qname_indicates_dnssec(struct module_env* env, struct query_info *qinfo)
usr.sbin/unbound/iterator/iter_utils.c
919
if(!env || !env->anchors || !qinfo || !qinfo->qname)
usr.sbin/unbound/iterator/iter_utils.c
922
if((a=anchors_lookup(env->anchors, qinfo->qname, qinfo->qname_len,
usr.sbin/unbound/iterator/iter_utils.c
937
iter_indicates_dnssec(struct module_env* env, struct delegpt* dp,
usr.sbin/unbound/iterator/iter_utils.c
942
if(!env || !env->anchors || !dp || !dp->name)
usr.sbin/unbound/iterator/iter_utils.c
945
if((a=anchor_find(env->anchors, dp->name, dp->namelabs, dp->namelen,
usr.sbin/unbound/iterator/iter_utils.c
961
if(env->key_cache) {
usr.sbin/unbound/iterator/iter_utils.c
962
struct key_entry_key* kk = key_cache_obtain(env->key_cache,
usr.sbin/unbound/iterator/iter_utils.c
963
dp->name, dp->namelen, dclass, env->scratch, *env->now);
usr.sbin/unbound/iterator/iter_utils.c
967
regional_free_all(env->scratch);
usr.sbin/unbound/iterator/iter_utils.c
970
regional_free_all(env->scratch);
usr.sbin/unbound/iterator/iter_utils.c
974
regional_free_all(env->scratch);
usr.sbin/unbound/iterator/iter_utils.h
111
struct module_env* env, struct delegpt* dp, uint8_t* name,
usr.sbin/unbound/iterator/iter_utils.h
154
void iter_dns_store(struct module_env* env, struct query_info* qinf,
usr.sbin/unbound/iterator/iter_utils.h
212
int iter_qname_indicates_dnssec(struct module_env* env,
usr.sbin/unbound/iterator/iter_utils.h
225
int iter_indicates_dnssec(struct module_env* env, struct delegpt* dp,
usr.sbin/unbound/iterator/iter_utils.h
289
void iter_store_parentside_rrset(struct module_env* env,
usr.sbin/unbound/iterator/iter_utils.h
298
void iter_store_parentside_NS(struct module_env* env, struct reply_info* rep);
usr.sbin/unbound/iterator/iter_utils.h
308
void iter_store_parentside_neg(struct module_env* env,
usr.sbin/unbound/iterator/iter_utils.h
323
int iter_lookup_parent_NS_from_cache(struct module_env* env,
usr.sbin/unbound/iterator/iter_utils.h
337
int iter_lookup_parent_glue_from_cache(struct module_env* env,
usr.sbin/unbound/iterator/iter_utils.h
433
struct module_env* env, struct outside_network* outnet);
usr.sbin/unbound/iterator/iterator.c
1008
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
1019
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
103
if(!iter_apply_cfg(iter_env, env->cfg)) {
usr.sbin/unbound/iterator/iterator.c
1040
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
1053
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
1057
qstate->env->kill_sub));
usr.sbin/unbound/iterator/iterator.c
1058
(*qstate->env->kill_sub)(subq);
usr.sbin/unbound/iterator/iterator.c
1069
qstate->env, subiq->dp, NULL, subq->qinfo.qclass);
usr.sbin/unbound/iterator/iterator.c
1071
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
1094
lock_rw_rdlock(&qstate->env->auth_zones->lock);
usr.sbin/unbound/iterator/iterator.c
1095
z = auth_zones_find_zone(qstate->env->auth_zones, delname, delnamelen,
usr.sbin/unbound/iterator/iterator.c
1098
lock_rw_unlock(&qstate->env->auth_zones->lock);
usr.sbin/unbound/iterator/iterator.c
1102
lock_rw_unlock(&qstate->env->auth_zones->lock);
usr.sbin/unbound/iterator/iterator.c
112
iter_deinit(struct module_env* env, int id)
usr.sbin/unbound/iterator/iterator.c
115
if(!env || !env->modinfo[id])
usr.sbin/unbound/iterator/iterator.c
117
iter_env = (struct iter_env*)env->modinfo[id];
usr.sbin/unbound/iterator/iterator.c
1183
struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id];
usr.sbin/unbound/iterator/iterator.c
1237
struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id];
usr.sbin/unbound/iterator/iterator.c
124
env->modinfo[id] = NULL;
usr.sbin/unbound/iterator/iterator.c
1243
if(!can_have_last_resort(qstate->env, iq->dp->name, iq->dp->namelen,
usr.sbin/unbound/iterator/iterator.c
1277
qstate->env->kill_sub));
usr.sbin/unbound/iterator/iterator.c
1278
(*qstate->env->kill_sub)(subq);
usr.sbin/unbound/iterator/iterator.c
1320
if(mesh_jostle_exceeded(qstate->env->mesh))
usr.sbin/unbound/iterator/iterator.c
1366
dp = forwards_lookup(qstate->env->fwds, delname, iq->qchase.qclass,
usr.sbin/unbound/iterator/iterator.c
1372
lock_rw_unlock(&qstate->env->fwds->lock);
usr.sbin/unbound/iterator/iterator.c
1446
!can_have_last_resort(qstate->env, iq->dp->name,
usr.sbin/unbound/iterator/iterator.c
1457
if(qstate->env->auth_zones) {
usr.sbin/unbound/iterator/iterator.c
1502
if(qstate->env->cfg->qname_minimisation)
usr.sbin/unbound/iterator/iterator.c
1521
msg = dns_cache_lookup(qstate->env, iq->qchase.qname,
usr.sbin/unbound/iterator/iterator.c
1524
qstate->region, qstate->env->scratch, 0, dpname,
usr.sbin/unbound/iterator/iterator.c
1526
if(!msg && qstate->env->neg_cache &&
usr.sbin/unbound/iterator/iterator.c
1527
iter_qname_indicates_dnssec(qstate->env, &iq->qchase)) {
usr.sbin/unbound/iterator/iterator.c
1530
msg = val_neg_getmsg(qstate->env->neg_cache, &iq->qchase,
usr.sbin/unbound/iterator/iterator.c
1531
qstate->region, qstate->env->rrset_cache,
usr.sbin/unbound/iterator/iterator.c
1532
qstate->env->scratch_buffer,
usr.sbin/unbound/iterator/iterator.c
1533
*qstate->env->now, 1/*add SOA*/, NULL,
usr.sbin/unbound/iterator/iterator.c
1534
qstate->env->cfg);
usr.sbin/unbound/iterator/iterator.c
1576
if(qstate->env->cfg->qname_minimisation)
usr.sbin/unbound/iterator/iterator.c
1599
if(!cache_fill_missing(qstate->env, iq->qchase.qclass,
usr.sbin/unbound/iterator/iterator.c
163
if (qstate->env->cfg->qname_minimisation)
usr.sbin/unbound/iterator/iterator.c
1645
&& can_have_last_resort(qstate->env, delname, delnamelen, iq->qchase.qclass, NULL, NULL, NULL))) {
usr.sbin/unbound/iterator/iterator.c
1663
iq->dp = dns_cache_find_delegation(qstate->env, delname,
usr.sbin/unbound/iterator/iterator.c
1666
*qstate->env->now+qstate->prefetch_leeway, 1,
usr.sbin/unbound/iterator/iterator.c
1688
if(forwards_lookup_root(qstate->env->fwds,
usr.sbin/unbound/iterator/iterator.c
1690
lock_rw_unlock(&qstate->env->fwds->lock);
usr.sbin/unbound/iterator/iterator.c
1693
iq->dp = hints_find_root(qstate->env->hints,
usr.sbin/unbound/iterator/iterator.c
1702
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
1743
if(!can_have_last_resort(qstate->env, iq->dp->name, iq->dp->namelen, iq->qchase.qclass, &have_dp, &iq->dp, qstate->region)) {
usr.sbin/unbound/iterator/iterator.c
1771
iq->dp = hints_find_root(qstate->env->hints,
usr.sbin/unbound/iterator/iterator.c
1781
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
1846
qstate->env->hints, iq->qchase.qname, iq->qchase.qclass,
usr.sbin/unbound/iterator/iterator.c
1854
if(stub) { lock_rw_unlock(&qstate->env->hints->lock); }
usr.sbin/unbound/iterator/iterator.c
1896
iq->dnssec_expected = iter_indicates_dnssec(qstate->env, iq->dp,
usr.sbin/unbound/iterator/iterator.c
1915
if(iq->dnssec_expected && qstate->env->cfg->prefetch_key &&
usr.sbin/unbound/iterator/iterator.c
1919
qstate->env->detach_subs));
usr.sbin/unbound/iterator/iterator.c
1920
(*qstate->env->detach_subs)(qstate);
usr.sbin/unbound/iterator/iterator.c
1959
qstate->env, subiq->dp, NULL,
usr.sbin/unbound/iterator/iterator.c
1963
subiq->dp = dns_cache_find_delegation(qstate->env,
usr.sbin/unbound/iterator/iterator.c
1966
*qstate->env->now+subq->prefetch_leeway,
usr.sbin/unbound/iterator/iterator.c
1971
qstate->env, subiq->dp, NULL,
usr.sbin/unbound/iterator/iterator.c
2076
if(!iter_ns_probability(qstate->env->rnd, toget, missing)) {
usr.sbin/unbound/iterator/iterator.c
2102
if(mesh_jostle_exceeded(qstate->env->mesh)) {
usr.sbin/unbound/iterator/iterator.c
2127
if(mesh_jostle_exceeded(qstate->env->mesh)) {
usr.sbin/unbound/iterator/iterator.c
2171
if(!can_have_last_resort(qstate->env, iq->dp->name, iq->dp->namelen,
usr.sbin/unbound/iterator/iterator.c
2182
if(qstate->env->cfg->harden_unverified_glue) {
usr.sbin/unbound/iterator/iterator.c
2183
if(!cache_fill_missing(qstate->env, iq->qchase.qclass,
usr.sbin/unbound/iterator/iterator.c
2194
dp = hints_find_root(qstate->env->hints,
usr.sbin/unbound/iterator/iterator.c
2209
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
2217
if(!iter_lookup_parent_NS_from_cache(qstate->env, iq->dp,
usr.sbin/unbound/iterator/iterator.c
2230
if(qstate->env->cfg->qname_minimisation)
usr.sbin/unbound/iterator/iterator.c
2236
if(!cache_fill_missing(qstate->env, iq->qchase.qclass,
usr.sbin/unbound/iterator/iterator.c
224
struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id];
usr.sbin/unbound/iterator/iterator.c
2244
if(iter_lookup_parent_glue_from_cache(qstate->env, iq->dp,
usr.sbin/unbound/iterator/iterator.c
2292
!can_have_last_resort(qstate->env, ns->name, ns->namelen,
usr.sbin/unbound/iterator/iterator.c
2313
if(mesh_jostle_exceeded(qstate->env->mesh)) {
usr.sbin/unbound/iterator/iterator.c
2348
iter_store_parentside_neg(qstate->env, &qstate->qinfo,
usr.sbin/unbound/iterator/iterator.c
246
if(!cache_fill_missing(super->env, super_iq->qchase.qclass,
usr.sbin/unbound/iterator/iterator.c
2679
struct dns_msg* msg = dns_cache_lookup(qstate->env,
usr.sbin/unbound/iterator/iterator.c
2683
qstate->env->scratch, 0, iq->dp->name,
usr.sbin/unbound/iterator/iterator.c
2692
qstate->env->need_to_validate &&
usr.sbin/unbound/iterator/iterator.c
2693
qstate->env->cfg->harden_below_nxdomain) {
usr.sbin/unbound/iterator/iterator.c
2727
else if(!qstate->env->cfg->qname_minimisation_strict)
usr.sbin/unbound/iterator/iterator.c
2740
if(auth_zones_can_fallback(qstate->env->auth_zones,
usr.sbin/unbound/iterator/iterator.c
2751
} else if(auth_zones_lookup(qstate->env->auth_zones, &iq->qinfo_out,
usr.sbin/unbound/iterator/iterator.c
2762
qstate->env->mesh->num_query_authzone_up++;
usr.sbin/unbound/iterator/iterator.c
2801
&& !mesh_jostle_exceeded(qstate->env->mesh)) {
usr.sbin/unbound/iterator/iterator.c
2873
if(qstate->env->auth_zones) {
usr.sbin/unbound/iterator/iterator.c
2908
if(qstate->env->cfg->qname_minimisation)
usr.sbin/unbound/iterator/iterator.c
2913
qstate->env->detach_subs));
usr.sbin/unbound/iterator/iterator.c
2914
(*qstate->env->detach_subs)(qstate);
usr.sbin/unbound/iterator/iterator.c
2934
target = iter_server_selection(ie, qstate->env, iq->dp,
usr.sbin/unbound/iterator/iterator.c
3041
&& !ub_random_max(qstate->env->rnd, 10)) {
usr.sbin/unbound/iterator/iterator.c
307
if(dns_cache_prefetch_adjust(qstate->env, &qstate->qinfo,
usr.sbin/unbound/iterator/iterator.c
3087
fptr_ok(fptr_whitelist_modenv_send_query(qstate->env->send_query));
usr.sbin/unbound/iterator/iterator.c
3088
outq = (*qstate->env->send_query)(&iq->qinfo_out,
usr.sbin/unbound/iterator/iterator.c
3093
(qstate->env->cfg->disable_edns_do?0:EDNS_DO)|
usr.sbin/unbound/iterator/iterator.c
3095
!qstate->blacklist&&(!iter_qname_indicates_dnssec(qstate->env,
usr.sbin/unbound/iterator/iterator.c
3100
(iq->dp->tcp_upstream || qstate->env->cfg->tcp_upstream),
usr.sbin/unbound/iterator/iterator.c
3101
(iq->dp->ssl_upstream || qstate->env->cfg->ssl_upstream),
usr.sbin/unbound/iterator/iterator.c
3116
if(qstate->env->cfg->qname_minimisation)
usr.sbin/unbound/iterator/iterator.c
312
if((msg=msg_cache_lookup(qstate->env,
usr.sbin/unbound/iterator/iterator.c
316
qstate->env->cfg->serve_expired)) != NULL) {
usr.sbin/unbound/iterator/iterator.c
3164
if(!inplace_cb_query_response_call(qstate->env, qstate, iq->response))
usr.sbin/unbound/iterator/iterator.c
3169
if(qstate->env->cfg->qname_minimisation) {
usr.sbin/unbound/iterator/iterator.c
318
if(qstate->env->cfg->serve_expired && rep) {
usr.sbin/unbound/iterator/iterator.c
319
if(qstate->env->cfg->serve_expired_ttl_reset &&
usr.sbin/unbound/iterator/iterator.c
320
*qstate->env->now + qstate->env->cfg->serve_expired_ttl
usr.sbin/unbound/iterator/iterator.c
3204
if(!qstate->env->cfg->disable_dnssec_lame_check && iq->dnssec_expected
usr.sbin/unbound/iterator/iterator.c
324
rep->serve_expired_ttl = *qstate->env->now +
usr.sbin/unbound/iterator/iterator.c
325
qstate->env->cfg->serve_expired_ttl;
usr.sbin/unbound/iterator/iterator.c
330
*qstate->env->now;
usr.sbin/unbound/iterator/iterator.c
3317
qstate->env->detach_subs));
usr.sbin/unbound/iterator/iterator.c
3318
(*qstate->env->detach_subs)(qstate);
usr.sbin/unbound/iterator/iterator.c
3333
iter_dns_store(qstate->env, &iq->response->qinfo,
usr.sbin/unbound/iterator/iterator.c
3344
qstate->env->detach_subs));
usr.sbin/unbound/iterator/iterator.c
3345
(*qstate->env->detach_subs)(qstate);
usr.sbin/unbound/iterator/iterator.c
3355
if(qstate->env->cfg->qname_minimisation_strict) {
usr.sbin/unbound/iterator/iterator.c
338
(qstate->env->cfg->serve_expired ||
usr.sbin/unbound/iterator/iterator.c
3383
if(qstate->env->cfg->harden_below_nxdomain &&
usr.sbin/unbound/iterator/iterator.c
3384
qstate->env->need_to_validate) {
usr.sbin/unbound/iterator/iterator.c
339
*qstate->env->now <= rep->ttl)) {
usr.sbin/unbound/iterator/iterator.c
3413
(!qstate->env->cfg->harden_referral_path ||
usr.sbin/unbound/iterator/iterator.c
3431
iter_dns_store(qstate->env, &iq->response->qinfo,
usr.sbin/unbound/iterator/iterator.c
3435
iter_store_parentside_NS(qstate->env,
usr.sbin/unbound/iterator/iterator.c
3437
if(qstate->env->neg_cache)
usr.sbin/unbound/iterator/iterator.c
3438
val_neg_addreferral(qstate->env->neg_cache,
usr.sbin/unbound/iterator/iterator.c
3450
iter_store_parentside_rrset(qstate->env,
usr.sbin/unbound/iterator/iterator.c
3461
if (qstate->env->cfg->qname_minimisation)
usr.sbin/unbound/iterator/iterator.c
3476
rrset_cache_remove_above(qstate->env->rrset_cache,
usr.sbin/unbound/iterator/iterator.c
3478
iq->qchase.qclass, *qstate->env->now,
usr.sbin/unbound/iterator/iterator.c
3481
if(!cache_fill_missing(qstate->env, iq->qchase.qclass,
usr.sbin/unbound/iterator/iterator.c
3497
iq->dnssec_expected = iter_indicates_dnssec(qstate->env,
usr.sbin/unbound/iterator/iterator.c
3500
if(iq->dnssec_expected && qstate->env->cfg->prefetch_key &&
usr.sbin/unbound/iterator/iterator.c
3508
if(qstate->env->cfg->harden_referral_path)
usr.sbin/unbound/iterator/iterator.c
3518
qstate->env->detach_subs));
usr.sbin/unbound/iterator/iterator.c
3519
(*qstate->env->detach_subs)(qstate);
usr.sbin/unbound/iterator/iterator.c
3544
qstate->env->detach_subs));
usr.sbin/unbound/iterator/iterator.c
3545
(*qstate->env->detach_subs)(qstate);
usr.sbin/unbound/iterator/iterator.c
3569
iter_dns_store(qstate->env, &iq->response->qinfo,
usr.sbin/unbound/iterator/iterator.c
3577
if(qstate->env->auth_zones) {
usr.sbin/unbound/iterator/iterator.c
361
iter_dns_store(qstate->env, &qstate->qinfo, &err, 0, 0, 0, NULL,
usr.sbin/unbound/iterator/iterator.c
3621
if(qstate->env->cfg->qname_minimisation)
usr.sbin/unbound/iterator/iterator.c
3631
qstate->env->detach_subs));
usr.sbin/unbound/iterator/iterator.c
3632
(*qstate->env->detach_subs)(qstate);
usr.sbin/unbound/iterator/iterator.c
3651
if(!infra_set_lame(qstate->env->infra_cache,
usr.sbin/unbound/iterator/iterator.c
3655
*qstate->env->now, dnsseclame, 0,
usr.sbin/unbound/iterator/iterator.c
3670
if(!infra_set_lame(qstate->env->infra_cache,
usr.sbin/unbound/iterator/iterator.c
3674
*qstate->env->now, 0, 1, iq->qchase.qtype))
usr.sbin/unbound/iterator/iterator.c
3691
if (qstate->env->cfg->qname_minimisation &&
usr.sbin/unbound/iterator/iterator.c
3692
!qstate->env->cfg->qname_minimisation_strict)
usr.sbin/unbound/iterator/iterator.c
3697
if(!auth_zones_can_fallback(qstate->env->auth_zones,
usr.sbin/unbound/iterator/iterator.c
3803
if(qstate->env->cfg->harden_referral_path) {
usr.sbin/unbound/iterator/iterator.c
3839
struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id];
usr.sbin/unbound/iterator/iterator.c
4088
while(iter_get_next_root(qstate->env->hints,
usr.sbin/unbound/iterator/iterator.c
4089
qstate->env->fwds, &c)) {
usr.sbin/unbound/iterator/iterator.c
4141
iter_store_parentside_neg(qstate->env, &qstate->qinfo,
usr.sbin/unbound/iterator/iterator.c
4164
if((qstate->env->cfg->val_log_level >= 2 ||
usr.sbin/unbound/iterator/iterator.c
4165
qstate->env->cfg->log_servfail) && qstate->errinf &&
usr.sbin/unbound/iterator/iterator.c
4166
!qstate->env->cfg->val_log_squelch) {
usr.sbin/unbound/iterator/iterator.c
4194
iter_dns_store(qstate->env, &qstate->qinfo,
usr.sbin/unbound/iterator/iterator.c
4324
qstate->env->cfg->use_caps_bits_for_id &&
usr.sbin/unbound/iterator/iterator.c
4354
prs = (struct msg_parse*)regional_alloc(qstate->env->scratch,
usr.sbin/unbound/iterator/iterator.c
4365
if(parse_packet(pkt, prs, qstate->env->scratch) != LDNS_RCODE_NOERROR) {
usr.sbin/unbound/iterator/iterator.c
4371
if(parse_extract_edns_from_response_msg(prs, &edns, qstate->env->scratch) !=
usr.sbin/unbound/iterator/iterator.c
4388
if(!inplace_cb_edns_back_parsed_call(qstate->env, qstate)) {
usr.sbin/unbound/iterator/iterator.c
4398
qstate->env->scratch, qstate->env, qstate, ie)) {
usr.sbin/unbound/iterator/iterator.c
4425
if(qstate->env->cfg->aggressive_nsec) {
usr.sbin/unbound/iterator/iterator.c
4429
if(qstate->env->cfg->qname_minimisation &&
usr.sbin/unbound/iterator/iterator.c
4480
qstate->env->scratch)) {
usr.sbin/unbound/iterator/iterator.c
4509
struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id];
usr.sbin/unbound/iterator/iterator.c
4572
iter_get_mem(struct module_env* env, int id)
usr.sbin/unbound/iterator/iterator.c
4574
struct iter_env* ie = (struct iter_env*)env->modinfo[id];
usr.sbin/unbound/iterator/iterator.c
634
if(qstate->env->cfg->val_log_level < 2 && !qstate->env->cfg->log_servfail)
usr.sbin/unbound/iterator/iterator.c
686
can_have_last_resort(struct module_env* env, uint8_t* nm, size_t ATTR_UNUSED(nmlen),
usr.sbin/unbound/iterator/iterator.c
696
(dp = hints_find(env->hints, nm, qclass, nolock)) &&
usr.sbin/unbound/iterator/iterator.c
701
lock_rw_unlock(&env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
706
lock_rw_unlock(&env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
709
if((dp = forwards_find(env->fwds, nm, qclass, nolock)) &&
usr.sbin/unbound/iterator/iterator.c
714
lock_rw_unlock(&env->fwds->lock);
usr.sbin/unbound/iterator/iterator.c
719
if(dp) { lock_rw_unlock(&env->fwds->lock); }
usr.sbin/unbound/iterator/iterator.c
857
qstate->env->add_sub));
usr.sbin/unbound/iterator/iterator.c
858
if(!(*qstate->env->add_sub)(qstate, &qinf, NULL,
usr.sbin/unbound/iterator/iterator.c
866
qstate->env->attach_sub));
usr.sbin/unbound/iterator/iterator.c
867
if(!(*qstate->env->attach_sub)(qstate, &qinf, NULL, qflags,
usr.sbin/unbound/iterator/iterator.c
88
iter_init(struct module_env* env, int id)
usr.sbin/unbound/iterator/iterator.c
882
qstate->env->kill_sub));
usr.sbin/unbound/iterator/iterator.c
883
(*qstate->env->kill_sub)(subq);
usr.sbin/unbound/iterator/iterator.c
904
if(qstate->env->cfg->qname_minimisation)
usr.sbin/unbound/iterator/iterator.c
931
dp = hints_find_root(qstate->env->hints, qclass, nolock);
usr.sbin/unbound/iterator/iterator.c
941
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
952
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
956
qstate->env->kill_sub));
usr.sbin/unbound/iterator/iterator.c
957
(*qstate->env->kill_sub)(subq);
usr.sbin/unbound/iterator/iterator.c
96
env->modinfo[id] = (void*)iter_env;
usr.sbin/unbound/iterator/iterator.c
963
qstate->env, subiq->dp, NULL, subq->qinfo.qclass);
usr.sbin/unbound/iterator/iterator.c
965
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
999
stub = hints_lookup_stub(qstate->env->hints, qname, qclass, iq->dp,
usr.sbin/unbound/iterator/iterator.h
514
int iter_init(struct module_env* env, int id);
usr.sbin/unbound/iterator/iterator.h
517
void iter_deinit(struct module_env* env, int id);
usr.sbin/unbound/iterator/iterator.h
540
size_t iter_get_mem(struct module_env* env, int id);
usr.sbin/unbound/libunbound/context.c
100
if(!slabhash_is_size(ctx->env->msg_cache, cfg->msg_cache_size,
usr.sbin/unbound/libunbound/context.c
102
slabhash_delete(ctx->env->msg_cache);
usr.sbin/unbound/libunbound/context.c
103
ctx->env->msg_cache = slabhash_create(cfg->msg_cache_slabs,
usr.sbin/unbound/libunbound/context.c
107
if(!ctx->env->msg_cache)
usr.sbin/unbound/libunbound/context.c
110
ctx->env->rrset_cache = rrset_cache_adjust(ctx->env->rrset_cache,
usr.sbin/unbound/libunbound/context.c
111
ctx->env->cfg, ctx->env->alloc);
usr.sbin/unbound/libunbound/context.c
112
if(!ctx->env->rrset_cache)
usr.sbin/unbound/libunbound/context.c
114
ctx->env->infra_cache = infra_adjust(ctx->env->infra_cache, cfg);
usr.sbin/unbound/libunbound/context.c
115
if(!ctx->env->infra_cache)
usr.sbin/unbound/libunbound/context.c
63
struct config_file* cfg = ctx->env->cfg;
usr.sbin/unbound/libunbound/context.c
78
if(!modstack_call_startup(&ctx->mods, cfg->module_conf, ctx->env))
usr.sbin/unbound/libunbound/context.c
80
if(!modstack_call_init(&ctx->mods, cfg->module_conf, ctx->env))
usr.sbin/unbound/libunbound/context.c
83
log_edns_known_options(VERB_ALGO, ctx->env);
usr.sbin/unbound/libunbound/context.c
89
if(!auth_zones_apply_cfg(ctx->env->auth_zones, cfg, 1, &is_rpz,
usr.sbin/unbound/libunbound/context.c
90
ctx->env, &ctx->mods))
usr.sbin/unbound/libunbound/context.c
92
if(!(ctx->env->fwds = forwards_create()) ||
usr.sbin/unbound/libunbound/context.c
93
!forwards_apply_cfg(ctx->env->fwds, cfg))
usr.sbin/unbound/libunbound/context.c
95
if(!(ctx->env->hints = hints_create()) ||
usr.sbin/unbound/libunbound/context.c
96
!hints_apply_cfg(ctx->env->hints, cfg))
usr.sbin/unbound/libunbound/context.c
98
if(!edns_strings_apply_cfg(ctx->env->edns_strings, cfg))
usr.sbin/unbound/libunbound/context.h
118
struct module_env* env;
usr.sbin/unbound/libunbound/libunbound.c
1010
if(!ctx->env->cfg->forwards ||
usr.sbin/unbound/libunbound/libunbound.c
1011
(ctx->env->cfg->forwards->name &&
usr.sbin/unbound/libunbound/libunbound.c
1012
strcmp(ctx->env->cfg->forwards->name, ".") != 0)) {
usr.sbin/unbound/libunbound/libunbound.c
1026
s->next = ctx->env->cfg->forwards;
usr.sbin/unbound/libunbound/libunbound.c
1027
ctx->env->cfg->forwards = s;
usr.sbin/unbound/libunbound/libunbound.c
1029
log_assert(ctx->env->cfg->forwards);
usr.sbin/unbound/libunbound/libunbound.c
1030
log_assert(ctx->env->cfg->forwards->name);
usr.sbin/unbound/libunbound/libunbound.c
1031
s = ctx->env->cfg->forwards;
usr.sbin/unbound/libunbound/libunbound.c
1056
ctx->env->cfg->ssl_upstream = tls;
usr.sbin/unbound/libunbound/libunbound.c
1099
prev = &ctx->env->cfg->stubs;
usr.sbin/unbound/libunbound/libunbound.c
1121
elem->next = ctx->env->cfg->stubs;
usr.sbin/unbound/libunbound/libunbound.c
1122
ctx->env->cfg->stubs = elem;
usr.sbin/unbound/libunbound/libunbound.c
126
ctx->env = (struct module_env*)calloc(1, sizeof(*ctx->env));
usr.sbin/unbound/libunbound/libunbound.c
127
if(!ctx->env) {
usr.sbin/unbound/libunbound/libunbound.c
1318
if(!cfg_strlist_insert(&ctx->env->cfg->local_data,
usr.sbin/unbound/libunbound/libunbound.c
133
ctx->env->cfg = config_create_forlib();
usr.sbin/unbound/libunbound/libunbound.c
134
if(!ctx->env->cfg) {
usr.sbin/unbound/libunbound/libunbound.c
135
free(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
142
if(!edns_known_options_init(ctx->env)) {
usr.sbin/unbound/libunbound/libunbound.c
143
config_delete(ctx->env->cfg);
usr.sbin/unbound/libunbound/libunbound.c
144
free(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
150
ctx->env->auth_zones = auth_zones_create();
usr.sbin/unbound/libunbound/libunbound.c
151
if(!ctx->env->auth_zones) {
usr.sbin/unbound/libunbound/libunbound.c
152
edns_known_options_delete(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
153
config_delete(ctx->env->cfg);
usr.sbin/unbound/libunbound/libunbound.c
154
free(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
160
ctx->env->edns_strings = edns_strings_create();
usr.sbin/unbound/libunbound/libunbound.c
161
if(!ctx->env->edns_strings) {
usr.sbin/unbound/libunbound/libunbound.c
162
auth_zones_delete(ctx->env->auth_zones);
usr.sbin/unbound/libunbound/libunbound.c
163
edns_known_options_delete(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
164
config_delete(ctx->env->cfg);
usr.sbin/unbound/libunbound/libunbound.c
165
free(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
172
ctx->env->alloc = &ctx->superalloc;
usr.sbin/unbound/libunbound/libunbound.c
173
ctx->env->worker = NULL;
usr.sbin/unbound/libunbound/libunbound.c
174
ctx->env->need_to_validate = 0;
usr.sbin/unbound/libunbound/libunbound.c
176
ctx->env->modstack = &ctx->mods;
usr.sbin/unbound/libunbound/libunbound.c
190
config_delete(ctx->env->cfg);
usr.sbin/unbound/libunbound/libunbound.c
191
modstack_call_deinit(&ctx->mods, ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
192
modstack_call_destartup(&ctx->mods, ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
195
edns_known_options_delete(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
196
edns_strings_delete(ctx->env->edns_strings);
usr.sbin/unbound/libunbound/libunbound.c
197
free(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
206
config_delete(ctx->env->cfg);
usr.sbin/unbound/libunbound/libunbound.c
207
modstack_call_deinit(&ctx->mods, ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
208
modstack_call_destartup(&ctx->mods, ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
211
edns_known_options_delete(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
212
edns_strings_delete(ctx->env->edns_strings);
usr.sbin/unbound/libunbound/libunbound.c
213
free(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
367
modstack_call_deinit(&ctx->mods, ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
368
modstack_call_destartup(&ctx->mods, ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
384
if(ctx->env) {
usr.sbin/unbound/libunbound/libunbound.c
385
slabhash_delete(ctx->env->msg_cache);
usr.sbin/unbound/libunbound/libunbound.c
386
rrset_cache_delete(ctx->env->rrset_cache);
usr.sbin/unbound/libunbound/libunbound.c
387
infra_delete(ctx->env->infra_cache);
usr.sbin/unbound/libunbound/libunbound.c
388
config_delete(ctx->env->cfg);
usr.sbin/unbound/libunbound/libunbound.c
389
edns_known_options_delete(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
390
edns_strings_delete(ctx->env->edns_strings);
usr.sbin/unbound/libunbound/libunbound.c
391
forwards_delete(ctx->env->fwds);
usr.sbin/unbound/libunbound/libunbound.c
392
hints_delete(ctx->env->hints);
usr.sbin/unbound/libunbound/libunbound.c
393
auth_zones_delete(ctx->env->auth_zones);
usr.sbin/unbound/libunbound/libunbound.c
394
free(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
420
if(!config_set_option(ctx->env->cfg, opt, val)) {
usr.sbin/unbound/libunbound/libunbound.c
433
r = config_get_option_collate(ctx->env->cfg, opt, str);
usr.sbin/unbound/libunbound/libunbound.c
449
if(!config_read(ctx->env->cfg, fname, NULL)) {
usr.sbin/unbound/libunbound/libunbound.c
468
if(!cfg_strlist_insert(&ctx->env->cfg->trust_anchor_list, dup)) {
usr.sbin/unbound/libunbound/libunbound.c
487
if(!cfg_strlist_insert(&ctx->env->cfg->trust_anchor_file_list, dup)) {
usr.sbin/unbound/libunbound/libunbound.c
505
if(!cfg_strlist_insert(&ctx->env->cfg->auto_trust_anchor_file_list,
usr.sbin/unbound/libunbound/libunbound.c
525
if(!cfg_strlist_insert(&ctx->env->cfg->trusted_keys_file_list, dup)) {
usr.sbin/unbound/libunbound/libunbound.c
538
ctx->env->cfg->verbosity = d;
usr.sbin/unbound/libunbound/libunbound.c
989
if(ctx->env->cfg->forwards &&
usr.sbin/unbound/libunbound/libunbound.c
990
(ctx->env->cfg->forwards->name &&
usr.sbin/unbound/libunbound/libunbound.c
991
strcmp(ctx->env->cfg->forwards->name, ".") == 0)) {
usr.sbin/unbound/libunbound/libunbound.c
992
s = ctx->env->cfg->forwards;
usr.sbin/unbound/libunbound/libunbound.c
993
ctx->env->cfg->forwards = s->next;
usr.sbin/unbound/libunbound/libworker.c
100
regional_destroy(w->env->scratch);
usr.sbin/unbound/libunbound/libworker.c
101
ub_randfree(w->env->rnd);
usr.sbin/unbound/libunbound/libworker.c
102
free(w->env);
usr.sbin/unbound/libunbound/libworker.c
135
struct config_file* cfg = ctx->env->cfg;
usr.sbin/unbound/libunbound/libworker.c
141
w->env = (struct module_env*)malloc(sizeof(*w->env));
usr.sbin/unbound/libunbound/libworker.c
142
if(!w->env) {
usr.sbin/unbound/libunbound/libworker.c
146
*w->env = *ctx->env;
usr.sbin/unbound/libunbound/libworker.c
147
w->env->alloc = context_obtain_alloc(ctx, !w->is_bg || w->is_bg_thread);
usr.sbin/unbound/libunbound/libworker.c
148
if(!w->env->alloc) {
usr.sbin/unbound/libunbound/libworker.c
152
w->thread_num = w->env->alloc->thread_num;
usr.sbin/unbound/libunbound/libworker.c
153
alloc_set_id_cleanup(w->env->alloc, &libworker_alloc_cleanup, w);
usr.sbin/unbound/libunbound/libworker.c
157
w->env->scratch = regional_create_custom(cfg->msg_buffer_size);
usr.sbin/unbound/libunbound/libworker.c
158
w->env->scratch_buffer = sldns_buffer_new(cfg->msg_buffer_size);
usr.sbin/unbound/libunbound/libworker.c
164
sldns_buffer_free(w->env->scratch_buffer);
usr.sbin/unbound/libunbound/libworker.c
165
w->env->scratch_buffer = NULL;
usr.sbin/unbound/libunbound/libworker.c
171
if(!w->env->scratch || !w->env->scratch_buffer) {
usr.sbin/unbound/libunbound/libworker.c
175
w->env->worker = (struct worker*)w;
usr.sbin/unbound/libunbound/libworker.c
176
w->env->probe_timer = NULL;
usr.sbin/unbound/libunbound/libworker.c
180
if(!(w->env->rnd = ub_initstate(ctx->seed_rnd))) {
usr.sbin/unbound/libunbound/libworker.c
200
hash_set_raninit((uint32_t)ub_random(w->env->rnd));
usr.sbin/unbound/libunbound/libworker.c
211
w->env->worker_base = w->base;
usr.sbin/unbound/libunbound/libworker.c
235
w->env->infra_cache, w->env->rnd, cfg->use_caps_bits_for_id,
usr.sbin/unbound/libunbound/libworker.c
242
w->env->outnet = w->back;
usr.sbin/unbound/libunbound/libworker.c
251
w->env->mesh = mesh_create(&ctx->mods, w->env);
usr.sbin/unbound/libunbound/libworker.c
252
if(!w->env->mesh) {
usr.sbin/unbound/libunbound/libworker.c
256
w->env->send_query = &libworker_send_query;
usr.sbin/unbound/libunbound/libworker.c
257
w->env->detach_subs = &mesh_detach_subs;
usr.sbin/unbound/libunbound/libworker.c
258
w->env->attach_sub = &mesh_attach_sub;
usr.sbin/unbound/libunbound/libworker.c
259
w->env->add_sub = &mesh_add_sub;
usr.sbin/unbound/libunbound/libworker.c
260
w->env->kill_sub = &mesh_state_delete;
usr.sbin/unbound/libunbound/libworker.c
261
w->env->detect_cycle = &mesh_detect_cycle;
usr.sbin/unbound/libunbound/libworker.c
262
comm_base_timept(w->base, &w->env->now, &w->env->now_tv);
usr.sbin/unbound/libunbound/libworker.c
571
libworker_enter_result(q->res, buf, q->w->env->scratch, s);
usr.sbin/unbound/libunbound/libworker.c
632
if(local_zones_answer(ctx->local_zones, w->env, &qinfo, &edns,
usr.sbin/unbound/libunbound/libworker.c
633
w->back->udp_buff, w->env->scratch, NULL, NULL, 0, NULL, 0,
usr.sbin/unbound/libunbound/libworker.c
635
regional_free_all(w->env->scratch);
usr.sbin/unbound/libunbound/libworker.c
642
if(ctx->env->auth_zones && auth_zones_downstream_answer(
usr.sbin/unbound/libunbound/libworker.c
643
ctx->env->auth_zones, w->env, &qinfo, &edns, NULL,
usr.sbin/unbound/libunbound/libworker.c
644
w->back->udp_buff, w->env->scratch)) {
usr.sbin/unbound/libunbound/libworker.c
645
regional_free_all(w->env->scratch);
usr.sbin/unbound/libunbound/libworker.c
653
if(!mesh_new_callback(w->env->mesh, &qinfo, qflags, &edns,
usr.sbin/unbound/libunbound/libworker.c
713
if(local_zones_answer(ctx->local_zones, w->env, &qinfo, &edns,
usr.sbin/unbound/libunbound/libworker.c
714
w->back->udp_buff, w->env->scratch, NULL, NULL, 0, NULL, 0,
usr.sbin/unbound/libunbound/libworker.c
716
regional_free_all(w->env->scratch);
usr.sbin/unbound/libunbound/libworker.c
722
if(ctx->env->auth_zones && auth_zones_downstream_answer(
usr.sbin/unbound/libunbound/libworker.c
723
ctx->env->auth_zones, w->env, &qinfo, &edns, NULL,
usr.sbin/unbound/libunbound/libworker.c
724
w->back->udp_buff, w->env->scratch)) {
usr.sbin/unbound/libunbound/libworker.c
725
regional_free_all(w->env->scratch);
usr.sbin/unbound/libunbound/libworker.c
734
if(!mesh_new_callback(w->env->mesh, &qinfo, qflags, &edns,
usr.sbin/unbound/libunbound/libworker.c
814
buf = q->w->env->scratch_buffer;
usr.sbin/unbound/libunbound/libworker.c
852
if(local_zones_answer(w->ctx->local_zones, w->env, &qinfo, &edns,
usr.sbin/unbound/libunbound/libworker.c
853
w->back->udp_buff, w->env->scratch, NULL, NULL, 0, NULL, 0,
usr.sbin/unbound/libunbound/libworker.c
855
regional_free_all(w->env->scratch);
usr.sbin/unbound/libunbound/libworker.c
861
if(w->ctx->env->auth_zones && auth_zones_downstream_answer(
usr.sbin/unbound/libunbound/libworker.c
862
w->ctx->env->auth_zones, w->env, &qinfo, &edns, NULL,
usr.sbin/unbound/libunbound/libworker.c
863
w->back->udp_buff, w->env->scratch)) {
usr.sbin/unbound/libunbound/libworker.c
864
regional_free_all(w->env->scratch);
usr.sbin/unbound/libunbound/libworker.c
872
if(!mesh_new_callback(w->env->mesh, &qinfo, qflags, &edns,
usr.sbin/unbound/libunbound/libworker.c
882
slabhash_clear(&w->env->rrset_cache->table);
usr.sbin/unbound/libunbound/libworker.c
883
slabhash_clear(w->env->msg_cache);
usr.sbin/unbound/libunbound/libworker.c
893
struct libworker* w = (struct libworker*)q->env->worker;
usr.sbin/unbound/libunbound/libworker.c
902
libworker_handle_service_reply, e, w->back->udp_buff, q->env,
usr.sbin/unbound/libunbound/libworker.c
915
struct libworker* lw = (struct libworker*)e->qstate->env->worker;
usr.sbin/unbound/libunbound/libworker.c
918
mesh_report_reply(lw->env->mesh, e, reply_info, error);
usr.sbin/unbound/libunbound/libworker.c
928
mesh_report_reply(lw->env->mesh, e, reply_info,
usr.sbin/unbound/libunbound/libworker.c
932
mesh_report_reply(lw->env->mesh, e, reply_info, NETEVENT_NOERROR);
usr.sbin/unbound/libunbound/libworker.c
94
if(w->env) {
usr.sbin/unbound/libunbound/libworker.c
96
mesh_delete(w->env->mesh);
usr.sbin/unbound/libunbound/libworker.c
97
context_release_alloc(w->ctx, w->env->alloc,
usr.sbin/unbound/libunbound/libworker.c
99
sldns_buffer_free(w->env->scratch_buffer);
usr.sbin/unbound/libunbound/libworker.h
83
struct module_env* env;
usr.sbin/unbound/respip/respip.c
1079
fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
usr.sbin/unbound/respip/respip.c
1080
return (*qstate->env->attach_sub)(qstate, &subqi,
usr.sbin/unbound/respip/respip.c
1118
!(qstate->env->need_to_validate &&
usr.sbin/unbound/respip/respip.c
1120
|| qstate->env->cfg->ignore_cd) &&
usr.sbin/unbound/respip/respip.c
1132
qstate->region, qstate->env->auth_zones,
usr.sbin/unbound/respip/respip.c
1133
&qstate->rpz_passthru, qstate->env->views,
usr.sbin/unbound/respip/respip.c
1134
qstate->env->respip_set)) {
usr.sbin/unbound/respip/respip.c
1263
super->env->need_to_validate, &new_rep, super->region,
usr.sbin/unbound/respip/respip.c
1264
qstate->env->auth_zones, qstate->env->views,
usr.sbin/unbound/respip/respip.c
1265
qstate->env->respip_set))
usr.sbin/unbound/respip/respip.c
1283
respip_get_mem(struct module_env* env, int id)
usr.sbin/unbound/respip/respip.c
1285
(void)env;
usr.sbin/unbound/respip/respip.c
558
respip_init(struct module_env* env, int id)
usr.sbin/unbound/respip/respip.c
560
(void)env;
usr.sbin/unbound/respip/respip.c
566
respip_deinit(struct module_env* env, int id)
usr.sbin/unbound/respip/respip.c
568
(void)env;
usr.sbin/unbound/respip/respip.h
207
int respip_init(struct module_env* env, int id);
usr.sbin/unbound/respip/respip.h
210
void respip_deinit(struct module_env* env, int id);
usr.sbin/unbound/respip/respip.h
242
size_t respip_get_mem(struct module_env* env, int id);
usr.sbin/unbound/services/authzone.c
100
static void xfr_set_timeout(struct auth_xfer* xfr, struct module_env* env,
usr.sbin/unbound/services/authzone.c
104
struct module_env* env);
usr.sbin/unbound/services/authzone.c
107
static int xfr_start_probe(struct auth_xfer* xfr, struct module_env* env,
usr.sbin/unbound/services/authzone.c
1764
struct module_env env;
usr.sbin/unbound/services/authzone.c
1768
env = *env_for_val;
usr.sbin/unbound/services/authzone.c
1769
env.scratch_buffer = sldns_buffer_new(env.cfg->msg_buffer_size);
usr.sbin/unbound/services/authzone.c
1770
if(!env.scratch_buffer) {
usr.sbin/unbound/services/authzone.c
1774
env.scratch = regional_create();
usr.sbin/unbound/services/authzone.c
1775
if(!env.now) {
usr.sbin/unbound/services/authzone.c
1776
env.now = &now;
usr.sbin/unbound/services/authzone.c
1779
if(!env.scratch) {
usr.sbin/unbound/services/authzone.c
1783
auth_zone_verify_zonemd(z, &env, mods, NULL, 1, 0);
usr.sbin/unbound/services/authzone.c
1787
sldns_buffer_free(env.scratch_buffer);
usr.sbin/unbound/services/authzone.c
1788
regional_destroy(env.scratch);
usr.sbin/unbound/services/authzone.c
1794
struct module_env* env, struct module_stack* mods)
usr.sbin/unbound/services/authzone.c
1805
if(z->zonefile && z->zonefile[0]!=0 && env)
usr.sbin/unbound/services/authzone.c
1806
zonemd_offline_verify(z, env, mods);
usr.sbin/unbound/services/authzone.c
1883
struct module_env* env, char** reason)
usr.sbin/unbound/services/authzone.c
1895
region = env->scratch;
usr.sbin/unbound/services/authzone.c
1897
buf = env->scratch_buffer;
usr.sbin/unbound/services/authzone.c
2271
int setup, int* is_rpz, struct module_env* env,
usr.sbin/unbound/services/authzone.c
2288
if(!auth_zones_read_zones(az, cfg, env, mods))
usr.sbin/unbound/services/authzone.c
3541
auth_answer_encode(struct query_info* qinfo, struct module_env* env,
usr.sbin/unbound/services/authzone.c
3552
if(!inplace_cb_reply_local_call(env, qinfo, NULL, msg->rep,
usr.sbin/unbound/services/authzone.c
3553
(int)FLAGS_GET_RCODE(msg->rep->flags), edns, repinfo, temp, env->now_tv)
usr.sbin/unbound/services/authzone.c
3567
auth_error_encode(struct query_info* qinfo, struct module_env* env,
usr.sbin/unbound/services/authzone.c
3576
if(!inplace_cb_reply_local_call(env, qinfo, NULL, NULL,
usr.sbin/unbound/services/authzone.c
3577
rcode, edns, repinfo, temp, env->now_tv))
usr.sbin/unbound/services/authzone.c
3584
int auth_zones_downstream_answer(struct auth_zones* az, struct module_env* env,
usr.sbin/unbound/services/authzone.c
3636
env->mesh->num_query_authzone_down++;
usr.sbin/unbound/services/authzone.c
3637
auth_error_encode(qinfo, env, edns, repinfo, buf, temp,
usr.sbin/unbound/services/authzone.c
3649
env->mesh->num_query_authzone_down++;
usr.sbin/unbound/services/authzone.c
3653
auth_error_encode(qinfo, env, edns, repinfo, buf, temp,
usr.sbin/unbound/services/authzone.c
3655
else auth_answer_encode(qinfo, env, edns, repinfo, buf, temp, msg);
usr.sbin/unbound/services/authzone.c
3836
xfr_process_notify(struct auth_xfer* xfr, struct module_env* env,
usr.sbin/unbound/services/authzone.c
3846
if(!xfr_start_probe(xfr, env, fromhost)) {
usr.sbin/unbound/services/authzone.c
3854
int auth_zones_notify(struct auth_zones* az, struct module_env* env,
usr.sbin/unbound/services/authzone.c
3882
xfr_process_notify(xfr, env, has_serial, serial, fromhost);
usr.sbin/unbound/services/authzone.c
3887
struct module_env* env, uint8_t* nm, size_t nmlen, uint16_t dclass)
usr.sbin/unbound/services/authzone.c
3899
xfr_process_notify(xfr, env, 0, 0, NULL);
usr.sbin/unbound/services/authzone.c
3905
auth_xfer_set_expired(struct auth_xfer* xfr, struct module_env* env,
usr.sbin/unbound/services/authzone.c
3916
lock_rw_rdlock(&env->auth_zones->lock);
usr.sbin/unbound/services/authzone.c
3917
z = auth_zone_find(env->auth_zones, xfr->name, xfr->namelen,
usr.sbin/unbound/services/authzone.c
3920
lock_rw_unlock(&env->auth_zones->lock);
usr.sbin/unbound/services/authzone.c
3924
lock_rw_unlock(&env->auth_zones->lock);
usr.sbin/unbound/services/authzone.c
4084
xfr_transfer_move_to_next_lookup(struct auth_xfer* xfr, struct module_env* env)
usr.sbin/unbound/services/authzone.c
4088
if(!xfr->task_transfer->lookup_aaaa && env->cfg->do_ip6) {
usr.sbin/unbound/services/authzone.c
4096
if(!env->cfg->do_ip4 && xfr->task_transfer->lookup_target!=NULL)
usr.sbin/unbound/services/authzone.c
4115
xfr_probe_move_to_next_lookup(struct auth_xfer* xfr, struct module_env* env)
usr.sbin/unbound/services/authzone.c
4119
if(!xfr->task_probe->lookup_aaaa && env->cfg->do_ip6) {
usr.sbin/unbound/services/authzone.c
4126
if(!env->cfg->do_ip4 && xfr->task_probe->lookup_target!=NULL)
usr.sbin/unbound/services/authzone.c
5249
xfr_write_after_update(struct auth_xfer* xfr, struct module_env* env)
usr.sbin/unbound/services/authzone.c
5251
struct config_file* cfg = env->cfg;
usr.sbin/unbound/services/authzone.c
5259
lock_rw_rdlock(&env->auth_zones->lock);
usr.sbin/unbound/services/authzone.c
5260
z = auth_zone_find(env->auth_zones, xfr->name, xfr->namelen,
usr.sbin/unbound/services/authzone.c
5263
lock_rw_unlock(&env->auth_zones->lock);
usr.sbin/unbound/services/authzone.c
5270
lock_rw_unlock(&env->auth_zones->lock);
usr.sbin/unbound/services/authzone.c
5324
struct module_env* env, struct auth_zone** z)
usr.sbin/unbound/services/authzone.c
5328
lock_rw_rdlock(&env->auth_zones->lock);
usr.sbin/unbound/services/authzone.c
5329
*z = auth_zone_find(env->auth_zones, xfr->name, xfr->namelen,
usr.sbin/unbound/services/authzone.c
5332
lock_rw_unlock(&env->auth_zones->lock);
usr.sbin/unbound/services/authzone.c
5339
lock_rw_unlock(&env->auth_zones->lock);
usr.sbin/unbound/services/authzone.c
5346
xfr_process_chunk_list(struct auth_xfer* xfr, struct module_env* env,
usr.sbin/unbound/services/authzone.c
5353
if(!xfr_process_reacquire_locks(xfr, env, &z)) {
usr.sbin/unbound/services/authzone.c
5361
if(!apply_http(xfr, z, env->scratch_buffer)) {
usr.sbin/unbound/services/authzone.c
5369
if(!apply_ixfr(xfr, z, env->scratch_buffer)) {
usr.sbin/unbound/services/authzone.c
5377
if(!apply_axfr(xfr, z, env->scratch_buffer)) {
usr.sbin/unbound/services/authzone.c
5392
z->soa_zone_acquired = *env->now;
usr.sbin/unbound/services/authzone.c
5393
xfr->soa_zone_acquired = *env->now;
usr.sbin/unbound/services/authzone.c
5399
auth_zone_verify_zonemd(z, env, &env->mesh->mods, NULL, 0, 0);
usr.sbin/unbound/services/authzone.c
5407
if(!xfr_process_reacquire_locks(xfr, env, &z))
usr.sbin/unbound/services/authzone.c
5419
if(!xfr_process_reacquire_locks(xfr, env, &z))
usr.sbin/unbound/services/authzone.c
5424
xfr->lease_time = *env->now;
usr.sbin/unbound/services/authzone.c
5439
xfr_write_after_update(xfr, env);
usr.sbin/unbound/services/authzone.c
5455
xfr->task_transfer->env = NULL;
usr.sbin/unbound/services/authzone.c
5460
xfr_transfer_lookup_host(struct auth_xfer* xfr, struct module_env* env)
usr.sbin/unbound/services/authzone.c
5469
sldns_buffer* buf = env->scratch_buffer;
usr.sbin/unbound/services/authzone.c
5518
if(!mesh_new_callback(env->mesh, &qinfo, qflags, &edns, buf, 0,
usr.sbin/unbound/services/authzone.c
5531
xfr_transfer_init_fetch(struct auth_xfer* xfr, struct module_env* env)
usr.sbin/unbound/services/authzone.c
5565
xfr->task_transfer->timer = comm_timer_create(env->worker_base,
usr.sbin/unbound/services/authzone.c
5586
env->outnet, auth_xfer_transfer_http_callback, xfr,
usr.sbin/unbound/services/authzone.c
5588
master->file, env->cfg);
usr.sbin/unbound/services/authzone.c
5612
xfr->task_transfer->id = GET_RANDOM_ID(env->rnd);
usr.sbin/unbound/services/authzone.c
5613
xfr_create_ixfr_packet(xfr, env->scratch_buffer,
usr.sbin/unbound/services/authzone.c
5617
xfr->task_transfer->cp = outnet_comm_point_for_tcp(env->outnet,
usr.sbin/unbound/services/authzone.c
5619
env->scratch_buffer, -1,
usr.sbin/unbound/services/authzone.c
5642
xfr_transfer_nexttarget_or_end(struct auth_xfer* xfr, struct module_env* env)
usr.sbin/unbound/services/authzone.c
5644
log_assert(xfr->task_transfer->worker == env->worker);
usr.sbin/unbound/services/authzone.c
5648
if(xfr_transfer_lookup_host(xfr, env)) {
usr.sbin/unbound/services/authzone.c
5662
xfr_transfer_move_to_next_lookup(xfr, env);
usr.sbin/unbound/services/authzone.c
5669
if(xfr_transfer_init_fetch(xfr, env)) {
usr.sbin/unbound/services/authzone.c
5689
xfr_set_timeout(xfr, env, 1, 0);
usr.sbin/unbound/services/authzone.c
5751
struct module_env* env;
usr.sbin/unbound/services/authzone.c
5754
env = xfr->task_transfer->env;
usr.sbin/unbound/services/authzone.c
5755
if(!env || env->outnet->want_to_quit) {
usr.sbin/unbound/services/authzone.c
5772
struct regional* temp = env->scratch;
usr.sbin/unbound/services/authzone.c
5815
xfr_transfer_move_to_next_lookup(xfr, env);
usr.sbin/unbound/services/authzone.c
5816
xfr_transfer_nexttarget_or_end(xfr, env);
usr.sbin/unbound/services/authzone.c
6145
process_list_end_transfer(struct auth_xfer* xfr, struct module_env* env)
usr.sbin/unbound/services/authzone.c
6148
if(xfr_process_chunk_list(xfr, env, &ixfr_fail)) {
usr.sbin/unbound/services/authzone.c
6165
if(!xfr_start_probe(xfr, env, NULL)) {
usr.sbin/unbound/services/authzone.c
6178
xfr_set_timeout(xfr, env, 0, 0);
usr.sbin/unbound/services/authzone.c
6191
xfr_transfer_nexttarget_or_end(xfr, env);
usr.sbin/unbound/services/authzone.c
6199
struct module_env* env;
usr.sbin/unbound/services/authzone.c
6203
env = xfr->task_transfer->env;
usr.sbin/unbound/services/authzone.c
6204
if(!env || env->outnet->want_to_quit) {
usr.sbin/unbound/services/authzone.c
6231
xfr_transfer_nexttarget_or_end(xfr, env);
usr.sbin/unbound/services/authzone.c
6240
struct module_env* env;
usr.sbin/unbound/services/authzone.c
6245
env = xfr->task_transfer->env;
usr.sbin/unbound/services/authzone.c
6246
if(!env || env->outnet->want_to_quit) {
usr.sbin/unbound/services/authzone.c
6280
xfr_transfer_nexttarget_or_end(xfr, env);
usr.sbin/unbound/services/authzone.c
6304
process_list_end_transfer(xfr, env);
usr.sbin/unbound/services/authzone.c
6323
struct module_env* env;
usr.sbin/unbound/services/authzone.c
6326
env = xfr->task_transfer->env;
usr.sbin/unbound/services/authzone.c
6327
if(!env || env->outnet->want_to_quit) {
usr.sbin/unbound/services/authzone.c
6349
xfr_transfer_nexttarget_or_end(xfr, env);
usr.sbin/unbound/services/authzone.c
6370
process_list_end_transfer(xfr, env);
usr.sbin/unbound/services/authzone.c
6386
xfr_start_transfer(struct auth_xfer* xfr, struct module_env* env,
usr.sbin/unbound/services/authzone.c
6393
xfr->task_transfer->worker = env->worker;
usr.sbin/unbound/services/authzone.c
6394
xfr->task_transfer->env = env;
usr.sbin/unbound/services/authzone.c
6403
xfr_transfer_nexttarget_or_end(xfr, env);
usr.sbin/unbound/services/authzone.c
6418
xfr->task_probe->env = NULL;
usr.sbin/unbound/services/authzone.c
6423
xfr_probe_send_probe(struct auth_xfer* xfr, struct module_env* env,
usr.sbin/unbound/services/authzone.c
6455
== env->cfg->ssl_port)
usr.sbin/unbound/services/authzone.c
6457
= htons((uint16_t)env->cfg->port);
usr.sbin/unbound/services/authzone.c
6460
== env->cfg->ssl_port)
usr.sbin/unbound/services/authzone.c
6462
= htons((uint16_t)env->cfg->port);
usr.sbin/unbound/services/authzone.c
6470
xfr->task_probe->id = GET_RANDOM_ID(env->rnd);
usr.sbin/unbound/services/authzone.c
6471
xfr_create_soa_probe_packet(xfr, env->scratch_buffer,
usr.sbin/unbound/services/authzone.c
6485
xfr->task_probe->cp = outnet_comm_point_for_udp(env->outnet,
usr.sbin/unbound/services/authzone.c
6497
xfr->task_probe->timer = comm_timer_create(env->worker_base,
usr.sbin/unbound/services/authzone.c
6506
if(!comm_point_send_udp_msg(xfr->task_probe->cp, env->scratch_buffer,
usr.sbin/unbound/services/authzone.c
6537
struct module_env* env;
usr.sbin/unbound/services/authzone.c
6540
env = xfr->task_probe->env;
usr.sbin/unbound/services/authzone.c
6541
if(!env || env->outnet->want_to_quit) {
usr.sbin/unbound/services/authzone.c
6553
if(xfr_probe_send_probe(xfr, env, xfr->task_probe->timeout*2)) {
usr.sbin/unbound/services/authzone.c
6564
xfr_probe_send_or_end(xfr, env);
usr.sbin/unbound/services/authzone.c
6573
struct module_env* env;
usr.sbin/unbound/services/authzone.c
6576
env = xfr->task_probe->env;
usr.sbin/unbound/services/authzone.c
6577
if(!env || env->outnet->want_to_quit) {
usr.sbin/unbound/services/authzone.c
6615
xfr_start_transfer(xfr, env, master);
usr.sbin/unbound/services/authzone.c
6655
xfr_probe_send_or_end(xfr, env);
usr.sbin/unbound/services/authzone.c
6661
xfr_probe_lookup_host(struct auth_xfer* xfr, struct module_env* env)
usr.sbin/unbound/services/authzone.c
6670
sldns_buffer* buf = env->scratch_buffer;
usr.sbin/unbound/services/authzone.c
6721
if(!mesh_new_callback(env->mesh, &qinfo, qflags, &edns, buf, 0,
usr.sbin/unbound/services/authzone.c
6745
xfr_probe_send_or_end(struct auth_xfer* xfr, struct module_env* env)
usr.sbin/unbound/services/authzone.c
6749
if(xfr_probe_lookup_host(xfr, env)) {
usr.sbin/unbound/services/authzone.c
6763
xfr_probe_move_to_next_lookup(xfr, env);
usr.sbin/unbound/services/authzone.c
6785
xfr_start_transfer(xfr, env, NULL);
usr.sbin/unbound/services/authzone.c
6793
xfr_set_timeout(xfr, env, 0, 0);
usr.sbin/unbound/services/authzone.c
6800
if(xfr_probe_send_probe(xfr, env, AUTH_PROBE_TIMEOUT)) {
usr.sbin/unbound/services/authzone.c
6819
xfr->lease_time = *env->now;
usr.sbin/unbound/services/authzone.c
6821
xfr_set_timeout(xfr, env, 0, 0);
usr.sbin/unbound/services/authzone.c
6833
xfr_set_timeout(xfr, env, 1, 0);
usr.sbin/unbound/services/authzone.c
6844
struct module_env* env;
usr.sbin/unbound/services/authzone.c
6847
env = xfr->task_probe->env;
usr.sbin/unbound/services/authzone.c
6848
if(!env || env->outnet->want_to_quit) {
usr.sbin/unbound/services/authzone.c
6865
struct regional* temp = env->scratch;
usr.sbin/unbound/services/authzone.c
6908
xfr_probe_move_to_next_lookup(xfr, env);
usr.sbin/unbound/services/authzone.c
6909
xfr_probe_send_or_end(xfr, env);
usr.sbin/unbound/services/authzone.c
6923
xfr->task_nextprobe->env = NULL;
usr.sbin/unbound/services/authzone.c
6931
struct module_env* env;
usr.sbin/unbound/services/authzone.c
6934
env = xfr->task_nextprobe->env;
usr.sbin/unbound/services/authzone.c
6935
if(!env || env->outnet->want_to_quit) {
usr.sbin/unbound/services/authzone.c
6942
*env->now >= xfr->lease_time + xfr->expiry) {
usr.sbin/unbound/services/authzone.c
6944
auth_xfer_set_expired(xfr, env, 1);
usr.sbin/unbound/services/authzone.c
6950
if(!xfr_start_probe(xfr, env, NULL)) {
usr.sbin/unbound/services/authzone.c
6960
xfr_start_probe(struct auth_xfer* xfr, struct module_env* env,
usr.sbin/unbound/services/authzone.c
6974
xfr_start_transfer(xfr, env, spec);
usr.sbin/unbound/services/authzone.c
6982
xfr->task_probe->worker = env->worker;
usr.sbin/unbound/services/authzone.c
6983
xfr->task_probe->env = env;
usr.sbin/unbound/services/authzone.c
6996
xfr_probe_send_or_end(xfr, env);
usr.sbin/unbound/services/authzone.c
7010
xfr_set_timeout(struct auth_xfer* xfr, struct module_env* env,
usr.sbin/unbound/services/authzone.c
7016
xfr->task_nextprobe->worker == env->worker);
usr.sbin/unbound/services/authzone.c
7020
xfr->task_nextprobe->next_probe = *env->now;
usr.sbin/unbound/services/authzone.c
7047
xfr->lease_time+xfr->expiry > *env->now)
usr.sbin/unbound/services/authzone.c
7057
env->worker_base, auth_xfer_timer, xfr);
usr.sbin/unbound/services/authzone.c
7068
xfr->task_nextprobe->worker = env->worker;
usr.sbin/unbound/services/authzone.c
7069
xfr->task_nextprobe->env = env;
usr.sbin/unbound/services/authzone.c
7070
if(*(xfr->task_nextprobe->env->now) <= xfr->task_nextprobe->next_probe)
usr.sbin/unbound/services/authzone.c
7072
*(xfr->task_nextprobe->env->now);
usr.sbin/unbound/services/authzone.c
7091
void auth_zone_pickup_initial_zone(struct auth_zone* z, struct module_env* env)
usr.sbin/unbound/services/authzone.c
7096
z->soa_zone_acquired = *env->now;
usr.sbin/unbound/services/authzone.c
7099
void auth_xfer_pickup_initial_zone(struct auth_xfer* x, struct module_env* env)
usr.sbin/unbound/services/authzone.c
7105
x->lease_time = *env->now;
usr.sbin/unbound/services/authzone.c
7106
x->soa_zone_acquired = *env->now;
usr.sbin/unbound/services/authzone.c
7109
xfr_set_timeout(x, env, 0, 1);
usr.sbin/unbound/services/authzone.c
7115
auth_xfer_pickup_initial(struct auth_zones* az, struct module_env* env)
usr.sbin/unbound/services/authzone.c
7122
auth_zone_pickup_initial_zone(z, env);
usr.sbin/unbound/services/authzone.c
7127
auth_xfer_pickup_initial_zone(x, env);
usr.sbin/unbound/services/authzone.c
7902
struct module_env* env, struct module_stack* mods,
usr.sbin/unbound/services/authzone.c
7918
ve = (struct val_env*)env->modinfo[m];
usr.sbin/unbound/services/authzone.c
7934
sec = dnskeyset_verify_rrset(env, ve, &pk, dnskey, sigalg, why_bogus, NULL,
usr.sbin/unbound/services/authzone.c
7976
struct module_env* env, struct module_stack* mods,
usr.sbin/unbound/services/authzone.c
7990
if(!zonemd_dnssec_verify_rrset(z, env, mods, dnskey, apex,
usr.sbin/unbound/services/authzone.c
8033
if(!zonemd_dnssec_verify_rrset(z, env, mods, dnskey, match,
usr.sbin/unbound/services/authzone.c
8053
struct module_env* env, struct module_stack* mods,
usr.sbin/unbound/services/authzone.c
8068
if(!zonemd_dnssec_verify_rrset(z, env, mods, dnskey, apex, soa,
usr.sbin/unbound/services/authzone.c
8073
if(!zonemd_dnssec_verify_rrset(z, env, mods, dnskey, apex,
usr.sbin/unbound/services/authzone.c
8090
static void auth_zone_zonemd_fail(struct auth_zone* z, struct module_env* env,
usr.sbin/unbound/services/authzone.c
8112
if(env->cfg->zonemd_permissive_mode) {
usr.sbin/unbound/services/authzone.c
8138
auth_zone_verify_zonemd_with_key(struct auth_zone* z, struct module_env* env,
usr.sbin/unbound/services/authzone.c
8166
auth_zone_zonemd_fail(z, env, "DNSKEY missing", NULL, result);
usr.sbin/unbound/services/authzone.c
8170
if(!zonemd_check_dnssec_absence(z, env, mods, dnskey, apex,
usr.sbin/unbound/services/authzone.c
8173
auth_zone_zonemd_fail(z, env, reason, why_bogus, result);
usr.sbin/unbound/services/authzone.c
8179
if(!zonemd_check_dnssec_soazonemd(z, env, mods, dnskey, apex,
usr.sbin/unbound/services/authzone.c
8182
auth_zone_zonemd_fail(z, env, reason, why_bogus, result);
usr.sbin/unbound/services/authzone.c
8188
auth_zone_zonemd_fail(z, env, "ZONEMD absent and that is not allowed by config", NULL, result);
usr.sbin/unbound/services/authzone.c
8209
if(!auth_zone_zonemd_check_hash(z, env, &reason)) {
usr.sbin/unbound/services/authzone.c
8210
auth_zone_zonemd_fail(z, env, reason, NULL, result);
usr.sbin/unbound/services/authzone.c
8244
zonemd_get_dnskey_from_anchor(struct auth_zone* z, struct module_env* env,
usr.sbin/unbound/services/authzone.c
8272
ve = (struct val_env*)env->modinfo[m];
usr.sbin/unbound/services/authzone.c
8283
sec = val_verify_DNSKEY_with_TA(env, ve, keystorage, anchor->ds_rrset,
usr.sbin/unbound/services/authzone.c
8286
regional_free_all(env->scratch);
usr.sbin/unbound/services/authzone.c
8306
struct module_env* env, struct module_stack* mods,
usr.sbin/unbound/services/authzone.c
8334
ve = (struct val_env*)env->modinfo[m];
usr.sbin/unbound/services/authzone.c
8344
sec = val_verify_DNSKEY_with_DS(env, ve, keystorage, ds, sigalg,
usr.sbin/unbound/services/authzone.c
8346
regional_free_all(env->scratch);
usr.sbin/unbound/services/authzone.c
8370
struct module_env* env;
usr.sbin/unbound/services/authzone.c
8379
env = z->zonemd_callback_env;
usr.sbin/unbound/services/authzone.c
8383
if(!env || env->outnet->want_to_quit || z->zone_deleted) {
usr.sbin/unbound/services/authzone.c
8389
downprot = env->cfg->harden_algo_downgrade;
usr.sbin/unbound/services/authzone.c
8403
struct regional* temp = env->scratch;
usr.sbin/unbound/services/authzone.c
8481
dnskey = auth_zone_verify_zonemd_key_with_ds(z, env,
usr.sbin/unbound/services/authzone.c
8482
&env->mesh->mods, ds, &is_insecure, &ds_bogus,
usr.sbin/unbound/services/authzone.c
8490
auth_zone_zonemd_fail(z, env, reason, ds_bogus, NULL);
usr.sbin/unbound/services/authzone.c
8492
regional_free_all(env->scratch);
usr.sbin/unbound/services/authzone.c
8496
auth_zone_verify_zonemd_with_key(z, env, &env->mesh->mods, dnskey,
usr.sbin/unbound/services/authzone.c
8498
regional_free_all(env->scratch);
usr.sbin/unbound/services/authzone.c
8504
zonemd_lookup_dnskey(struct auth_zone* z, struct module_env* env)
usr.sbin/unbound/services/authzone.c
8509
sldns_buffer* buf = env->scratch_buffer;
usr.sbin/unbound/services/authzone.c
8559
z->zonemd_callback_env = env;
usr.sbin/unbound/services/authzone.c
8563
if(!mesh_new_callback(env->mesh, &qinfo, qflags, &edns, buf, 0,
usr.sbin/unbound/services/authzone.c
8574
void auth_zone_verify_zonemd(struct auth_zone* z, struct module_env* env,
usr.sbin/unbound/services/authzone.c
8595
if(env->anchors)
usr.sbin/unbound/services/authzone.c
8596
anchor = anchors_lookup(env->anchors, z->name, z->namelen,
usr.sbin/unbound/services/authzone.c
8611
dnskey = zonemd_get_dnskey_from_anchor(z, env, mods, anchor,
usr.sbin/unbound/services/authzone.c
8624
if(zonemd_lookup_dnskey(z, env)) {
usr.sbin/unbound/services/authzone.c
8638
auth_zone_zonemd_fail(z, env, reason, why_bogus, result);
usr.sbin/unbound/services/authzone.c
8639
regional_free_all(env->scratch);
usr.sbin/unbound/services/authzone.c
8643
auth_zone_verify_zonemd_with_key(z, env, mods, dnskey, is_insecure,
usr.sbin/unbound/services/authzone.c
8645
regional_free_all(env->scratch);
usr.sbin/unbound/services/authzone.c
8649
struct module_env* env)
usr.sbin/unbound/services/authzone.c
8673
auth_zone_verify_zonemd(z, env, &env->mesh->mods, NULL, 0, 1);
usr.sbin/unbound/services/authzone.h
301
struct module_env* env;
usr.sbin/unbound/services/authzone.h
327
struct module_env* env;
usr.sbin/unbound/services/authzone.h
375
struct module_env* env;
usr.sbin/unbound/services/authzone.h
496
int setup, int* is_rpz, struct module_env* env,
usr.sbin/unbound/services/authzone.h
504
void auth_xfer_pickup_initial(struct auth_zones* az, struct module_env* env);
usr.sbin/unbound/services/authzone.h
557
int auth_zones_downstream_answer(struct auth_zones* az, struct module_env* env,
usr.sbin/unbound/services/authzone.h
625
int auth_zones_notify(struct auth_zones* az, struct module_env* env,
usr.sbin/unbound/services/authzone.h
638
struct module_env* env, uint8_t* nm, size_t nmlen, uint16_t dclass);
usr.sbin/unbound/services/authzone.h
775
void auth_zone_verify_zonemd(struct auth_zone* z, struct module_env* env,
usr.sbin/unbound/services/authzone.h
792
struct module_env* env);
usr.sbin/unbound/services/authzone.h
805
struct module_env* env);
usr.sbin/unbound/services/authzone.h
813
struct module_env* env);
usr.sbin/unbound/services/cache/dns.c
1002
env->rrset_cache, qname, qnamelen,
usr.sbin/unbound/services/cache/dns.c
1019
(rrset=rrset_cache_lookup(env->rrset_cache, qname, qnamelen,
usr.sbin/unbound/services/cache/dns.c
1038
(rrset=rrset_cache_lookup(env->rrset_cache, qname, qnamelen,
usr.sbin/unbound/services/cache/dns.c
1067
if(env->cfg->harden_below_nxdomain) {
usr.sbin/unbound/services/cache/dns.c
1074
e = slabhash_lookup(env->msg_cache, h, &k, 0);
usr.sbin/unbound/services/cache/dns.c
1076
env->cfg->qname_minimisation) {
usr.sbin/unbound/services/cache/dns.c
1079
e = slabhash_lookup(env->msg_cache, h, &k, 0);
usr.sbin/unbound/services/cache/dns.c
1088
&& (msg=tomsg(env, &k, data, region, now, 0, scratch))) {
usr.sbin/unbound/services/cache/dns.c
1105
return fill_any(env, qname, qnamelen, qtype, qclass, region);
usr.sbin/unbound/services/cache/dns.c
1112
dns_cache_store(struct module_env* env, struct query_info* msgqinf,
usr.sbin/unbound/services/cache/dns.c
1121
struct msgreply_entry* e = msg_cache_lookup(env,
usr.sbin/unbound/services/cache/dns.c
1126
if(TTL_IS_EXPIRED(cached->ttl, *env->now)
usr.sbin/unbound/services/cache/dns.c
1127
&& reply_info_could_use_expired(cached, *env->now)
usr.sbin/unbound/services/cache/dns.c
1136
&& (env->need_to_validate &&
usr.sbin/unbound/services/cache/dns.c
1159
NORR_TTL + *env->now;
usr.sbin/unbound/services/cache/dns.c
1160
if(env->cfg->serve_expired_ttl_reset &&
usr.sbin/unbound/services/cache/dns.c
1162
< *env->now +
usr.sbin/unbound/services/cache/dns.c
1163
env->cfg->serve_expired_ttl) {
usr.sbin/unbound/services/cache/dns.c
1170
*env->now +
usr.sbin/unbound/services/cache/dns.c
1171
env->cfg->serve_expired_ttl;
usr.sbin/unbound/services/cache/dns.c
1184
rep = reply_info_copy(msgrep, env->alloc, NULL);
usr.sbin/unbound/services/cache/dns.c
1196
rep->rrsets[i]->entry.data, *env->now);
usr.sbin/unbound/services/cache/dns.c
1201
(void)rrset_cache_update(env->rrset_cache, &ref,
usr.sbin/unbound/services/cache/dns.c
1202
env->alloc,
usr.sbin/unbound/services/cache/dns.c
1204
&& !pside) ? qstarttime:*env->now + leeway));
usr.sbin/unbound/services/cache/dns.c
1216
reply_info_parsedelete(rep, env->alloc);
usr.sbin/unbound/services/cache/dns.c
1225
dns_cache_store_msg(env, &qinf, h, rep, leeway, pside, msgrep,
usr.sbin/unbound/services/cache/dns.c
1235
dns_cache_prefetch_adjust(struct module_env* env, struct query_info* qinfo,
usr.sbin/unbound/services/cache/dns.c
1239
msg = msg_cache_lookup(env, qinfo->qname, qinfo->qname_len,
usr.sbin/unbound/services/cache/dns.c
1240
qinfo->qtype, qinfo->qclass, flags, *env->now, 1);
usr.sbin/unbound/services/cache/dns.c
148
msg_cache_remove(struct module_env* env, uint8_t* qname, size_t qnamelen,
usr.sbin/unbound/services/cache/dns.c
160
slabhash_remove(env->msg_cache, h, &k);
usr.sbin/unbound/services/cache/dns.c
164
dns_cache_store_msg(struct module_env* env, struct query_info* qinfo,
usr.sbin/unbound/services/cache/dns.c
182
reply_info_absolute_ttls(rep, *env->now, *env->now - ttl);
usr.sbin/unbound/services/cache/dns.c
183
} else reply_info_set_ttls(rep, *env->now);
usr.sbin/unbound/services/cache/dns.c
184
store_rrsets(env, rep, *env->now, leeway, pside, qrep, region,
usr.sbin/unbound/services/cache/dns.c
202
msg_cache_remove(env, qinfo->qname, qinfo->qname_len,
usr.sbin/unbound/services/cache/dns.c
214
slabhash_insert(env->msg_cache, hash, &e->entry, rep, env->alloc);
usr.sbin/unbound/services/cache/dns.c
219
find_closest_of_type(struct module_env* env, uint8_t* qname, size_t qnamelen,
usr.sbin/unbound/services/cache/dns.c
235
rrset = rrset_cache_lookup(env->rrset_cache, qname,
usr.sbin/unbound/services/cache/dns.c
240
rrset = rrset_cache_lookup(env->rrset_cache, qname,
usr.sbin/unbound/services/cache/dns.c
261
if(!rrset_cache_expired_above(env->rrset_cache, &qname,
usr.sbin/unbound/services/cache/dns.c
268
if((rrset = rrset_cache_lookup(env->
usr.sbin/unbound/services/cache/dns.c
304
msg_cache_lookup(struct module_env* env, uint8_t* qname, size_t qnamelen,
usr.sbin/unbound/services/cache/dns.c
317
e = slabhash_lookup(env->msg_cache, h, &k, wr);
usr.sbin/unbound/services/cache/dns.c
329
find_add_addrs(struct module_env* env, uint16_t qclass,
usr.sbin/unbound/services/cache/dns.c
337
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
usr.sbin/unbound/services/cache/dns.c
350
neg = msg_cache_lookup(env, ns->name, ns->namelen,
usr.sbin/unbound/services/cache/dns.c
357
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
usr.sbin/unbound/services/cache/dns.c
370
neg = msg_cache_lookup(env, ns->name, ns->namelen,
usr.sbin/unbound/services/cache/dns.c
377
neg = msg_cache_lookup(env, ns->name, ns->namelen,
usr.sbin/unbound/services/cache/dns.c
390
cache_fill_missing(struct module_env* env, uint16_t qclass,
usr.sbin/unbound/services/cache/dns.c
396
time_t now = *env->now;
usr.sbin/unbound/services/cache/dns.c
401
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
usr.sbin/unbound/services/cache/dns.c
415
neg = msg_cache_lookup(env, ns->name, ns->namelen,
usr.sbin/unbound/services/cache/dns.c
422
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
usr.sbin/unbound/services/cache/dns.c
436
neg = msg_cache_lookup(env, ns->name, ns->namelen,
usr.sbin/unbound/services/cache/dns.c
443
neg = msg_cache_lookup(env, ns->name, ns->namelen,
usr.sbin/unbound/services/cache/dns.c
456
find_add_ds(struct module_env* env, struct regional* region,
usr.sbin/unbound/services/cache/dns.c
461
env->rrset_cache, dp->name, dp->namelen, LDNS_RR_TYPE_DS,
usr.sbin/unbound/services/cache/dns.c
466
rrset = rrset_cache_lookup(env->rrset_cache, dp->name,
usr.sbin/unbound/services/cache/dns.c
552
dns_cache_find_delegation(struct module_env* env, uint8_t* qname,
usr.sbin/unbound/services/cache/dns.c
562
nskey = find_closest_of_type(env, qname, qnamelen, qclass, now,
usr.sbin/unbound/services/cache/dns.c
594
find_add_ds(env, region, *msg, dp, now);
usr.sbin/unbound/services/cache/dns.c
596
if(!find_add_addrs(env, qclass, region, dp, now, msg))
usr.sbin/unbound/services/cache/dns.c
632
tomsg(struct module_env* env, struct query_info* q, struct reply_info* r,
usr.sbin/unbound/services/cache/dns.c
705
if(env)
usr.sbin/unbound/services/cache/dns.c
706
rrset_array_unlock_touch(env->rrset_cache, scratch, r->ref,
usr.sbin/unbound/services/cache/dns.c
78
store_rrsets(struct module_env* env, struct reply_info* rep, time_t now,
usr.sbin/unbound/services/cache/dns.c
877
fill_any(struct module_env* env,
usr.sbin/unbound/services/cache/dns.c
881
time_t now = *env->now;
usr.sbin/unbound/services/cache/dns.c
889
if(env->cfg->deny_any) {
usr.sbin/unbound/services/cache/dns.c
89
switch(rrset_cache_update(env->rrset_cache, &rep->ref[i],
usr.sbin/unbound/services/cache/dns.c
90
env->alloc, ((ntohs(rep->ref[i].key->rk.type)==
usr.sbin/unbound/services/cache/dns.c
907
env->rrset_cache, qname, qnamelen, lookup[i],
usr.sbin/unbound/services/cache/dns.c
944
dns_cache_lookup(struct module_env* env,
usr.sbin/unbound/services/cache/dns.c
952
time_t now = *env->now;
usr.sbin/unbound/services/cache/dns.c
962
e = slabhash_lookup(env->msg_cache, h, &k, 0);
usr.sbin/unbound/services/cache/dns.c
966
struct dns_msg* msg = tomsg(env, &key->key, data, region, now, 0,
usr.sbin/unbound/services/cache/dns.c
980
(rrset=find_closest_of_type(env, qname, qnamelen, qclass, now,
usr.sbin/unbound/services/cache/dns.h
124
void dns_cache_store_msg(struct module_env* env, struct query_info* qinfo,
usr.sbin/unbound/services/cache/dns.h
148
struct delegpt* dns_cache_find_delegation(struct module_env* env,
usr.sbin/unbound/services/cache/dns.h
166
struct dns_msg* tomsg(struct module_env* env, struct query_info* q,
usr.sbin/unbound/services/cache/dns.h
197
struct dns_msg* dns_cache_lookup(struct module_env* env,
usr.sbin/unbound/services/cache/dns.h
211
int cache_fill_missing(struct module_env* env, uint16_t qclass,
usr.sbin/unbound/services/cache/dns.h
262
int dns_cache_prefetch_adjust(struct module_env* env, struct query_info* qinfo,
usr.sbin/unbound/services/cache/dns.h
267
struct msgreply_entry* msg_cache_lookup(struct module_env* env,
usr.sbin/unbound/services/cache/dns.h
280
void msg_cache_remove(struct module_env* env, uint8_t* qname, size_t qnamelen,
usr.sbin/unbound/services/cache/dns.h
97
int dns_cache_store(struct module_env* env, struct query_info* qinf,
usr.sbin/unbound/services/localzone.c
1339
local_encode(struct query_info* qinfo, struct module_env* env,
usr.sbin/unbound/services/localzone.c
1361
if(!inplace_cb_reply_local_call(env, qinfo, NULL, &rep, rcode, edns,
usr.sbin/unbound/services/localzone.c
1362
repinfo, temp, env->now_tv) || !reply_info_answer_encode(qinfo, &rep,
usr.sbin/unbound/services/localzone.c
1374
local_error_encode(struct query_info* qinfo, struct module_env* env,
usr.sbin/unbound/services/localzone.c
1384
if(!inplace_cb_reply_local_call(env, qinfo, NULL, NULL,
usr.sbin/unbound/services/localzone.c
1385
rcode, edns, repinfo, temp, env->now_tv))
usr.sbin/unbound/services/localzone.c
1388
if(ede_code != LDNS_EDE_NONE && env->cfg->ede) {
usr.sbin/unbound/services/localzone.c
1510
local_data_answer(struct local_zone* z, struct module_env* env,
usr.sbin/unbound/services/localzone.c
1542
return local_encode(qinfo, env, edns, repinfo, buf, temp,
usr.sbin/unbound/services/localzone.c
1588
local_error_encode(qinfo, env, edns, repinfo,
usr.sbin/unbound/services/localzone.c
1636
return local_encode(qinfo, env, edns, repinfo, buf, temp, &r, 1,
usr.sbin/unbound/services/localzone.c
1639
return local_encode(qinfo, env, edns, repinfo, buf, temp, lr->rrset, 1,
usr.sbin/unbound/services/localzone.c
1682
local_zones_zone_answer(struct local_zone* z, struct module_env* env,
usr.sbin/unbound/services/localzone.c
1696
local_error_encode(qinfo, env, edns, repinfo, buf, temp,
usr.sbin/unbound/services/localzone.c
1721
return local_encode(qinfo, env, edns, repinfo, buf, temp,
usr.sbin/unbound/services/localzone.c
1723
local_error_encode(qinfo, env, edns, repinfo, buf, temp,
usr.sbin/unbound/services/localzone.c
1733
local_error_encode(qinfo, env, edns, repinfo, buf, temp,
usr.sbin/unbound/services/localzone.c
1772
return local_encode(qinfo, env, edns, repinfo, buf, temp,
usr.sbin/unbound/services/localzone.c
1776
local_error_encode(qinfo, env, edns, repinfo, buf,
usr.sbin/unbound/services/localzone.c
1789
return local_encode(qinfo, env, edns, repinfo, buf, temp,
usr.sbin/unbound/services/localzone.c
1792
local_error_encode(qinfo, env, edns, repinfo, buf, temp, rcode,
usr.sbin/unbound/services/localzone.c
1874
local_zones_answer(struct local_zones* zones, struct module_env* env,
usr.sbin/unbound/services/localzone.c
1945
if((env->cfg->log_local_actions ||
usr.sbin/unbound/services/localzone.c
1959
&& local_data_answer(z, env, qinfo, edns, repinfo, buf, temp, labs,
usr.sbin/unbound/services/localzone.c
1966
r = local_zones_zone_answer(z, env, qinfo, edns, repinfo, buf, temp, ld, lzt);
usr.sbin/unbound/services/localzone.h
332
int local_zones_answer(struct local_zones* zones, struct module_env* env,
usr.sbin/unbound/services/localzone.h
353
local_zones_zone_answer(struct local_zone* z, struct module_env* env,
usr.sbin/unbound/services/localzone.h
616
local_data_answer(struct local_zone* z, struct module_env* env,
usr.sbin/unbound/services/mesh.c
1003
alloc_reg_release(env->alloc, region);
usr.sbin/unbound/services/mesh.c
1026
alloc_reg_release(env->alloc, region);
usr.sbin/unbound/services/mesh.c
1032
alloc_reg_release(env->alloc, region);
usr.sbin/unbound/services/mesh.c
1045
mstate->s.env = env;
usr.sbin/unbound/services/mesh.c
1054
mstate->s.qstarttime = *env->now;
usr.sbin/unbound/services/mesh.c
1057
for(i=0; i<env->mesh->mods.num; i++) {
usr.sbin/unbound/services/mesh.c
1083
mesh = mstate->s.env->mesh;
usr.sbin/unbound/services/mesh.c
1106
infra_wait_limit_dec(mesh->env->infra_cache,
usr.sbin/unbound/services/mesh.c
1107
&rep->query_reply, mesh->env->cfg);
usr.sbin/unbound/services/mesh.c
1129
alloc_reg_release(mstate->s.env->alloc, mstate->s.region);
usr.sbin/unbound/services/mesh.c
1141
mesh = mstate->s.env->mesh;
usr.sbin/unbound/services/mesh.c
1201
struct mesh_area* mesh = qstate->env->mesh;
usr.sbin/unbound/services/mesh.c
1231
struct mesh_area* mesh = qstate->env->mesh;
usr.sbin/unbound/services/mesh.c
1238
*sub = mesh_state_create(qstate->env, qinfo, cinfo, qflags,
usr.sbin/unbound/services/mesh.c
1276
struct mesh_area* mesh = qstate->env->mesh;
usr.sbin/unbound/services/mesh.c
1364
if(!inplace_cb_reply_servfail_call(m->s.env, &m->s.qinfo, &m->s,
usr.sbin/unbound/services/mesh.c
1368
if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep, rcode,
usr.sbin/unbound/services/mesh.c
1382
if(m->s.env->cfg->disable_edns_do && (r->edns.bits&EDNS_DO))
usr.sbin/unbound/services/mesh.c
1385
if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep,
usr.sbin/unbound/services/mesh.c
1389
m->s.env->scratch, udp_size, &r->edns,
usr.sbin/unbound/services/mesh.c
1403
log_assert(m->s.env->mesh->num_reply_addrs > 0);
usr.sbin/unbound/services/mesh.c
1404
m->s.env->mesh->num_reply_addrs--;
usr.sbin/unbound/services/mesh.c
1480
if(m->s.env->need_to_validate && (!(r->qflags&BIT_CD) ||
usr.sbin/unbound/services/mesh.c
1481
m->s.env->cfg->ignore_cd) && rep &&
usr.sbin/unbound/services/mesh.c
1485
if(m->s.env->cfg->stat_extended)
usr.sbin/unbound/services/mesh.c
1486
m->s.env->mesh->ans_bogus++;
usr.sbin/unbound/services/mesh.c
1513
!m->s.env->inplace_cb_lists[inplace_cb_reply]) ||
usr.sbin/unbound/services/mesh.c
1515
!m->s.env->inplace_cb_lists[inplace_cb_reply_servfail])) &&
usr.sbin/unbound/services/mesh.c
1537
if(!inplace_cb_reply_servfail_call(m->s.env, &m->s.qinfo, &m->s,
usr.sbin/unbound/services/mesh.c
1541
if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep, rcode,
usr.sbin/unbound/services/mesh.c
1549
if(m->s.env->cfg->ede && rep) {
usr.sbin/unbound/services/mesh.c
1563
if(m->s.env->cfg->disable_edns_do && (r->edns.bits&EDNS_DO))
usr.sbin/unbound/services/mesh.c
1571
if(m->s.env->cfg->ede && rep &&
usr.sbin/unbound/services/mesh.c
1577
if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep,
usr.sbin/unbound/services/mesh.c
1580
r->qflags, r_buffer, 0, 1, m->s.env->scratch,
usr.sbin/unbound/services/mesh.c
1584
if(!inplace_cb_reply_servfail_call(m->s.env, &m->s.qinfo, &m->s,
usr.sbin/unbound/services/mesh.c
1596
infra_wait_limit_dec(m->s.env->infra_cache, &r->query_reply,
usr.sbin/unbound/services/mesh.c
1597
m->s.env->cfg);
usr.sbin/unbound/services/mesh.c
1599
log_assert(m->s.env->mesh->num_reply_addrs > 0);
usr.sbin/unbound/services/mesh.c
1600
m->s.env->mesh->num_reply_addrs--;
usr.sbin/unbound/services/mesh.c
1601
end_time = *m->s.env->now_tv;
usr.sbin/unbound/services/mesh.c
1605
m->s.env->mesh->replies_sent++;
usr.sbin/unbound/services/mesh.c
1606
timeval_add(&m->s.env->mesh->replies_sum_wait, &duration);
usr.sbin/unbound/services/mesh.c
1607
timehist_insert(m->s.env->mesh->histogram, &duration);
usr.sbin/unbound/services/mesh.c
1608
if(m->s.env->cfg->stat_extended) {
usr.sbin/unbound/services/mesh.c
1611
if(secure) m->s.env->mesh->ans_secure++;
usr.sbin/unbound/services/mesh.c
1612
m->s.env->mesh->ans_rcode[ rc ] ++;
usr.sbin/unbound/services/mesh.c
1614
m->s.env->mesh->ans_nodata++;
usr.sbin/unbound/services/mesh.c
1617
if(m->s.env->cfg->log_replies) {
usr.sbin/unbound/services/mesh.c
1621
(m->s.env->cfg->log_destaddr?(void*)r->query_reply.c->socket->addr:NULL),
usr.sbin/unbound/services/mesh.c
1728
qstate->env->mesh->num_dns_error_reports++;
usr.sbin/unbound/services/mesh.c
1754
if(mstate->s.env->cfg->serve_expired) {
usr.sbin/unbound/services/mesh.c
1759
&& mstate->s.env->cfg->log_servfail
usr.sbin/unbound/services/mesh.c
1760
&& !mstate->s.env->cfg->val_log_squelch) {
usr.sbin/unbound/services/mesh.c
1766
if(mstate->reply_list && mstate->s.env->cfg->dns_error_reporting)
usr.sbin/unbound/services/mesh.c
1779
timeval_subtract(&old, mstate->s.env->now_tv, &r->start_time);
usr.sbin/unbound/services/mesh.c
1780
if(mstate->s.env->cfg->discard_timeout != 0 &&
usr.sbin/unbound/services/mesh.c
1782
mstate->s.env->cfg->discard_timeout) {
usr.sbin/unbound/services/mesh.c
1791
infra_wait_limit_dec(mstate->s.env->infra_cache,
usr.sbin/unbound/services/mesh.c
1792
&r->query_reply, mstate->s.env->cfg);
usr.sbin/unbound/services/mesh.c
1800
log_assert(mstate->s.env->mesh->num_reply_addrs > 0);
usr.sbin/unbound/services/mesh.c
1801
mstate->s.env->mesh->num_reply_addrs--;
usr.sbin/unbound/services/mesh.c
1802
mstate->s.env->mesh->num_queries_discard_timeout++;
usr.sbin/unbound/services/mesh.c
1830
infra_wait_limit_dec(mstate->s.env->infra_cache,
usr.sbin/unbound/services/mesh.c
1831
&r->query_reply, mstate->s.env->cfg);
usr.sbin/unbound/services/mesh.c
1840
log_assert(mstate->s.env->mesh->num_reply_addrs > 0);
usr.sbin/unbound/services/mesh.c
1841
mstate->s.env->mesh->num_reply_addrs--;
usr.sbin/unbound/services/mesh.c
1863
mstate->s.env->cfg->stat_extended &&
usr.sbin/unbound/services/mesh.c
1866
mstate->s.env->mesh->rpz_action[RPZ_DISABLED_ACTION] += i;
usr.sbin/unbound/services/mesh.c
1868
mstate->s.env->mesh->rpz_action[RPZ_CNAME_OVERRIDE_ACTION] += i;
usr.sbin/unbound/services/mesh.c
1870
mstate->s.env->mesh->rpz_action[respip_action_to_rpz_action(
usr.sbin/unbound/services/mesh.c
1874
if(mstate->s.env->cfg->stat_extended
usr.sbin/unbound/services/mesh.c
1876
mstate->s.env->mesh->ans_cachedb += i;
usr.sbin/unbound/services/mesh.c
1885
log_assert(mstate->s.env->mesh->num_reply_states > 0);
usr.sbin/unbound/services/mesh.c
1886
mstate->s.env->mesh->num_reply_states--;
usr.sbin/unbound/services/mesh.c
1890
mstate->s.env->mesh->num_detached_states++;
usr.sbin/unbound/services/mesh.c
1899
log_assert(mstate->s.env->mesh->num_reply_states > 0);
usr.sbin/unbound/services/mesh.c
1900
mstate->s.env->mesh->num_reply_states--;
usr.sbin/unbound/services/mesh.c
1905
mstate->s.env->mesh->num_detached_states++;
usr.sbin/unbound/services/mesh.c
2019
r->start_time = *s->s.env->now_tv;
usr.sbin/unbound/services/mesh.c
207
mesh_create(struct module_stack* stack, struct module_env* env)
usr.sbin/unbound/services/mesh.c
2091
struct regional* region = mstate->s.env->scratch;
usr.sbin/unbound/services/mesh.c
215
mesh->qbuf_bak = sldns_buffer_new(env->cfg->msg_buffer_size);
usr.sbin/unbound/services/mesh.c
2186
mstate->s.env->unique_mesh) {
usr.sbin/unbound/services/mesh.c
2205
mstate->s.env->cfg->client_subnet_opcode)) != NULL) {
usr.sbin/unbound/services/mesh.c
2209
mstate->s.env->scratch);
usr.sbin/unbound/services/mesh.c
222
mesh->env = env;
usr.sbin/unbound/services/mesh.c
2248
regional_free_all(mstate->s.env->scratch);
usr.sbin/unbound/services/mesh.c
2361
struct mesh_area* mesh = qstate->env->mesh;
usr.sbin/unbound/services/mesh.c
237
mesh->max_reply_states = env->cfg->num_queries_per_thread;
usr.sbin/unbound/services/mesh.c
240
mesh->jostle_max.tv_sec = (time_t)(env->cfg->jostle_time / 1000);
usr.sbin/unbound/services/mesh.c
2407
infra_wait_limit_dec(mesh->env->infra_cache,
usr.sbin/unbound/services/mesh.c
2408
&n->query_reply, mesh->env->cfg);
usr.sbin/unbound/services/mesh.c
241
mesh->jostle_max.tv_usec = (time_t)((env->cfg->jostle_time % 1000)
usr.sbin/unbound/services/mesh.c
2451
alias_rrset, 0, qstate->region, az, NULL, qstate->env->views,
usr.sbin/unbound/services/mesh.c
2452
qstate->env->respip_set))
usr.sbin/unbound/services/mesh.c
2472
struct mesh_area* mesh = qstate->env->mesh;
usr.sbin/unbound/services/mesh.c
2486
|| qstate->env->cfg->ignore_cd) && qstate->env->need_to_validate;
usr.sbin/unbound/services/mesh.c
2523
qstate->env->auth_zones)) {
usr.sbin/unbound/services/mesh.c
2528
qstate->env->auth_zones, qstate->env->views,
usr.sbin/unbound/services/mesh.c
2529
qstate->env->respip_set)) {
usr.sbin/unbound/services/mesh.c
2573
timeval_subtract(&old, mstate->s.env->now_tv, &r->start_time);
usr.sbin/unbound/services/mesh.c
2574
if(mstate->s.env->cfg->discard_timeout != 0 &&
usr.sbin/unbound/services/mesh.c
2576
mstate->s.env->cfg->discard_timeout) {
usr.sbin/unbound/services/mesh.c
2585
infra_wait_limit_dec(mstate->s.env->infra_cache,
usr.sbin/unbound/services/mesh.c
2586
&r->query_reply, mstate->s.env->cfg);
usr.sbin/unbound/services/mesh.c
2594
log_assert(mstate->s.env->mesh->num_reply_addrs > 0);
usr.sbin/unbound/services/mesh.c
2595
mstate->s.env->mesh->num_reply_addrs--;
usr.sbin/unbound/services/mesh.c
2596
mstate->s.env->mesh->num_queries_discard_timeout++;
usr.sbin/unbound/services/mesh.c
2616
qstate->env->cfg->ede_serve_expired &&
usr.sbin/unbound/services/mesh.c
2617
qstate->env->cfg->ede &&
usr.sbin/unbound/services/mesh.c
2631
infra_wait_limit_dec(mstate->s.env->infra_cache,
usr.sbin/unbound/services/mesh.c
2632
&r->query_reply, mstate->s.env->cfg);
usr.sbin/unbound/services/mesh.c
2639
if(actinfo.addrinfo && qstate->env->cfg->stat_extended &&
usr.sbin/unbound/services/mesh.c
2642
qstate->env->mesh->rpz_action[RPZ_DISABLED_ACTION] += i;
usr.sbin/unbound/services/mesh.c
2644
qstate->env->mesh->rpz_action[RPZ_CNAME_OVERRIDE_ACTION] += i;
usr.sbin/unbound/services/mesh.c
2646
qstate->env->mesh->rpz_action[
usr.sbin/unbound/services/mesh.c
2668
log_assert(qstate->env->mesh->num_reply_states > 0);
usr.sbin/unbound/services/mesh.c
2669
qstate->env->mesh->num_reply_states--;
usr.sbin/unbound/services/mesh.c
2674
qstate->env->mesh->num_detached_states++;
usr.sbin/unbound/services/mesh.c
304
timeval_subtract(&age, mesh->env->now_tv,
usr.sbin/unbound/services/mesh.c
343
time_t timenow = *qstate->env->now;
usr.sbin/unbound/services/mesh.c
345
|| qstate->env->cfg->ignore_cd) && qstate->env->need_to_validate;
usr.sbin/unbound/services/mesh.c
349
e = slabhash_lookup(qstate->env->msg_cache, h, lookup_qinfo, 0);
usr.sbin/unbound/services/mesh.c
355
msg = tomsg(qstate->env, &key->key, data, qstate->region, timenow,
usr.sbin/unbound/services/mesh.c
356
qstate->env->cfg->serve_expired, qstate->env->scratch);
usr.sbin/unbound/services/mesh.c
415
mstate->s.env->worker_base, mesh_serve_expired_callback, mstate);
usr.sbin/unbound/services/mesh.c
433
int unique = unique_mesh_state(edns->opt_list_in, mesh->env);
usr.sbin/unbound/services/mesh.c
437
int timeout = mesh->env->cfg->serve_expired?
usr.sbin/unbound/services/mesh.c
438
mesh->env->cfg->serve_expired_client_timeout:0;
usr.sbin/unbound/services/mesh.c
444
if(!infra_wait_limit_allowed(mesh->env->infra_cache, rep,
usr.sbin/unbound/services/mesh.c
445
edns->cookie_valid, mesh->env->cfg)) {
usr.sbin/unbound/services/mesh.c
450
mesh->env->scratch, LDNS_EDE_OTHER,
usr.sbin/unbound/services/mesh.c
452
if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, NULL, NULL,
usr.sbin/unbound/services/mesh.c
453
LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
usr.sbin/unbound/services/mesh.c
457
regional_free_all(mesh->env->scratch);
usr.sbin/unbound/services/mesh.c
497
s = mesh_state_create(mesh->env, qinfo, cinfo,
usr.sbin/unbound/services/mesh.c
501
if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, NULL, NULL,
usr.sbin/unbound/services/mesh.c
502
LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
usr.sbin/unbound/services/mesh.c
520
if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, NULL,
usr.sbin/unbound/services/mesh.c
521
NULL, LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
usr.sbin/unbound/services/mesh.c
568
if(!timeout && mesh->env->cfg->serve_expired &&
usr.sbin/unbound/services/mesh.c
569
!mesh->env->cfg->serve_expired_client_timeout &&
usr.sbin/unbound/services/mesh.c
570
(mesh->env->cachedb_enabled &&
usr.sbin/unbound/services/mesh.c
571
mesh->env->cfg->cachedb_check_when_serve_expired)) {
usr.sbin/unbound/services/mesh.c
578
infra_wait_limit_inc(mesh->env->infra_cache, rep, *mesh->env->now,
usr.sbin/unbound/services/mesh.c
579
mesh->env->cfg);
usr.sbin/unbound/services/mesh.c
607
if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, &s->s,
usr.sbin/unbound/services/mesh.c
608
NULL, LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
usr.sbin/unbound/services/mesh.c
628
int unique = unique_mesh_state(edns->opt_list_in, mesh->env);
usr.sbin/unbound/services/mesh.c
629
int timeout = mesh->env->cfg->serve_expired?
usr.sbin/unbound/services/mesh.c
630
mesh->env->cfg->serve_expired_client_timeout:0;
usr.sbin/unbound/services/mesh.c
645
s = mesh_state_create(mesh->env, qinfo, NULL,
usr.sbin/unbound/services/mesh.c
691
if(!timeout && mesh->env->cfg->serve_expired &&
usr.sbin/unbound/services/mesh.c
692
!mesh->env->cfg->serve_expired_client_timeout &&
usr.sbin/unbound/services/mesh.c
693
(mesh->env->cachedb_enabled &&
usr.sbin/unbound/services/mesh.c
694
mesh->env->cfg->cachedb_check_when_serve_expired)) {
usr.sbin/unbound/services/mesh.c
750
s = mesh_state_create(mesh->env, qinfo, NULL, mesh_flags, 0, 0);
usr.sbin/unbound/services/mesh.c
821
s = mesh_state_create(mesh->env, qinfo, NULL, mesh_flags, 0, 0);
usr.sbin/unbound/services/mesh.c
828
opt = edns_opt_list_find(edns_list, mesh->env->cfg->client_subnet_opcode);
usr.sbin/unbound/services/mesh.c
991
mesh_state_create(struct module_env* env, struct query_info* qinfo,
usr.sbin/unbound/services/mesh.c
995
struct regional* region = alloc_reg_obtain(env->alloc);
usr.sbin/unbound/services/mesh.h
299
struct module_env* env);
usr.sbin/unbound/services/mesh.h
505
struct mesh_state* mesh_state_create(struct module_env* env,
usr.sbin/unbound/services/mesh.h
86
struct module_env* env;
usr.sbin/unbound/services/modstack.c
237
struct module_env* env)
usr.sbin/unbound/services/modstack.c
252
if(!(*stack->mod[i]->startup)(env, i)) {
usr.sbin/unbound/services/modstack.c
263
struct module_env* env)
usr.sbin/unbound/services/modstack.c
267
env->need_to_validate = 0; /* set by module init below */
usr.sbin/unbound/services/modstack.c
295
if(!(*stack->mod[i]->init)(env, i)) {
usr.sbin/unbound/services/modstack.c
305
modstack_call_deinit(struct module_stack* stack, struct module_env* env)
usr.sbin/unbound/services/modstack.c
310
(*stack->mod[i]->deinit)(env, i);
usr.sbin/unbound/services/modstack.c
315
modstack_call_destartup(struct module_stack* stack, struct module_env* env)
usr.sbin/unbound/services/modstack.c
322
(*stack->mod[i]->destartup)(env, i);
usr.sbin/unbound/services/modstack.c
338
mod_get_mem(struct module_env* env, const char* name)
usr.sbin/unbound/services/modstack.c
340
int m = modstack_find(&env->mesh->mods, name);
usr.sbin/unbound/services/modstack.c
342
fptr_ok(fptr_whitelist_mod_get_mem(env->mesh->
usr.sbin/unbound/services/modstack.c
344
return (*env->mesh->mods.mod[m]->get_mem)(env, m);
usr.sbin/unbound/services/modstack.h
113
struct module_env* env);
usr.sbin/unbound/services/modstack.h
120
void modstack_call_deinit(struct module_stack* stack, struct module_env* env);
usr.sbin/unbound/services/modstack.h
127
void modstack_call_destartup(struct module_stack* stack, struct module_env* env);
usr.sbin/unbound/services/modstack.h
138
size_t mod_get_mem(struct module_env* env, const char* name);
usr.sbin/unbound/services/modstack.h
78
struct module_env* env);
usr.sbin/unbound/services/outside_network.c
3491
sldns_buffer* buff, struct module_env* env, int* was_ratelimited)
usr.sbin/unbound/services/outside_network.c
3506
region = alloc_reg_obtain(env->alloc);
usr.sbin/unbound/services/outside_network.c
3512
alloc_reg_release(env->alloc, region);
usr.sbin/unbound/services/outside_network.c
3518
if(!inplace_cb_query_call(env, qinfo, flags, addr, addrlen, zone,
usr.sbin/unbound/services/outside_network.c
3520
alloc_reg_release(env->alloc, region);
usr.sbin/unbound/services/outside_network.c
3529
&env->edns_strings->client_strings, addr, addrlen))) {
usr.sbin/unbound/services/outside_network.c
3531
env->edns_strings->client_string_opcode,
usr.sbin/unbound/services/outside_network.c
3543
timenow = *env->now;
usr.sbin/unbound/services/outside_network.c
3544
if(!infra_ratelimit_inc(env->infra_cache, zone,
usr.sbin/unbound/services/outside_network.c
3545
zonelen, timenow, env->cfg->ratelimit_backoff,
usr.sbin/unbound/services/outside_network.c
3551
if(env->cfg->ratelimit_factor == 0 ||
usr.sbin/unbound/services/outside_network.c
3552
ub_random_max(env->rnd,
usr.sbin/unbound/services/outside_network.c
3553
env->cfg->ratelimit_factor) != 1) {
usr.sbin/unbound/services/outside_network.c
3555
alloc_reg_release(env->alloc, region);
usr.sbin/unbound/services/outside_network.c
3569
( ssl_upstream && env->cfg->pad_queries
usr.sbin/unbound/services/outside_network.c
3570
? env->cfg->pad_queries_block_size : 0 ),
usr.sbin/unbound/services/outside_network.c
3571
env->alloc, region);
usr.sbin/unbound/services/outside_network.c
3574
infra_ratelimit_dec(env->infra_cache,
usr.sbin/unbound/services/outside_network.c
3582
infra_ratelimit_dec(env->infra_cache,
usr.sbin/unbound/services/outside_network.c
3593
alloc_reg_release(env->alloc, region);
usr.sbin/unbound/services/outside_network.h
709
struct sldns_buffer* buff, struct module_env* env, int* was_ratelimited);
usr.sbin/unbound/services/rpz.c
1774
rpz_local_encode(struct module_env* env, struct query_info* qinfo,
usr.sbin/unbound/services/rpz.c
1807
if(!inplace_cb_reply_local_call(env, qinfo, NULL, &rep, rcode, edns,
usr.sbin/unbound/services/rpz.c
1808
repinfo, temp, env->now_tv) ||
usr.sbin/unbound/services/rpz.c
1843
struct module_env* env, struct query_info* qinfo,
usr.sbin/unbound/services/rpz.c
1892
rpz_local_encode(env, qinfo, edns, repinfo, buf, temp, rp,
usr.sbin/unbound/services/rpz.c
2237
rpz_synthesize_qname_localdata(struct module_env* env, struct rpz* r,
usr.sbin/unbound/services/rpz.c
2255
if(lzt == local_zone_redirect && local_data_answer(z, env, qinfo,
usr.sbin/unbound/services/rpz.c
2267
ret = local_zones_zone_answer(z, env, qinfo, edns, repinfo, buf, temp,
usr.sbin/unbound/services/rpz.c
2361
if(ms->env->worker)
usr.sbin/unbound/services/rpz.c
2362
ms->env->worker->stats.rpz_action[action]++;
usr.sbin/unbound/services/rpz.c
2423
if(ms->env->worker)
usr.sbin/unbound/services/rpz.c
2424
ms->env->worker->stats.rpz_action[action]++;
usr.sbin/unbound/services/rpz.c
2483
if(ms->env == NULL || ms->env->auth_zones == NULL) { return 0; }
usr.sbin/unbound/services/rpz.c
2485
az = ms->env->auth_zones;
usr.sbin/unbound/services/rpz.c
2558
if(ms->env == NULL || ms->env->auth_zones == NULL) { return 0; }
usr.sbin/unbound/services/rpz.c
2559
az = ms->env->auth_zones;
usr.sbin/unbound/services/rpz.c
2584
if(ms->env->worker)
usr.sbin/unbound/services/rpz.c
2585
ms->env->worker->stats.rpz_action[r->action_override]++;
usr.sbin/unbound/services/rpz.c
2660
rpz_apply_maybe_clientip_trigger(struct auth_zones* az, struct module_env* env,
usr.sbin/unbound/services/rpz.c
2701
rpz_apply_clientip_localdata_action(node, env, qinfo,
usr.sbin/unbound/services/rpz.c
2712
local_zones_zone_answer(*z_out /*likely NULL, no zone*/, env, qinfo, edns,
usr.sbin/unbound/services/rpz.c
2739
rpz_callback_from_worker_request(struct auth_zones* az, struct module_env* env,
usr.sbin/unbound/services/rpz.c
2750
int clientip_trigger = rpz_apply_maybe_clientip_trigger(az, env, qinfo,
usr.sbin/unbound/services/rpz.c
2794
ret = rpz_synthesize_qname_localdata(env, r, z, lzt, qinfo, edns, buf, temp,
usr.sbin/unbound/services/rpz.h
180
int rpz_callback_from_worker_request(struct auth_zones* az, struct module_env* env,
usr.sbin/unbound/smallapp/unbound-checkconf.c
135
struct module_env env;
usr.sbin/unbound/smallapp/unbound-checkconf.c
136
memset(&env, 0, sizeof(env));
usr.sbin/unbound/smallapp/unbound-checkconf.c
137
env.cfg = cfg;
usr.sbin/unbound/smallapp/unbound-checkconf.c
138
env.scratch = regional_create();
usr.sbin/unbound/smallapp/unbound-checkconf.c
139
env.scratch_buffer = sldns_buffer_new(BUFSIZ);
usr.sbin/unbound/smallapp/unbound-checkconf.c
140
if(!env.scratch || !env.scratch_buffer)
usr.sbin/unbound/smallapp/unbound-checkconf.c
142
if(!edns_known_options_init(&env))
usr.sbin/unbound/smallapp/unbound-checkconf.c
144
if(fb->startup && !(*fb->startup)(&env, 0))
usr.sbin/unbound/smallapp/unbound-checkconf.c
146
if(!(*fb->init)(&env, 0))
usr.sbin/unbound/smallapp/unbound-checkconf.c
148
(*fb->deinit)(&env, 0);
usr.sbin/unbound/smallapp/unbound-checkconf.c
150
(*fb->destartup)(&env, 0);
usr.sbin/unbound/smallapp/unbound-checkconf.c
151
sldns_buffer_free(env.scratch_buffer);
usr.sbin/unbound/smallapp/unbound-checkconf.c
152
regional_destroy(env.scratch);
usr.sbin/unbound/smallapp/unbound-checkconf.c
153
edns_known_options_delete(&env);
usr.sbin/unbound/testcode/fake_event.c
1279
struct module_env* env, int* ATTR_UNUSED(was_ratelimited))
usr.sbin/unbound/testcode/fake_event.c
1323
if(!inplace_cb_query_call(env, qinfo, flags, addr, addrlen,
usr.sbin/unbound/testcode/fake_event.c
1333
&env->edns_strings->client_strings,
usr.sbin/unbound/testcode/fake_event.c
1336
env->edns_strings->client_string_opcode,
usr.sbin/unbound/testcode/fake_event.c
733
slabhash_remove(runtime->daemon->env->msg_cache, h, &k);
usr.sbin/unbound/testcode/fake_event.c
759
e = slabhash_lookup(runtime->daemon->env->msg_cache, h, &k, 0);
usr.sbin/unbound/testcode/unitecs.c
164
struct module_env env;
usr.sbin/unbound/testcode/unitecs.c
170
t = addrtree_create(100, &elemfree, &unittest_wrapper_subnetmod_sizefunc, &env, 0);
usr.sbin/unbound/testcode/unitecs.c
187
t = addrtree_create(8, &elemfree, &unittest_wrapper_subnetmod_sizefunc, &env, 0);
usr.sbin/unbound/testcode/unitecs.c
199
t = addrtree_create(8, &elemfree, &unittest_wrapper_subnetmod_sizefunc, &env, 27);
usr.sbin/unbound/testcode/unitverify.c
182
verifytest_rrset(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/testcode/unitverify.c
198
sec = dnskeyset_verify_rrset(env, ve, rrset, dnskey, sigalg, &reason,
usr.sbin/unbound/testcode/unitverify.c
216
struct ub_packed_rrset_key* dnskey, struct module_env* env,
usr.sbin/unbound/testcode/unitverify.c
233
verifytest_rrset(env, ve, rep->rrsets[i], dnskey, &qinfo);
usr.sbin/unbound/testcode/unitverify.c
255
struct regional* region, sldns_buffer* pkt, struct module_env* env)
usr.sbin/unbound/testcode/unitverify.c
275
ret = ds_digest_match_dnskey(env, dnskey, 0, ds, 0);
usr.sbin/unbound/testcode/unitverify.c
310
struct module_env env;
usr.sbin/unbound/testcode/unitverify.c
318
memset(&env, 0, sizeof(env));
usr.sbin/unbound/testcode/unitverify.c
320
env.scratch = region;
usr.sbin/unbound/testcode/unitverify.c
321
env.scratch_buffer = buf;
usr.sbin/unbound/testcode/unitverify.c
322
env.now = &now;
usr.sbin/unbound/testcode/unitverify.c
331
verifytest_entry(e, &alloc, region, buf, dnskey, &env, &ve);
usr.sbin/unbound/testcode/unitverify.c
355
struct module_env env;
usr.sbin/unbound/testcode/unitverify.c
361
memset(&env, 0, sizeof(env));
usr.sbin/unbound/testcode/unitverify.c
362
env.scratch = region;
usr.sbin/unbound/testcode/unitverify.c
363
env.scratch_buffer = buf;
usr.sbin/unbound/testcode/unitverify.c
368
dstest_entry(e, &alloc, region, buf, &env);
usr.sbin/unbound/testcode/unitzonemd.c
259
struct module_env env;
usr.sbin/unbound/testcode/unitzonemd.c
264
memset(&env, 0, sizeof(env));
usr.sbin/unbound/testcode/unitzonemd.c
265
env.scratch = regional_create();
usr.sbin/unbound/testcode/unitzonemd.c
266
if(!env.scratch)
usr.sbin/unbound/testcode/unitzonemd.c
268
env.scratch_buffer = sldns_buffer_new(65553);
usr.sbin/unbound/testcode/unitzonemd.c
269
if(!env.scratch_buffer)
usr.sbin/unbound/testcode/unitzonemd.c
271
env.cfg = config_create();
usr.sbin/unbound/testcode/unitzonemd.c
272
if(!env.cfg)
usr.sbin/unbound/testcode/unitzonemd.c
274
config_auto_slab_values(env.cfg);
usr.sbin/unbound/testcode/unitzonemd.c
275
env.now = &now;
usr.sbin/unbound/testcode/unitzonemd.c
276
env.cfg->val_date_override = cfg_convert_timeval(date_override);
usr.sbin/unbound/testcode/unitzonemd.c
277
if(!env.cfg->val_date_override)
usr.sbin/unbound/testcode/unitzonemd.c
279
if(env.cfg->module_conf)
usr.sbin/unbound/testcode/unitzonemd.c
280
free(env.cfg->module_conf);
usr.sbin/unbound/testcode/unitzonemd.c
281
env.cfg->module_conf = strdup("validator iterator");
usr.sbin/unbound/testcode/unitzonemd.c
282
if(!env.cfg->module_conf)
usr.sbin/unbound/testcode/unitzonemd.c
285
if(!cfg_strlist_insert(&env.cfg->trust_anchor_list,
usr.sbin/unbound/testcode/unitzonemd.c
289
env.anchors = anchors_create();
usr.sbin/unbound/testcode/unitzonemd.c
290
if(!env.anchors)
usr.sbin/unbound/testcode/unitzonemd.c
292
env.auth_zones = auth_zones_create();
usr.sbin/unbound/testcode/unitzonemd.c
293
if(!env.auth_zones)
usr.sbin/unbound/testcode/unitzonemd.c
296
if(!modstack_call_startup(&mods, env.cfg->module_conf, &env))
usr.sbin/unbound/testcode/unitzonemd.c
298
if(!modstack_call_init(&mods, env.cfg->module_conf, &env))
usr.sbin/unbound/testcode/unitzonemd.c
300
env.mesh = mesh_create(&mods, &env);
usr.sbin/unbound/testcode/unitzonemd.c
301
if(!env.mesh)
usr.sbin/unbound/testcode/unitzonemd.c
305
z = authtest_addzone(env.auth_zones, zname, zfile);
usr.sbin/unbound/testcode/unitzonemd.c
312
auth_zone_verify_zonemd(z, &env, &mods, &result, 1, 0);
usr.sbin/unbound/testcode/unitzonemd.c
336
mesh_delete(env.mesh);
usr.sbin/unbound/testcode/unitzonemd.c
337
modstack_call_deinit(&mods, &env);
usr.sbin/unbound/testcode/unitzonemd.c
338
modstack_call_destartup(&mods, &env);
usr.sbin/unbound/testcode/unitzonemd.c
340
auth_zones_delete(env.auth_zones);
usr.sbin/unbound/testcode/unitzonemd.c
341
anchors_delete(env.anchors);
usr.sbin/unbound/testcode/unitzonemd.c
342
config_delete(env.cfg);
usr.sbin/unbound/testcode/unitzonemd.c
343
regional_destroy(env.scratch);
usr.sbin/unbound/testcode/unitzonemd.c
344
sldns_buffer_free(env.scratch_buffer);
usr.sbin/unbound/util/data/msgreply.c
1259
int inplace_cb_reply_call(struct module_env* env, struct query_info* qinfo,
usr.sbin/unbound/util/data/msgreply.c
1265
env->inplace_cb_lists[inplace_cb_reply], inplace_cb_reply, qinfo,
usr.sbin/unbound/util/data/msgreply.c
1269
int inplace_cb_reply_cache_call(struct module_env* env,
usr.sbin/unbound/util/data/msgreply.c
1276
env->inplace_cb_lists[inplace_cb_reply_cache], inplace_cb_reply_cache,
usr.sbin/unbound/util/data/msgreply.c
1280
int inplace_cb_reply_local_call(struct module_env* env,
usr.sbin/unbound/util/data/msgreply.c
1287
env->inplace_cb_lists[inplace_cb_reply_local], inplace_cb_reply_local,
usr.sbin/unbound/util/data/msgreply.c
1291
int inplace_cb_reply_servfail_call(struct module_env* env,
usr.sbin/unbound/util/data/msgreply.c
1301
env->inplace_cb_lists[inplace_cb_reply_servfail],
usr.sbin/unbound/util/data/msgreply.c
1306
int inplace_cb_query_call(struct module_env* env, struct query_info* qinfo,
usr.sbin/unbound/util/data/msgreply.c
1311
struct inplace_cb* cb = env->inplace_cb_lists[inplace_cb_query];
usr.sbin/unbound/util/data/msgreply.c
1322
int inplace_cb_edns_back_parsed_call(struct module_env* env,
usr.sbin/unbound/util/data/msgreply.c
1326
env->inplace_cb_lists[inplace_cb_edns_back_parsed];
usr.sbin/unbound/util/data/msgreply.c
1336
int inplace_cb_query_response_call(struct module_env* env,
usr.sbin/unbound/util/data/msgreply.c
1339
env->inplace_cb_lists[inplace_cb_query_response];
usr.sbin/unbound/util/data/msgreply.h
670
int inplace_cb_reply_call(struct module_env* env, struct query_info* qinfo,
usr.sbin/unbound/util/data/msgreply.h
690
int inplace_cb_reply_cache_call(struct module_env* env,
usr.sbin/unbound/util/data/msgreply.h
711
int inplace_cb_reply_local_call(struct module_env* env,
usr.sbin/unbound/util/data/msgreply.h
733
int inplace_cb_reply_servfail_call(struct module_env* env,
usr.sbin/unbound/util/data/msgreply.h
756
int inplace_cb_query_call(struct module_env* env, struct query_info* qinfo,
usr.sbin/unbound/util/data/msgreply.h
769
int inplace_cb_edns_back_parsed_call(struct module_env* env,
usr.sbin/unbound/util/data/msgreply.h
781
int inplace_cb_query_response_call(struct module_env* env,
usr.sbin/unbound/util/fptr_wlist.c
417
fptr_whitelist_mod_init(int (*fptr)(struct module_env* env, int id))
usr.sbin/unbound/util/fptr_wlist.c
445
fptr_whitelist_mod_deinit(void (*fptr)(struct module_env* env, int id))
usr.sbin/unbound/util/fptr_wlist.c
473
fptr_whitelist_mod_startup(int (*fptr)(struct module_env* env, int id))
usr.sbin/unbound/util/fptr_wlist.c
484
fptr_whitelist_mod_destartup(void (*fptr)(struct module_env* env, int id))
usr.sbin/unbound/util/fptr_wlist.c
582
fptr_whitelist_mod_get_mem(size_t (*fptr)(struct module_env* env, int id))
usr.sbin/unbound/util/fptr_wlist.h
273
int fptr_whitelist_mod_init(int (*fptr)(struct module_env* env, int id));
usr.sbin/unbound/util/fptr_wlist.h
281
int fptr_whitelist_mod_deinit(void (*fptr)(struct module_env* env, int id));
usr.sbin/unbound/util/fptr_wlist.h
289
int fptr_whitelist_mod_startup(int (*fptr)(struct module_env* env, int id));
usr.sbin/unbound/util/fptr_wlist.h
297
int fptr_whitelist_mod_destartup(void (*fptr)(struct module_env* env, int id));
usr.sbin/unbound/util/fptr_wlist.h
332
int fptr_whitelist_mod_get_mem(size_t (*fptr)(struct module_env* env, int id));
usr.sbin/unbound/util/module.c
115
if(qstate->env->cfg->val_log_level < 2 && !qstate->env->cfg->log_servfail)
usr.sbin/unbound/util/module.c
223
if((qstate->env->cfg->val_log_level < 2 && !qstate->env->cfg->log_servfail) || !rr)
usr.sbin/unbound/util/module.c
236
if((qstate->env->cfg->val_log_level < 2 && !qstate->env->cfg->log_servfail) || !str || !dname)
usr.sbin/unbound/util/module.c
244
edns_known_options_init(struct module_env* env)
usr.sbin/unbound/util/module.c
246
env->edns_known_options_num = 0;
usr.sbin/unbound/util/module.c
247
env->edns_known_options = (struct edns_known_option*)calloc(
usr.sbin/unbound/util/module.c
249
if(!env->edns_known_options) return 0;
usr.sbin/unbound/util/module.c
254
edns_known_options_delete(struct module_env* env)
usr.sbin/unbound/util/module.c
256
free(env->edns_known_options);
usr.sbin/unbound/util/module.c
257
env->edns_known_options = NULL;
usr.sbin/unbound/util/module.c
258
env->edns_known_options_num = 0;
usr.sbin/unbound/util/module.c
263
int no_aggregation, struct module_env* env)
usr.sbin/unbound/util/module.c
266
if(env->worker) {
usr.sbin/unbound/util/module.c
278
for(i=0; i<env->edns_known_options_num; i++)
usr.sbin/unbound/util/module.c
279
if(env->edns_known_options[i].opt_code == opt_code)
usr.sbin/unbound/util/module.c
282
if(i == env->edns_known_options_num) {
usr.sbin/unbound/util/module.c
283
if(env->edns_known_options_num >= MAX_KNOWN_EDNS_OPTS) {
usr.sbin/unbound/util/module.c
287
env->edns_known_options_num++;
usr.sbin/unbound/util/module.c
289
env->edns_known_options[i].opt_code = opt_code;
usr.sbin/unbound/util/module.c
290
env->edns_known_options[i].bypass_cache_stage = bypass_cache_stage;
usr.sbin/unbound/util/module.c
291
env->edns_known_options[i].no_aggregation = no_aggregation;
usr.sbin/unbound/util/module.c
297
struct module_env* env, int id)
usr.sbin/unbound/util/module.c
301
if(env->worker) {
usr.sbin/unbound/util/module.c
317
prevp = (struct inplace_cb**) &env->inplace_cb_lists[type];
usr.sbin/unbound/util/module.c
326
inplace_cb_delete(struct module_env* env, enum inplace_cb_list_type type,
usr.sbin/unbound/util/module.c
329
struct inplace_cb* temp = env->inplace_cb_lists[type];
usr.sbin/unbound/util/module.c
335
env->inplace_cb_lists[type] = temp->next;
usr.sbin/unbound/util/module.c
337
temp = env->inplace_cb_lists[type];
usr.sbin/unbound/util/module.c
353
edns_option_is_known(uint16_t opt_code, struct module_env* env)
usr.sbin/unbound/util/module.c
356
for(i=0; i<env->edns_known_options_num; i++)
usr.sbin/unbound/util/module.c
357
if(env->edns_known_options[i].opt_code == opt_code)
usr.sbin/unbound/util/module.c
358
return env->edns_known_options + i;
usr.sbin/unbound/util/module.c
363
edns_bypass_cache_stage(struct edns_option* list, struct module_env* env)
usr.sbin/unbound/util/module.c
367
for(i=0; i<env->edns_known_options_num; i++)
usr.sbin/unbound/util/module.c
368
if(env->edns_known_options[i].opt_code == list->opt_code &&
usr.sbin/unbound/util/module.c
369
env->edns_known_options[i].bypass_cache_stage == 1)
usr.sbin/unbound/util/module.c
375
unique_mesh_state(struct edns_option* list, struct module_env* env)
usr.sbin/unbound/util/module.c
378
if(env->unique_mesh)
usr.sbin/unbound/util/module.c
381
for(i=0; i<env->edns_known_options_num; i++)
usr.sbin/unbound/util/module.c
382
if(env->edns_known_options[i].opt_code == list->opt_code &&
usr.sbin/unbound/util/module.c
383
env->edns_known_options[i].no_aggregation == 1)
usr.sbin/unbound/util/module.c
389
log_edns_known_options(enum verbosity_value level, struct module_env* env)
usr.sbin/unbound/util/module.c
394
if(env->edns_known_options_num > 0 && verbosity >= level) {
usr.sbin/unbound/util/module.c
397
for(i=0; i<env->edns_known_options_num; i++) {
usr.sbin/unbound/util/module.c
401
env->edns_known_options[i].opt_code);
usr.sbin/unbound/util/module.c
403
env->edns_known_options[i].bypass_cache_stage?"YES":"NO",
usr.sbin/unbound/util/module.c
404
env->edns_known_options[i].no_aggregation?"NO":"YES");
usr.sbin/unbound/util/module.c
87
if(!str || (qstate->env->cfg->val_log_level < 2 &&
usr.sbin/unbound/util/module.c
88
!qstate->env->cfg->log_servfail)) {
usr.sbin/unbound/util/module.h
1001
struct module_env* env);
usr.sbin/unbound/util/module.h
669
struct module_env* env;
usr.sbin/unbound/util/module.h
747
int (*startup)(struct module_env* env, int id);
usr.sbin/unbound/util/module.h
757
void (*destartup)(struct module_env* env, int id);
usr.sbin/unbound/util/module.h
767
int (*init)(struct module_env* env, int id);
usr.sbin/unbound/util/module.h
775
void (*deinit)(struct module_env* env, int id);
usr.sbin/unbound/util/module.h
824
size_t (*get_mem)(struct module_env* env, int id);
usr.sbin/unbound/util/module.h
912
int edns_known_options_init(struct module_env* env);
usr.sbin/unbound/util/module.h
918
void edns_known_options_delete(struct module_env* env);
usr.sbin/unbound/util/module.h
933
int no_aggregation, struct module_env* env);
usr.sbin/unbound/util/module.h
947
struct module_env* env, int id);
usr.sbin/unbound/util/module.h
956
inplace_cb_delete(struct module_env* env, enum inplace_cb_list_type type,
usr.sbin/unbound/util/module.h
963
void inplace_cb_lists_delete(struct module_env* env);
usr.sbin/unbound/util/module.h
973
struct module_env* env);
usr.sbin/unbound/util/module.h
983
struct module_env* env);
usr.sbin/unbound/util/module.h
993
int unique_mesh_state(struct edns_option* list, struct module_env* env);
usr.sbin/unbound/util/shm_side/shm_main.c
246
shm_stat->time.now_sec = (long long)worker->env.now_tv->tv_sec;
usr.sbin/unbound/util/shm_side/shm_main.c
247
shm_stat->time.now_usec = (long long)worker->env.now_tv->tv_usec;
usr.sbin/unbound/util/shm_side/shm_main.c
250
stat_timeval_subtract(&shm_stat->time.up_sec, &shm_stat->time.up_usec, worker->env.now_tv, &worker->daemon->time_boot);
usr.sbin/unbound/util/shm_side/shm_main.c
251
stat_timeval_subtract(&shm_stat->time.elapsed_sec, &shm_stat->time.elapsed_usec, worker->env.now_tv, &worker->daemon->time_last_stat);
usr.sbin/unbound/util/shm_side/shm_main.c
253
shm_stat->mem.msg = (long long)slabhash_get_mem(worker->env.msg_cache);
usr.sbin/unbound/util/shm_side/shm_main.c
254
shm_stat->mem.rrset = (long long)slabhash_get_mem(&worker->env.rrset_cache->table);
usr.sbin/unbound/util/shm_side/shm_main.c
264
shm_stat->mem.val = (long long)mod_get_mem(&worker->env, "validator");
usr.sbin/unbound/util/shm_side/shm_main.c
265
shm_stat->mem.iter = (long long)mod_get_mem(&worker->env, "iterator");
usr.sbin/unbound/util/shm_side/shm_main.c
266
shm_stat->mem.respip = (long long)mod_get_mem(&worker->env, "respip");
usr.sbin/unbound/util/shm_side/shm_main.c
273
shm_stat->mem.subnet = (long long)mod_get_mem(&worker->env,
usr.sbin/unbound/util/shm_side/shm_main.c
281
shm_stat->mem.ipsecmod = (long long)mod_get_mem(&worker->env,
usr.sbin/unbound/util/shm_side/shm_main.c
285
shm_stat->mem.dynlib = (long long)mod_get_mem(&worker->env, "dynlib");
usr.sbin/unbound/util/shm_side/shm_main.c
357
worker->thread_num, worker->daemon, (unsigned)worker->env.now_tv->tv_sec, (unsigned)worker->daemon->time_boot.tv_sec);
usr.sbin/unbound/validator/autotrust.c
1188
void autr_write_file(struct module_env* env, struct trust_anchor* tp)
usr.sbin/unbound/validator/autotrust.c
1197
if(!env) {
usr.sbin/unbound/validator/autotrust.c
1211
env->worker?*(int*)env->worker:0, llvalue);
usr.sbin/unbound/validator/autotrust.c
1261
verify_dnskey(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/autotrust.c
1268
int downprot = env->cfg->harden_algo_downgrade;
usr.sbin/unbound/validator/autotrust.c
1269
enum sec_status sec = val_verify_DNSKEY_with_TA(env, ve, rrset,
usr.sbin/unbound/validator/autotrust.c
1292
min_expiry(struct module_env* env, struct packed_rrset_data* dd)
usr.sbin/unbound/validator/autotrust.c
1298
if((int32_t)t - (int32_t)*env->now > 0) {
usr.sbin/unbound/validator/autotrust.c
1299
t -= (int32_t)*env->now;
usr.sbin/unbound/validator/autotrust.c
1309
rr_is_selfsigned_revoked(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/autotrust.c
1319
sec = dnskey_verify_rrset(env, ve, dnskey_rrset, dnskey_rrset, i,
usr.sbin/unbound/validator/autotrust.c
1534
check_contains_revoked(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/autotrust.c
1556
if(rr_is_selfsigned_revoked(env, ve, dnskey_rrset, i, qstate)) {
usr.sbin/unbound/validator/autotrust.c
1574
do_revoked(env, ta, changed);
usr.sbin/unbound/validator/autotrust.c
1581
key_matches_a_ds(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/autotrust.c
1602
if(!ds_digest_match_dnskey(env, dnskey_rrset, key_idx,
usr.sbin/unbound/validator/autotrust.c
1626
update_events(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/autotrust.c
1667
if(ta && tp->ds_rrset && key_matches_a_ds(env, ve,
usr.sbin/unbound/validator/autotrust.c
1679
set_tp_times(tp, min_expiry(env, dd), key_ttl(dnskey_rrset), changed);
usr.sbin/unbound/validator/autotrust.c
1693
check_holddown(struct module_env* env, struct autr_ta* ta,
usr.sbin/unbound/validator/autotrust.c
1697
if(*env->now < ta->last_change) {
usr.sbin/unbound/validator/autotrust.c
1701
elapsed = *env->now - ta->last_change;
usr.sbin/unbound/validator/autotrust.c
1713
reset_holddown(struct module_env* env, struct autr_ta* ta, int* changed)
usr.sbin/unbound/validator/autotrust.c
1715
ta->last_change = *env->now;
usr.sbin/unbound/validator/autotrust.c
1721
set_trustanchor_state(struct module_env* env, struct autr_ta* ta, int* changed,
usr.sbin/unbound/validator/autotrust.c
1727
reset_holddown(env, ta, changed);
usr.sbin/unbound/validator/autotrust.c
1733
do_newkey(struct module_env* env, struct autr_ta* anchor, int* c)
usr.sbin/unbound/validator/autotrust.c
1736
set_trustanchor_state(env, anchor, c, AUTR_STATE_ADDPEND);
usr.sbin/unbound/validator/autotrust.c
1741
do_addtime(struct module_env* env, struct autr_ta* anchor, int* c)
usr.sbin/unbound/validator/autotrust.c
1746
time_t exceeded = check_holddown(env, anchor, env->cfg->add_holddown);
usr.sbin/unbound/validator/autotrust.c
1752
set_trustanchor_state(env, anchor, c, AUTR_STATE_VALID);
usr.sbin/unbound/validator/autotrust.c
1763
do_remtime(struct module_env* env, struct autr_ta* anchor, int* c)
usr.sbin/unbound/validator/autotrust.c
1765
time_t exceeded = check_holddown(env, anchor, env->cfg->del_holddown);
usr.sbin/unbound/validator/autotrust.c
1769
set_trustanchor_state(env, anchor, c, AUTR_STATE_REMOVED);
usr.sbin/unbound/validator/autotrust.c
1775
do_keyrem(struct module_env* env, struct autr_ta* anchor, int* c)
usr.sbin/unbound/validator/autotrust.c
1778
set_trustanchor_state(env, anchor, c, AUTR_STATE_START);
usr.sbin/unbound/validator/autotrust.c
1781
set_trustanchor_state(env, anchor, c, AUTR_STATE_MISSING);
usr.sbin/unbound/validator/autotrust.c
1786
do_keypres(struct module_env* env, struct autr_ta* anchor, int* c)
usr.sbin/unbound/validator/autotrust.c
1789
set_trustanchor_state(env, anchor, c, AUTR_STATE_VALID);
usr.sbin/unbound/validator/autotrust.c
1794
do_revoked(struct module_env* env, struct autr_ta* anchor, int* c)
usr.sbin/unbound/validator/autotrust.c
1797
set_trustanchor_state(env, anchor, c, AUTR_STATE_REVOKED);
usr.sbin/unbound/validator/autotrust.c
1806
anchor_state_update(struct module_env* env, struct autr_ta* anchor, int* c)
usr.sbin/unbound/validator/autotrust.c
1814
do_newkey(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1820
do_keyrem(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1822
else do_addtime(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1828
do_revoked(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1831
do_keyrem(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1834
reset_holddown(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1841
do_revoked(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1844
do_keypres(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1849
reset_holddown(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1851
else do_remtime(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1862
init_zsk_to_ksk(struct module_env* env, struct trust_anchor* tp, int* changed)
usr.sbin/unbound/validator/autotrust.c
1884
set_trustanchor_state(env, anchor, changed,
usr.sbin/unbound/validator/autotrust.c
1894
remove_missing_trustanchors(struct module_env* env, struct trust_anchor* tp,
usr.sbin/unbound/validator/autotrust.c
1916
valid = init_zsk_to_ksk(env, tp, changed);
usr.sbin/unbound/validator/autotrust.c
1930
set_trustanchor_state(env, anchor, changed,
usr.sbin/unbound/validator/autotrust.c
1938
if(env->cfg->keep_missing == 0)
usr.sbin/unbound/validator/autotrust.c
1941
exceeded = check_holddown(env, anchor, env->cfg->keep_missing);
usr.sbin/unbound/validator/autotrust.c
1948
set_trustanchor_state(env, anchor, changed,
usr.sbin/unbound/validator/autotrust.c
1956
do_statetable(struct module_env* env, struct trust_anchor* tp, int* changed)
usr.sbin/unbound/validator/autotrust.c
1963
anchor_state_update(env, anchor, changed);
usr.sbin/unbound/validator/autotrust.c
1965
remove_missing_trustanchors(env, tp, changed);
usr.sbin/unbound/validator/autotrust.c
1971
autr_holddown_exceed(struct module_env* env, struct trust_anchor* tp, int* c)
usr.sbin/unbound/validator/autotrust.c
1977
do_addtime(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
2012
calc_next_probe(struct module_env* env, time_t wait)
usr.sbin/unbound/validator/autotrust.c
2024
rnd = (time_t)ub_random_max(env->rnd, (long int)rnd);
usr.sbin/unbound/validator/autotrust.c
2025
return (time_t)(*env->now + rest + rnd);
usr.sbin/unbound/validator/autotrust.c
2040
reset_worker_timer_at(struct module_env* env, time_t next)
usr.sbin/unbound/validator/autotrust.c
2045
if(!env->probe_timer)
usr.sbin/unbound/validator/autotrust.c
2047
if(next > *env->now)
usr.sbin/unbound/validator/autotrust.c
2048
tv.tv_sec = (time_t)(next - *env->now);
usr.sbin/unbound/validator/autotrust.c
2054
comm_timer_set(env->probe_timer, &tv);
usr.sbin/unbound/validator/autotrust.c
2061
reset_worker_timer(struct module_env* env)
usr.sbin/unbound/validator/autotrust.c
2064
if(!env->anchors)
usr.sbin/unbound/validator/autotrust.c
2066
lock_basic_lock(&env->anchors->lock);
usr.sbin/unbound/validator/autotrust.c
2067
next = wait_probe_time(env->anchors);
usr.sbin/unbound/validator/autotrust.c
2068
lock_basic_unlock(&env->anchors->lock);
usr.sbin/unbound/validator/autotrust.c
2069
reset_worker_timer_at(env, next);
usr.sbin/unbound/validator/autotrust.c
2074
set_next_probe(struct module_env* env, struct trust_anchor* tp,
usr.sbin/unbound/validator/autotrust.c
2088
lock_basic_lock(&env->anchors->lock);
usr.sbin/unbound/validator/autotrust.c
2089
tp2 = (struct trust_anchor*)rbtree_search(env->anchors->tree, &key);
usr.sbin/unbound/validator/autotrust.c
2092
lock_basic_unlock(&env->anchors->lock);
usr.sbin/unbound/validator/autotrust.c
2099
mold = wait_probe_time(env->anchors);
usr.sbin/unbound/validator/autotrust.c
2100
(void)rbtree_delete(&env->anchors->autr->probe, tp);
usr.sbin/unbound/validator/autotrust.c
2101
tp->autr->next_probe_time = calc_next_probe(env,
usr.sbin/unbound/validator/autotrust.c
2103
(void)rbtree_insert(&env->anchors->autr->probe, &tp->autr->pnode);
usr.sbin/unbound/validator/autotrust.c
2104
mnew = wait_probe_time(env->anchors);
usr.sbin/unbound/validator/autotrust.c
2106
lock_basic_unlock(&env->anchors->lock);
usr.sbin/unbound/validator/autotrust.c
2108
(int)tp->autr->next_probe_time - (int)*env->now);
usr.sbin/unbound/validator/autotrust.c
2110
reset_worker_timer_at(env, mnew);
usr.sbin/unbound/validator/autotrust.c
2117
autr_tp_remove(struct module_env* env, struct trust_anchor* tp,
usr.sbin/unbound/validator/autotrust.c
2145
lock_basic_lock(&env->anchors->lock);
usr.sbin/unbound/validator/autotrust.c
2146
del_tp = (struct trust_anchor*)rbtree_delete(env->anchors->tree, &key);
usr.sbin/unbound/validator/autotrust.c
2147
mold = wait_probe_time(env->anchors);
usr.sbin/unbound/validator/autotrust.c
2148
(void)rbtree_delete(&env->anchors->autr->probe, &key);
usr.sbin/unbound/validator/autotrust.c
2149
mnew = wait_probe_time(env->anchors);
usr.sbin/unbound/validator/autotrust.c
2150
anchors_init_parents_locked(env->anchors);
usr.sbin/unbound/validator/autotrust.c
2151
lock_basic_unlock(&env->anchors->lock);
usr.sbin/unbound/validator/autotrust.c
2159
autr_write_file(env, del_tp);
usr.sbin/unbound/validator/autotrust.c
2165
reset_worker_timer_at(env, mnew);
usr.sbin/unbound/validator/autotrust.c
2169
int autr_process_prime(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/autotrust.c
2189
tp->autr->last_queried = *env->now;
usr.sbin/unbound/validator/autotrust.c
2194
autr_holddown_exceed(env, tp, &changed);
usr.sbin/unbound/validator/autotrust.c
2212
check_contains_revoked(env, ve, tp, dnskey_rrset, &changed, qstate);
usr.sbin/unbound/validator/autotrust.c
2222
tp->autr->last_success = *env->now;
usr.sbin/unbound/validator/autotrust.c
2223
autr_tp_remove(env, tp, dnskey_rrset);
usr.sbin/unbound/validator/autotrust.c
2228
if(!verify_dnskey(env, ve, tp, dnskey_rrset, qstate)) {
usr.sbin/unbound/validator/autotrust.c
2234
autr_write_file(env, tp);
usr.sbin/unbound/validator/autotrust.c
2239
tp->autr->last_success = *env->now;
usr.sbin/unbound/validator/autotrust.c
2247
if(!update_events(env, ve, tp, dnskey_rrset, &changed)) {
usr.sbin/unbound/validator/autotrust.c
2256
if(!do_statetable(env, tp, &changed)) {
usr.sbin/unbound/validator/autotrust.c
2263
if(!set_next_probe(env, tp, dnskey_rrset))
usr.sbin/unbound/validator/autotrust.c
2265
autr_write_file(env, tp);
usr.sbin/unbound/validator/autotrust.c
2274
autr_tp_remove(env, tp, dnskey_rrset);
usr.sbin/unbound/validator/autotrust.c
2368
struct module_env* env = (struct module_env*)arg;
usr.sbin/unbound/validator/autotrust.c
2370
reset_worker_timer(env);
usr.sbin/unbound/validator/autotrust.c
2375
probe_anchor(struct module_env* env, struct trust_anchor* tp)
usr.sbin/unbound/validator/autotrust.c
2380
sldns_buffer* buf = env->scratch_buffer;
usr.sbin/unbound/validator/autotrust.c
2381
qinfo.qname = regional_alloc_init(env->scratch, tp->name, tp->namelen);
usr.sbin/unbound/validator/autotrust.c
2392
(int)tp->autr->next_probe_time - (int)*env->now);
usr.sbin/unbound/validator/autotrust.c
2413
rrset_cache_remove(env->rrset_cache, qinfo.qname, qinfo.qname_len,
usr.sbin/unbound/validator/autotrust.c
2415
key_cache_remove(env->key_cache, qinfo.qname, qinfo.qname_len,
usr.sbin/unbound/validator/autotrust.c
2418
if(!mesh_new_callback(env->mesh, &qinfo, qflags, &edns, buf, 0,
usr.sbin/unbound/validator/autotrust.c
2419
&probe_answer_cb, env, 0)) {
usr.sbin/unbound/validator/autotrust.c
2426
todo_probe(struct module_env* env, time_t* next)
usr.sbin/unbound/validator/autotrust.c
2431
lock_basic_lock(&env->anchors->lock);
usr.sbin/unbound/validator/autotrust.c
2432
if( (el=rbtree_first(&env->anchors->autr->probe)) == RBTREE_NULL) {
usr.sbin/unbound/validator/autotrust.c
2434
lock_basic_unlock(&env->anchors->lock);
usr.sbin/unbound/validator/autotrust.c
2443
if((time_t)tp->autr->next_probe_time > *env->now) {
usr.sbin/unbound/validator/autotrust.c
2445
*next = (time_t)tp->autr->next_probe_time - *env->now;
usr.sbin/unbound/validator/autotrust.c
2447
lock_basic_unlock(&env->anchors->lock);
usr.sbin/unbound/validator/autotrust.c
2452
(void)rbtree_delete(&env->anchors->autr->probe, tp);
usr.sbin/unbound/validator/autotrust.c
2453
tp->autr->next_probe_time = calc_next_probe(env, tp->autr->retry_time);
usr.sbin/unbound/validator/autotrust.c
2454
(void)rbtree_insert(&env->anchors->autr->probe, &tp->autr->pnode);
usr.sbin/unbound/validator/autotrust.c
2455
lock_basic_unlock(&env->anchors->lock);
usr.sbin/unbound/validator/autotrust.c
2461
autr_probe_timer(struct module_env* env)
usr.sbin/unbound/validator/autotrust.c
2469
while( (tp = todo_probe(env, &next_probe)) ) {
usr.sbin/unbound/validator/autotrust.c
2471
probe_anchor(env, tp);
usr.sbin/unbound/validator/autotrust.c
2474
regional_free_all(env->scratch);
usr.sbin/unbound/validator/autotrust.c
72
static void do_revoked(struct module_env* env, struct autr_ta* anchor, int* c);
usr.sbin/unbound/validator/autotrust.h
158
time_t autr_probe_timer(struct module_env* env);
usr.sbin/unbound/validator/autotrust.h
176
void autr_write_file(struct module_env* env, struct trust_anchor* tp);
usr.sbin/unbound/validator/autotrust.h
197
int autr_process_prime(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec.c
177
nsec_verify_rrset(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec.c
188
rrset_check_sec_status(env->rrset_cache, nsec, *env->now);
usr.sbin/unbound/validator/val_nsec.c
191
d->security = val_verify_rrset_entry(env, ve, nsec, kkey, reason,
usr.sbin/unbound/validator/val_nsec.c
195
rrset_update_sec_status(env->rrset_cache, nsec, *env->now);
usr.sbin/unbound/validator/val_nsec.c
202
val_nsec_prove_nodata_dsreply(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec.c
223
if(!nsec_verify_rrset(env, ve, nsec, kkey, reason,
usr.sbin/unbound/validator/val_nsec.c
254
if(!nsec_verify_rrset(env, ve, rep->rrsets[i], kkey, reason,
usr.sbin/unbound/validator/val_nsec.h
79
enum sec_status val_nsec_prove_nodata_dsreply(struct module_env* env,
usr.sbin/unbound/validator/val_nsec3.c
1013
if(find_matching_nsec3(env, flt, ct, nm, nmlen,
usr.sbin/unbound/validator/val_nsec3.c
1066
nsec3_prove_closest_encloser(struct module_env* env, struct nsec3_filter* flt,
usr.sbin/unbound/validator/val_nsec3.c
1075
if(!nsec3_find_closest_encloser(env, flt, ct, qinfo, ce, calculations)) {
usr.sbin/unbound/validator/val_nsec3.c
1129
if(!find_covering_nsec3(env, flt, ct, nc, nc_len,
usr.sbin/unbound/validator/val_nsec3.c
1174
nsec3_do_prove_nameerror(struct module_env* env, struct nsec3_filter* flt,
usr.sbin/unbound/validator/val_nsec3.c
1187
sec = nsec3_prove_closest_encloser(env, flt, ct, qinfo, 1, &ce, calc);
usr.sbin/unbound/validator/val_nsec3.c
1211
if(!find_covering_nsec3(env, flt, ct, wc, wclen, &wc_rrset, &wc_rr, calc)) {
usr.sbin/unbound/validator/val_nsec3.c
1239
nsec3_prove_nameerror(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec3.c
1257
return nsec3_do_prove_nameerror(env, &flt, ct, qinfo, calc);
usr.sbin/unbound/validator/val_nsec3.c
1267
nsec3_do_prove_nodata(struct module_env* env, struct nsec3_filter* flt,
usr.sbin/unbound/validator/val_nsec3.c
1278
if(find_matching_nsec3(env, flt, ct, qinfo->qname, qinfo->qname_len,
usr.sbin/unbound/validator/val_nsec3.c
1339
sec = nsec3_prove_closest_encloser(env, flt, ct, qinfo, 1, &ce, calc);
usr.sbin/unbound/validator/val_nsec3.c
1357
if(wc && find_matching_nsec3(env, flt, ct, wc, wclen, &rrset, &rr,
usr.sbin/unbound/validator/val_nsec3.c
1427
nsec3_prove_nodata(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec3.c
1443
return nsec3_do_prove_nodata(env, &flt, ct, qinfo, calc);
usr.sbin/unbound/validator/val_nsec3.c
1447
nsec3_prove_wildcard(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec3.c
1480
if(!find_covering_nsec3(env, &flt, ct, nc, nc_len,
usr.sbin/unbound/validator/val_nsec3.c
1509
list_is_secure(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec3.c
1523
rrset_check_sec_status(env->rrset_cache, list[i], *env->now);
usr.sbin/unbound/validator/val_nsec3.c
1526
d->security = val_verify_rrset_entry(env, ve, list[i], kkey,
usr.sbin/unbound/validator/val_nsec3.c
1533
rrset_update_sec_status(env->rrset_cache, list[i], *env->now);
usr.sbin/unbound/validator/val_nsec3.c
1539
nsec3_prove_nods(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec3.c
1558
if(!list_is_secure(env, ve, list, num, kkey, reason, reason_bogus,
usr.sbin/unbound/validator/val_nsec3.c
1575
if(find_matching_nsec3(env, &flt, ct, qinfo->qname, qinfo->qname_len,
usr.sbin/unbound/validator/val_nsec3.c
1613
sec = nsec3_prove_closest_encloser(env, &flt, ct, qinfo, 1, &ce, &calc);
usr.sbin/unbound/validator/val_nsec3.c
1649
nsec3_prove_nxornodata(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec3.c
1671
secnx = nsec3_do_prove_nameerror(env, &flt, ct, qinfo, calc);
usr.sbin/unbound/validator/val_nsec3.c
1676
sec = nsec3_do_prove_nodata(env, &flt, ct, qinfo, calc);
usr.sbin/unbound/validator/val_nsec3.c
820
find_matching_nsec3(struct module_env* env, struct nsec3_filter* flt,
usr.sbin/unbound/validator/val_nsec3.c
843
r = nsec3_hash_name(ct->ct, ct->region, env->scratch_buffer,
usr.sbin/unbound/validator/val_nsec3.c
930
find_covering_nsec3(struct module_env* env, struct nsec3_filter* flt,
usr.sbin/unbound/validator/val_nsec3.c
953
r = nsec3_hash_name(ct->ct, ct->region, env->scratch_buffer,
usr.sbin/unbound/validator/val_nsec3.c
966
env->scratch_buffer)) {
usr.sbin/unbound/validator/val_nsec3.c
992
nsec3_find_closest_encloser(struct module_env* env, struct nsec3_filter* flt,
usr.sbin/unbound/validator/val_nsec3.h
136
nsec3_prove_nameerror(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec3.h
174
nsec3_prove_nodata(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec3.h
199
nsec3_prove_wildcard(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec3.h
229
nsec3_prove_nods(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec3.h
254
nsec3_prove_nxornodata(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_sigcrypt.c
1705
if(qstate && qstate->env && qstate->env->mesh)
usr.sbin/unbound/validator/val_sigcrypt.c
1706
qstate->env->mesh->val_ops++;
usr.sbin/unbound/validator/val_sigcrypt.c
294
ds_create_dnskey_digest(struct module_env* env,
usr.sbin/unbound/validator/val_sigcrypt.c
299
sldns_buffer* b = env->scratch_buffer;
usr.sbin/unbound/validator/val_sigcrypt.c
319
int ds_digest_match_dnskey(struct module_env* env,
usr.sbin/unbound/validator/val_sigcrypt.c
346
digest = regional_alloc(env->scratch, digestlen);
usr.sbin/unbound/validator/val_sigcrypt.c
351
if(!ds_create_dnskey_digest(env, dnskey_rrset, dnskey_idx, ds_rrset,
usr.sbin/unbound/validator/val_sigcrypt.c
556
dnskeyset_verify_rrset_sig(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_sigcrypt.c
589
sec = dnskey_verify_rrset_sig(env->scratch,
usr.sbin/unbound/validator/val_sigcrypt.c
590
env->scratch_buffer, ve, now, rrset, dnskey, i,
usr.sbin/unbound/validator/val_sigcrypt.c
624
dnskeyset_verify_rrset(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_sigcrypt.c
659
sec = dnskeyset_verify_rrset_sig(env, ve, *env->now, rrset,
usr.sbin/unbound/validator/val_sigcrypt.c
707
dnskey_verify_rrset(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_sigcrypt.c
735
sec = dnskey_verify_rrset_sig(env->scratch,
usr.sbin/unbound/validator/val_sigcrypt.c
736
env->scratch_buffer, ve, *env->now, rrset,
usr.sbin/unbound/validator/val_sigcrypt.h
156
int ds_digest_match_dnskey(struct module_env* env,
usr.sbin/unbound/validator/val_sigcrypt.h
272
enum sec_status dnskeyset_verify_rrset(struct module_env* env,
usr.sbin/unbound/validator/val_sigcrypt.h
293
enum sec_status dnskey_verify_rrset(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_utils.c
1102
val_check_nonsecure(struct module_env* env, struct reply_info* rep)
usr.sbin/unbound/validator/val_utils.c
1150
if(!env->cfg->val_clean_additional)
usr.sbin/unbound/validator/val_utils.c
1187
struct rrset_cache* r, struct module_env* env)
usr.sbin/unbound/validator/val_utils.c
1200
rrset_update_sec_status(r, rep->rrsets[i], *env->now);
usr.sbin/unbound/validator/val_utils.c
1207
struct rrset_cache* r, struct module_env* env)
usr.sbin/unbound/validator/val_utils.c
1217
rrset_update_sec_status(r, rep->rrsets[i], *env->now);
usr.sbin/unbound/validator/val_utils.c
1310
val_find_DS(struct module_env* env, uint8_t* nm, size_t nmlen, uint16_t c,
usr.sbin/unbound/validator/val_utils.c
1316
env->rrset_cache, nm, nmlen, LDNS_RR_TYPE_DS, c, 0,
usr.sbin/unbound/validator/val_utils.c
1317
*env->now, 0);
usr.sbin/unbound/validator/val_utils.c
1321
rrset, region, *env->now);
usr.sbin/unbound/validator/val_utils.c
1342
msg = val_neg_getmsg(env->neg_cache, &qinfo, region, env->rrset_cache,
usr.sbin/unbound/validator/val_utils.c
1343
env->scratch_buffer, *env->now, 0, topname, env->cfg);
usr.sbin/unbound/validator/val_utils.c
405
val_verify_rrset(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_utils.c
423
rrset_check_sec_status(env->rrset_cache, rrset, *env->now);
usr.sbin/unbound/validator/val_utils.c
433
sec = dnskeyset_verify_rrset(env, ve, rrset, keys, sigalg, reason,
usr.sbin/unbound/validator/val_utils.c
436
regional_free_all(env->scratch);
usr.sbin/unbound/validator/val_utils.c
467
rrset_update_sec_status(env->rrset_cache, rrset, *env->now);
usr.sbin/unbound/validator/val_utils.c
474
val_verify_rrset_entry(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_utils.c
491
sec = val_verify_rrset(env, ve, rrset, &dnskey, kd->algo, reason,
usr.sbin/unbound/validator/val_utils.c
498
verify_dnskeys_with_ds_rr(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_utils.c
523
if(!ds_digest_match_dnskey(env, dnskey_rrset, i, ds_rrset,
usr.sbin/unbound/validator/val_utils.c
544
sec = dnskey_verify_rrset(env, ve, dnskey_rrset, dnskey_rrset,
usr.sbin/unbound/validator/val_utils.c
585
val_verify_DNSKEY_with_DS(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_utils.c
626
sec = verify_dnskeys_with_ds_rr(env, ve, dnskey_rrset,
usr.sbin/unbound/validator/val_utils.c
686
val_verify_new_DNSKEYs(struct regional* region, struct module_env* env,
usr.sbin/unbound/validator/val_utils.c
693
enum sec_status sec = val_verify_DNSKEY_with_DS(env, ve,
usr.sbin/unbound/validator/val_utils.c
702
*env->now);
usr.sbin/unbound/validator/val_utils.c
708
*env->now);
usr.sbin/unbound/validator/val_utils.c
712
BOGUS_KEY_TTL, *reason_bogus, *reason, *env->now);
usr.sbin/unbound/validator/val_utils.c
716
val_verify_DNSKEY_with_TA(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_utils.c
771
sec = verify_dnskeys_with_ds_rr(env, ve, dnskey_rrset,
usr.sbin/unbound/validator/val_utils.c
816
sec = dnskey_verify_rrset(env, ve, dnskey_rrset,
usr.sbin/unbound/validator/val_utils.c
860
val_verify_new_DNSKEYs_with_ta(struct regional* region, struct module_env* env,
usr.sbin/unbound/validator/val_utils.c
868
enum sec_status sec = val_verify_DNSKEY_with_TA(env, ve,
usr.sbin/unbound/validator/val_utils.c
877
downprot?sigalg:NULL, LDNS_EDE_NONE, NULL, *env->now);
usr.sbin/unbound/validator/val_utils.c
883
*env->now);
usr.sbin/unbound/validator/val_utils.c
887
BOGUS_KEY_TTL, *reason_bogus, *reason, *env->now);
usr.sbin/unbound/validator/val_utils.h
132
enum sec_status val_verify_rrset_entry(struct module_env* env,
usr.sbin/unbound/validator/val_utils.h
157
enum sec_status val_verify_DNSKEY_with_DS(struct module_env* env,
usr.sbin/unbound/validator/val_utils.h
183
enum sec_status val_verify_DNSKEY_with_TA(struct module_env* env,
usr.sbin/unbound/validator/val_utils.h
218
struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_utils.h
251
struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_utils.h
332
void val_check_nonsecure(struct module_env* env, struct reply_info* rep);
usr.sbin/unbound/validator/val_utils.h
344
struct module_env* env);
usr.sbin/unbound/validator/val_utils.h
355
struct rrset_cache* r, struct module_env* env);
usr.sbin/unbound/validator/val_utils.h
427
struct dns_msg* val_find_DS(struct module_env* env, uint8_t* nm, size_t nmlen,
usr.sbin/unbound/validator/validator.c
1046
validate_positive_response(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/validator.c
1085
if(wc && !wc_cached && env->cfg->aggressive_nsec) {
usr.sbin/unbound/validator/validator.c
1125
enum sec_status sec = nsec3_prove_wildcard(env, ve,
usr.sbin/unbound/validator/validator.c
1156
rrset_cache_update_wildcard(env->rrset_cache, cache_s,
usr.sbin/unbound/validator/validator.c
1157
cache_wc, cache_wl, env->alloc, *env->now);
usr.sbin/unbound/validator/validator.c
1185
validate_nodata_response(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/validator.c
1246
enum sec_status sec = nsec3_prove_nodata(env, ve,
usr.sbin/unbound/validator/validator.c
1299
validate_nameerror_response(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/validator.c
1347
chase_reply->security = nsec3_prove_nameerror(env, ve,
usr.sbin/unbound/validator/validator.c
1366
validate_nodata_response(env, ve, qchase, chase_reply, kkey,
usr.sbin/unbound/validator/validator.c
1382
validate_nodata_response(env, ve, qchase, chase_reply, kkey,
usr.sbin/unbound/validator/validator.c
1460
validate_any_response(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/validator.c
1532
enum sec_status sec = nsec3_prove_wildcard(env, ve,
usr.sbin/unbound/validator/validator.c
1597
validate_cname_response(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/validator.c
1682
enum sec_status sec = nsec3_prove_wildcard(env, ve,
usr.sbin/unbound/validator/validator.c
1737
validate_cname_noanswer_response(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/validator.c
181
val_apply_cfg(struct module_env* env, struct val_env* val_env,
usr.sbin/unbound/validator/validator.c
1823
enum sec_status sec = nsec3_prove_nxornodata(env, ve,
usr.sbin/unbound/validator/validator.c
186
if(!env->anchors)
usr.sbin/unbound/validator/validator.c
187
env->anchors = anchors_create();
usr.sbin/unbound/validator/validator.c
188
if(!env->anchors) {
usr.sbin/unbound/validator/validator.c
192
if (env->key_cache)
usr.sbin/unbound/validator/validator.c
1925
val_mark_indeterminate(vq->chase_reply, qstate->env->anchors,
usr.sbin/unbound/validator/validator.c
1926
qstate->env->rrset_cache, qstate->env);
usr.sbin/unbound/validator/validator.c
193
val_env->kcache = env->key_cache;
usr.sbin/unbound/validator/validator.c
1930
anchor = anchors_lookup(qstate->env->anchors,
usr.sbin/unbound/validator/validator.c
1955
anchor = anchors_lookup(qstate->env->anchors,
usr.sbin/unbound/validator/validator.c
1987
vq->qchase.qclass, qstate->region, *qstate->env->now);
usr.sbin/unbound/validator/validator.c
200
env->key_cache = val_env->kcache;
usr.sbin/unbound/validator/validator.c
2006
qstate->env->rrset_cache, qstate->env);
usr.sbin/unbound/validator/validator.c
201
if(!anchors_apply_cfg(env->anchors, cfg)) {
usr.sbin/unbound/validator/validator.c
2034
qstate->env->rrset_cache, qstate->env);
usr.sbin/unbound/validator/validator.c
210
if (env->neg_cache)
usr.sbin/unbound/validator/validator.c
211
val_env->neg_cache = env->neg_cache;
usr.sbin/unbound/validator/validator.c
219
env->neg_cache = val_env->neg_cache;
usr.sbin/unbound/validator/validator.c
2200
(msg=val_find_DS(qstate->env, target_key_name,
usr.sbin/unbound/validator/validator.c
227
val_init(struct module_env* env, int id)
usr.sbin/unbound/validator/validator.c
2271
qstate->env->rrset_cache, qstate->env);
usr.sbin/unbound/validator/validator.c
2273
qstate->env->cfg->val_log_level >= 2);
usr.sbin/unbound/validator/validator.c
2288
qstate->env->cfg->val_log_level >= 2);
usr.sbin/unbound/validator/validator.c
2312
if(!validate_msg_signatures(qstate, vq, qstate->env, ve,
usr.sbin/unbound/validator/validator.c
2347
validate_positive_response(qstate->env, ve,
usr.sbin/unbound/validator/validator.c
235
env->modinfo[id] = (void*)val_env;
usr.sbin/unbound/validator/validator.c
236
env->need_to_validate = 1;
usr.sbin/unbound/validator/validator.c
2363
validate_nodata_response(qstate->env, ve,
usr.sbin/unbound/validator/validator.c
2380
validate_nameerror_response(qstate->env, ve,
usr.sbin/unbound/validator/validator.c
2398
validate_cname_response(qstate->env, ve,
usr.sbin/unbound/validator/validator.c
2415
validate_cname_noanswer_response(qstate->env, ve,
usr.sbin/unbound/validator/validator.c
243
if(!val_apply_cfg(env, val_env, env->cfg)) {
usr.sbin/unbound/validator/validator.c
2440
validate_any_response(qstate->env, ve, &vq->qchase,
usr.sbin/unbound/validator/validator.c
247
if(env->cfg->disable_edns_do) {
usr.sbin/unbound/validator/validator.c
249
env->anchors);
usr.sbin/unbound/validator/validator.c
2541
val_check_nonsecure(qstate->env, vq->orig_msg->rep);
usr.sbin/unbound/validator/validator.c
2546
val_neg_addreply(qstate->env->neg_cache,
usr.sbin/unbound/validator/validator.c
255
env->cfg->disable_edns_do = 0;
usr.sbin/unbound/validator/validator.c
2571
if(qstate->env->cfg->serve_expired &&
usr.sbin/unbound/validator/validator.c
2572
(e=msg_cache_lookup(qstate->env, qstate->qinfo.qname,
usr.sbin/unbound/validator/validator.c
2579
(!qstate->env->cfg->serve_expired_ttl ||
usr.sbin/unbound/validator/validator.c
2580
qstate->env->cfg->serve_expired_ttl_reset ||
usr.sbin/unbound/validator/validator.c
2581
*qstate->env->now <= rep->serve_expired_ttl)) {
usr.sbin/unbound/validator/validator.c
2587
*qstate->env->now;
usr.sbin/unbound/validator/validator.c
2588
if(qstate->env->cfg->serve_expired_ttl_reset &&
usr.sbin/unbound/validator/validator.c
2589
*qstate->env->now + qstate->env->cfg->serve_expired_ttl
usr.sbin/unbound/validator/validator.c
2593
rep->serve_expired_ttl = *qstate->env->now +
usr.sbin/unbound/validator/validator.c
2594
qstate->env->cfg->serve_expired_ttl;
usr.sbin/unbound/validator/validator.c
2616
vq->orig_msg->rep->ttl + qstate->env->cfg->serve_expired_ttl;
usr.sbin/unbound/validator/validator.c
2617
if((qstate->env->cfg->val_log_level >= 1 ||
usr.sbin/unbound/validator/validator.c
2618
qstate->env->cfg->log_servfail) &&
usr.sbin/unbound/validator/validator.c
2619
!qstate->env->cfg->val_log_squelch) {
usr.sbin/unbound/validator/validator.c
2620
if(qstate->env->cfg->val_log_level < 2 &&
usr.sbin/unbound/validator/validator.c
2621
!qstate->env->cfg->log_servfail)
usr.sbin/unbound/validator/validator.c
263
val_deinit(struct module_env* env, int id)
usr.sbin/unbound/validator/validator.c
2640
if(qstate->env->cfg->val_permissive_mode)
usr.sbin/unbound/validator/validator.c
2645
qstate->env->cfg->root_key_sentinel &&
usr.sbin/unbound/validator/validator.c
2655
!anchor_has_keytag(qstate->env->anchors,
usr.sbin/unbound/validator/validator.c
266
if(!env || !env->modinfo[id])
usr.sbin/unbound/validator/validator.c
2665
anchor_has_keytag(qstate->env->anchors,
usr.sbin/unbound/validator/validator.c
268
val_env = (struct val_env*)env->modinfo[id];
usr.sbin/unbound/validator/validator.c
2689
if(!dns_cache_store(qstate->env, &vq->orig_msg->qinfo,
usr.sbin/unbound/validator/validator.c
2699
if(!dns_cache_store(qstate->env, &vq->orig_msg->qinfo,
usr.sbin/unbound/validator/validator.c
270
anchors_delete(env->anchors);
usr.sbin/unbound/validator/validator.c
271
env->anchors = NULL;
usr.sbin/unbound/validator/validator.c
273
env->key_cache = NULL;
usr.sbin/unbound/validator/validator.c
275
env->neg_cache = NULL;
usr.sbin/unbound/validator/validator.c
2755
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
usr.sbin/unbound/validator/validator.c
279
env->modinfo[id] = NULL;
usr.sbin/unbound/validator/validator.c
2863
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
usr.sbin/unbound/validator/validator.c
2869
int downprot = qstate->env->cfg->harden_algo_downgrade;
usr.sbin/unbound/validator/validator.c
2884
if(qstate->env->cfg->harden_dnssec_stripped) {
usr.sbin/unbound/validator/validator.c
2888
reason_bogus, rstr, *qstate->env->now);
usr.sbin/unbound/validator/validator.c
2891
reason_bogus, rstr, *qstate->env->now);
usr.sbin/unbound/validator/validator.c
2899
kkey = val_verify_new_DNSKEYs_with_ta(qstate->region, qstate->env, ve,
usr.sbin/unbound/validator/validator.c
2919
if(qstate->env->cfg->harden_dnssec_stripped) {
usr.sbin/unbound/validator/validator.c
2924
*qstate->env->now);
usr.sbin/unbound/validator/validator.c
2928
*qstate->env->now);
usr.sbin/unbound/validator/validator.c
2969
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
usr.sbin/unbound/validator/validator.c
3012
sec = val_verify_rrset_entry(qstate->env, ve, ds,
usr.sbin/unbound/validator/validator.c
3032
*qstate->env->now);
usr.sbin/unbound/validator/validator.c
3040
NULL, LDNS_EDE_NONE, NULL, *qstate->env->now);
usr.sbin/unbound/validator/validator.c
3064
qstate->env, ve, qinfo, msg->rep, vq->key_entry,
usr.sbin/unbound/validator/validator.c
3075
*qstate->env->now);
usr.sbin/unbound/validator/validator.c
3100
sec = nsec3_prove_nods(qstate->env, ve,
usr.sbin/unbound/validator/validator.c
3117
*qstate->env->now);
usr.sbin/unbound/validator/validator.c
3169
sec = val_verify_rrset_entry(qstate->env, ve, cname,
usr.sbin/unbound/validator/validator.c
3257
reason_bogus, reason, *qstate->env->now);
usr.sbin/unbound/validator/validator.c
3287
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
usr.sbin/unbound/validator/validator.c
3386
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
usr.sbin/unbound/validator/validator.c
3430
BOGUS_KEY_TTL, reason_bogus, rstr, *qstate->env->now);
usr.sbin/unbound/validator/validator.c
3447
downprot = qstate->env->cfg->harden_algo_downgrade;
usr.sbin/unbound/validator/validator.c
3448
vq->key_entry = val_verify_new_DNSKEYs(qstate->region, qstate->env,
usr.sbin/unbound/validator/validator.c
3484
qstate->env->cfg->val_log_level >= 2);
usr.sbin/unbound/validator/validator.c
3508
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
usr.sbin/unbound/validator/validator.c
3510
struct trust_anchor* ta = anchor_find(qstate->env->anchors,
usr.sbin/unbound/validator/validator.c
3530
if(!autr_process_prime(qstate->env, ve, ta, dnskey_rrset,
usr.sbin/unbound/validator/validator.c
3557
qstate->env->cfg->val_log_level >= 2);
usr.sbin/unbound/validator/validator.c
3646
val_get_mem(struct module_env* env, int id)
usr.sbin/unbound/validator/validator.c
3648
struct val_env* ve = (struct val_env*)env->modinfo[id];
usr.sbin/unbound/validator/validator.c
488
fptr_ok(fptr_whitelist_modenv_detect_cycle(qstate->env->detect_cycle));
usr.sbin/unbound/validator/validator.c
489
if((*qstate->env->detect_cycle)(qstate, &ask,
usr.sbin/unbound/validator/validator.c
498
qstate->env->add_sub));
usr.sbin/unbound/validator/validator.c
499
if(!(*qstate->env->add_sub)(qstate, &ask, NULL,
usr.sbin/unbound/validator/validator.c
507
qstate->env->attach_sub));
usr.sbin/unbound/validator/validator.c
508
if(!(*qstate->env->attach_sub)(qstate, &ask, NULL,
usr.sbin/unbound/validator/validator.c
637
if(newq && qstate->env->cfg->trust_anchor_signaling &&
usr.sbin/unbound/validator/validator.c
687
struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/validator.c
762
sec = val_verify_rrset_entry(env, ve, s, key_entry, &reason,
usr.sbin/unbound/validator/validator.c
785
i+1 < (env->cfg->val_clean_additional?
usr.sbin/unbound/validator/validator.c
807
sec = val_verify_rrset_entry(env, ve, s, key_entry, &reason,
usr.sbin/unbound/validator/validator.c
825
i+1 < (env->cfg->val_clean_additional?
usr.sbin/unbound/validator/validator.c
839
if(!env->cfg->val_clean_additional)
usr.sbin/unbound/validator/validator.c
853
(void)val_verify_rrset_entry(env, ve, s, key_entry,
usr.sbin/unbound/validator/validator.c
879
mesh_run(qstate->env->mesh, qstate->mesh_info, module_event_pass,
usr.sbin/unbound/validator/validator.c
903
qstate->env->worker_base,
usr.sbin/unbound/validator/validator.c
918
if(qstate->env->mesh->all.count >= qstate->env->mesh->max_reply_states)
usr.sbin/unbound/validator/validator.c
920
else if(qstate->env->mesh->all.count >= qstate->env->mesh->max_reply_states/2)
usr.sbin/unbound/validator/validator.c
922
else if(qstate->env->mesh->all.count >= qstate->env->mesh->max_reply_states/4)
usr.sbin/unbound/validator/validator.c
933
usec = base + ub_random_max(qstate->env->rnd, usec-base);
usr.sbin/unbound/validator/validator.h
250
int val_init(struct module_env* env, int id);
usr.sbin/unbound/validator/validator.h
253
void val_deinit(struct module_env* env, int id);
usr.sbin/unbound/validator/validator.h
279
size_t val_get_mem(struct module_env* env, int id);
usr.sbin/vmd/config.c
100
config_purge(struct vmd *env, unsigned int reset)
usr.sbin/vmd/config.c
102
struct privsep *ps = &env->vmd_ps;
usr.sbin/vmd/config.c
112
config_init_localprefix(&env->vmd_cfg);
usr.sbin/vmd/config.c
116
if (what & CONFIG_VMS && env->vmd_vms != NULL) {
usr.sbin/vmd/config.c
117
while ((vm = TAILQ_FIRST(env->vmd_vms)) != NULL) {
usr.sbin/vmd/config.c
120
while ((n2i = TAILQ_FIRST(env->vmd_known)) != NULL) {
usr.sbin/vmd/config.c
121
TAILQ_REMOVE(env->vmd_known, n2i, entry);
usr.sbin/vmd/config.c
124
env->vmd_nvm = 0;
usr.sbin/vmd/config.c
126
if (what & CONFIG_SWITCHES && env->vmd_switches != NULL) {
usr.sbin/vmd/config.c
127
while ((vsw = TAILQ_FIRST(env->vmd_switches)) != NULL)
usr.sbin/vmd/config.c
129
env->vmd_nswitches = 0;
usr.sbin/vmd/config.c
134
config_setconfig(struct vmd *env)
usr.sbin/vmd/config.c
136
struct privsep *ps = &env->vmd_ps;
usr.sbin/vmd/config.c
144
proc_compose(ps, id, IMSG_VMDOP_CONFIG, &env->vmd_cfg,
usr.sbin/vmd/config.c
145
sizeof(env->vmd_cfg));
usr.sbin/vmd/config.c
152
config_getconfig(struct vmd *env, struct imsg *imsg)
usr.sbin/vmd/config.c
154
struct privsep *ps = &env->vmd_ps;
usr.sbin/vmd/config.c
158
vmop_config_read(imsg, &env->vmd_cfg);
usr.sbin/vmd/config.c
164
config_setreset(struct vmd *env, unsigned int reset)
usr.sbin/vmd/config.c
166
struct privsep *ps = &env->vmd_ps;
usr.sbin/vmd/config.c
66
config_init(struct vmd *env)
usr.sbin/vmd/config.c
68
struct privsep *ps = &env->vmd_ps;
usr.sbin/vmd/config.c
76
if (config_init_localprefix(&env->vmd_cfg) == -1)
usr.sbin/vmd/config.c
82
if ((env->vmd_vms = calloc(1, sizeof(*env->vmd_vms))) == NULL)
usr.sbin/vmd/config.c
84
if ((env->vmd_known = calloc(1, sizeof(*env->vmd_known))) == NULL)
usr.sbin/vmd/config.c
86
TAILQ_INIT(env->vmd_vms);
usr.sbin/vmd/config.c
87
TAILQ_INIT(env->vmd_known);
usr.sbin/vmd/config.c
90
if ((env->vmd_switches = calloc(1,
usr.sbin/vmd/config.c
91
sizeof(*env->vmd_switches))) == NULL)
usr.sbin/vmd/config.c
93
TAILQ_INIT(env->vmd_switches);
usr.sbin/vmd/parse.y
101
extern struct vmd *env;
usr.sbin/vmd/parse.y
1216
env->vmd_cfg.cfg_agentx.ax_enabled = 0;
usr.sbin/vmd/parse.y
1217
env->vmd_cfg.cfg_agentx.ax_context[0] = '\0';
usr.sbin/vmd/parse.y
1218
env->vmd_cfg.cfg_agentx.ax_path[0] = '\0';
usr.sbin/vmd/parse.y
189
env->vmd_cfg.cfg_flags |= VMD_CFG_INET6;
usr.sbin/vmd/parse.y
194
if (parse_prefix6($4, &env->vmd_cfg.cfg_localprefix,
usr.sbin/vmd/parse.y
199
env->vmd_cfg.cfg_flags |= VMD_CFG_INET6;
usr.sbin/vmd/parse.y
200
env->vmd_cfg.cfg_flags &= ~VMD_CFG_AUTOINET6;
usr.sbin/vmd/parse.y
207
if (parse_prefix4($3, &env->vmd_cfg.cfg_localprefix,
usr.sbin/vmd/parse.y
215
env->vmd_ps.ps_csock.cs_uid = $3.uid;
usr.sbin/vmd/parse.y
216
env->vmd_ps.ps_csock.cs_gid = $3.gid == -1 ? 0 : $3.gid;
usr.sbin/vmd/parse.y
219
env->vmd_cfg.cfg_agentx.ax_enabled = 1;
usr.sbin/vmd/parse.y
221
if (env->vmd_cfg.cfg_agentx.ax_path[0] == '\0')
usr.sbin/vmd/parse.y
222
if (strlcpy(env->vmd_cfg.cfg_agentx.ax_path,
usr.sbin/vmd/parse.y
224
sizeof(env->vmd_cfg.cfg_agentx.ax_path)) >=
usr.sbin/vmd/parse.y
225
sizeof(env->vmd_cfg.cfg_agentx.ax_path)) {
usr.sbin/vmd/parse.y
231
env->vmd_cfg.cfg_flags |= VMD_CFG_STAGGERED_START;
usr.sbin/vmd/parse.y
232
env->vmd_cfg.delay.tv_sec = $6;
usr.sbin/vmd/parse.y
233
env->vmd_cfg.parallelism = $4;
usr.sbin/vmd/parse.y
241
vsw->sw_id = env->vmd_nswitches + 1;
usr.sbin/vmd/parse.y
259
} else if (!env->vmd_noaction) {
usr.sbin/vmd/parse.y
260
TAILQ_INSERT_TAIL(env->vmd_switches,
usr.sbin/vmd/parse.y
262
env->vmd_nswitches++;
usr.sbin/vmd/parse.y
370
if (!env->vmd_noaction) {
usr.sbin/vmd/parse.y
371
ret = vm_register(&env->vmd_ps, &vmc,
usr.sbin/vmd/parse.y
617
if (strlcpy(env->vmd_cfg.cfg_agentx.ax_context, $2,
usr.sbin/vmd/parse.y
618
sizeof(env->vmd_cfg.cfg_agentx.ax_context)) >=
usr.sbin/vmd/parse.y
619
sizeof(env->vmd_cfg.cfg_agentx.ax_context)) {
usr.sbin/vmd/parse.y
627
if (strlcpy(env->vmd_cfg.cfg_agentx.ax_path, $2,
usr.sbin/vmd/parse.y
628
sizeof(env->vmd_cfg.cfg_agentx.ax_path)) >=
usr.sbin/vmd/parse.y
629
sizeof(env->vmd_cfg.cfg_agentx.ax_path)) {
usr.sbin/vmd/parse.y
635
if (env->vmd_cfg.cfg_agentx.ax_path[0] != '/') {
usr.sbin/vmd/priv.c
127
if (ioctl(env->vmd_sock_fd, SIOCSIFDESCR, &ifr) == -1)
usr.sbin/vmd/priv.c
133
if (ioctl(env->vmd_sock_fd, SIOCSIFRDOMAIN, &ifr) == -1)
usr.sbin/vmd/priv.c
146
if (ioctl(env->vmd_sock_fd, SIOCBRDGADD, &ifbr) == -1 &&
usr.sbin/vmd/priv.c
153
if (ioctl(env->vmd_sock_fd, SIOCGIFFLAGS, &ifr) == -1)
usr.sbin/vmd/priv.c
161
if (ioctl(env->vmd_sock_fd, SIOCGIFFLAGS, &ifr) == -1) {
usr.sbin/vmd/priv.c
169
if (ioctl(env->vmd_sock_fd, SIOCSIFFLAGS, &ifr) == -1)
usr.sbin/vmd/priv.c
182
if (ioctl(env->vmd_sock_fd, SIOCAIFGROUP, &ifgr) == -1 &&
usr.sbin/vmd/priv.c
201
if (ioctl(env->vmd_sock_fd, SIOCAIFADDR, &ifra) == -1)
usr.sbin/vmd/priv.c
224
if (ioctl(env->vmd_sock_fd6, SIOCDIFADDR_IN6, &in6_ifra) == -1 &&
usr.sbin/vmd/priv.c
228
if (ioctl(env->vmd_sock_fd6, SIOCAIFADDR_IN6, &in6_ifra) == -1)
usr.sbin/vmd/priv.c
248
config_getconfig(env, imsg);
usr.sbin/vmd/priv.c
252
config_purge(env, mode);
usr.sbin/vmd/priv.c
328
struct vmd *env = ps->ps_env;
usr.sbin/vmd/priv.c
450
vm_priv_addr(&env->vmd_cfg.cfg_localprefix,
usr.sbin/vmd/priv.c
463
(env->vmd_cfg.cfg_flags & VMD_CFG_INET6)) {
usr.sbin/vmd/priv.c
477
if (vm_priv_addr6(&env->vmd_cfg.cfg_localprefix,
usr.sbin/vmd/priv.c
58
struct vmd *env = ps->ps_env;
usr.sbin/vmd/priv.c
66
if ((env->vmd_sock_fd = socket(AF_INET, SOCK_DGRAM, 0)) == -1)
usr.sbin/vmd/priv.c
70
if ((env->vmd_sock_fd6 = socket(AF_INET6, SOCK_DGRAM, 0)) == -1)
usr.sbin/vmd/priv.c
80
struct vmd *env = ps->ps_env;
usr.sbin/vmd/psp.c
101
if (ioctl(env->vmd_psp_fd, PSP_IOC_GET_GSTATUS, &gst) < 0) {
usr.sbin/vmd/psp.c
134
if (ioctl(env->vmd_psp_fd, PSP_IOC_LAUNCH_START, &ls) < 0) {
usr.sbin/vmd/psp.c
159
if (ioctl(env->vmd_psp_fd, PSP_IOC_LAUNCH_UPDATE_DATA, &lud) < 0) {
usr.sbin/vmd/psp.c
188
if (ioctl(env->vmd_psp_fd, PSP_IOC_ENCRYPT_STATE, &es) < 0) {
usr.sbin/vmd/psp.c
211
if (ioctl(env->vmd_psp_fd, PSP_IOC_LAUNCH_MEASURE, &lm) < 0) {
usr.sbin/vmd/psp.c
252
if (ioctl(env->vmd_psp_fd, PSP_IOC_LAUNCH_FINISH, &lf) < 0) {
usr.sbin/vmd/psp.c
275
if (ioctl(env->vmd_psp_fd, PSP_IOC_ACTIVATE, &act) < 0) {
usr.sbin/vmd/psp.c
298
if (ioctl(env->vmd_psp_fd, PSP_IOC_GUEST_SHUTDOWN, &gshutdown) < 0) {
usr.sbin/vmd/psp.c
30
extern struct vmd *env;
usr.sbin/vmd/psp.c
312
if (ioctl(env->vmd_psp_fd, PSP_IOC_INIT) < 0) {
usr.sbin/vmd/psp.c
326
if (ioctl(env->vmd_psp_fd, PSP_IOC_SHUTDOWN) < 0) {
usr.sbin/vmd/psp.c
356
env->vmd_psp_fd = open(PSP_NODE, O_RDWR);
usr.sbin/vmd/psp.c
357
if (env->vmd_psp_fd == -1) {
usr.sbin/vmd/psp.c
50
if (ioctl(env->vmd_psp_fd, PSP_IOC_GET_PSTATUS, &pst) < 0) {
usr.sbin/vmd/psp.c
80
if (ioctl(env->vmd_psp_fd, PSP_IOC_DF_FLUSH) < 0) {
usr.sbin/vmd/virtio.c
1126
&env->vmd_cfg.cfg_localprefix,
usr.sbin/vmd/virtio.c
1691
snprintf(vmm_fd, sizeof(vmm_fd), "%d", env->vmd_vmm_fd);
usr.sbin/vmd/virtio.c
1700
nargv[i++] = env->argv0;
usr.sbin/vmd/virtio.c
1709
if (env->vmd_debug)
usr.sbin/vmd/virtio.c
1711
if (env->vmd_verbose == 1)
usr.sbin/vmd/virtio.c
1713
else if (env->vmd_verbose > 1)
usr.sbin/vmd/virtio.c
56
extern struct vmd *env;
usr.sbin/vmd/vm.c
124
sz = atomicio(read, fd, &env->vmd_cfg.cfg_localprefix,
usr.sbin/vmd/vm.c
125
sizeof(env->vmd_cfg.cfg_localprefix));
usr.sbin/vmd/vm.c
126
if (sz != sizeof(env->vmd_cfg.cfg_localprefix)) {
usr.sbin/vmd/vm.c
140
if (vm.vm_params.vmc_sev && env->vmd_psp_fd < 0) {
usr.sbin/vmd/vm.c
510
if (ioctl(env->vmd_vmm_fd, VMM_IOC_RESETCPU, &vrp) == -1)
usr.sbin/vmd/vm.c
560
if (ioctl(env->vmd_vmm_fd, VMM_IOC_CREATE, &vcp) == -1)
usr.sbin/vmd/vm.c
59
extern struct vmd *env;
usr.sbin/vmd/vm.c
897
if (ioctl(env->vmd_vmm_fd, VMM_IOC_RUN, vrp) == -1) {
usr.sbin/vmd/vm.c
92
env->vmd_vmm_fd = fd_vmm;
usr.sbin/vmd/vm.c
944
if (ioctl(env->vmd_vmm_fd, VMM_IOC_INTR, &vip) == -1)
usr.sbin/vmd/vm.c
97
if (unveil(env->argv0, "x") == -1)
usr.sbin/vmd/vm.c
98
fatal("unveil %s", env->argv0);
usr.sbin/vmd/vm_agentx.c
135
struct vmd *env = p->p_ps->ps_env;
usr.sbin/vmd/vm_agentx.c
250
config_getconfig(env, imsg);
usr.sbin/vmd/vm_agentx.c
251
vm_agentx_configure(&env->vmd_cfg.cfg_agentx);
usr.sbin/vmd/vm_agentx.c
260
vm_agentx_configure(struct vmd_agentx *env)
usr.sbin/vmd/vm_agentx.c
262
static char curpath[sizeof(env->ax_path)];
usr.sbin/vmd/vm_agentx.c
263
static char curcontext[sizeof(env->ax_context)];
usr.sbin/vmd/vm_agentx.c
268
char *context = env->ax_context[0] == '\0' ? NULL : env->ax_context;
usr.sbin/vmd/vm_agentx.c
271
vmd_agentx = env;
usr.sbin/vmd/vm_agentx.c
508
extern struct vmd *env;
usr.sbin/vmd/vm_agentx.c
524
if (proc_compose_imsg(&(env->vmd_ps), PROC_PARENT,
usr.sbin/vmd/vmd.c
1008
TAILQ_FOREACH(vm, env->vmd_vms, vm_entry) {
usr.sbin/vmd/vmd.c
1021
TAILQ_FOREACH(vm, env->vmd_vms, vm_entry) {
usr.sbin/vmd/vmd.c
1032
struct privsep *ps = &env->vmd_ps;
usr.sbin/vmd/vmd.c
1085
struct privsep *ps = &env->vmd_ps;
usr.sbin/vmd/vmd.c
1094
TAILQ_REMOVE(env->vmd_vms, vm, vm_entry);
usr.sbin/vmd/vmd.c
1107
TAILQ_FOREACH(n2i, env->vmd_known, entry)
usr.sbin/vmd/vmd.c
1111
if (++env->vmd_nvm == 0) {
usr.sbin/vmd/vmd.c
1119
n2i->id = env->vmd_nvm;
usr.sbin/vmd/vmd.c
1126
TAILQ_INSERT_TAIL(env->vmd_known, n2i, entry);
usr.sbin/vmd/vmd.c
1273
TAILQ_INSERT_TAIL(env->vmd_vms, vm, vm_entry);
usr.sbin/vmd/vmd.c
1627
if (fdopenpty(env->vmd_ptm_fd, &vm->vm_tty, &tty_slave, vm->vm_ttyname,
usr.sbin/vmd/vmd.c
1719
TAILQ_REMOVE(env->vmd_switches, vsw, sw_entry);
usr.sbin/vmd/vmd.c
1733
TAILQ_FOREACH(vsw, env->vmd_switches, sw_entry) {
usr.sbin/vmd/vmd.c
433
TAILQ_FOREACH(vm, env->vmd_vms, vm_entry) {
usr.sbin/vmd/vmd.c
561
if ((env = calloc(1, sizeof(*env))) == NULL)
usr.sbin/vmd/vmd.c
564
env->vmd_ptm_fd = -1;
usr.sbin/vmd/vmd.c
565
env->vmd_psp_fd = -1;
usr.sbin/vmd/vmd.c
566
env->vmd_sock_fd = -1;
usr.sbin/vmd/vmd.c
567
env->vmd_sock_fd6 = -1;
usr.sbin/vmd/vmd.c
568
env->vmd_vmm_fd = -1;
usr.sbin/vmd/vmd.c
578
env->vmd_debug = 2;
usr.sbin/vmd/vmd.c
584
env->vmd_verbose++;
usr.sbin/vmd/vmd.c
588
env->vmd_noaction = 1;
usr.sbin/vmd/vmd.c
642
if (env->vmd_noaction && !env->vmd_debug)
usr.sbin/vmd/vmd.c
643
env->vmd_debug = 1;
usr.sbin/vmd/vmd.c
645
log_init(env->vmd_debug, LOG_DAEMON);
usr.sbin/vmd/vmd.c
646
log_setverbose(env->vmd_verbose);
usr.sbin/vmd/vmd.c
649
if (proc_id == PROC_PARENT && *argv[0] != '/' && !env->vmd_noaction)
usr.sbin/vmd/vmd.c
65
struct vmd *env;
usr.sbin/vmd/vmd.c
651
env->argv0 = argv[0];
usr.sbin/vmd/vmd.c
654
if (env->vmd_noaction == 0 && !vm_launch) {
usr.sbin/vmd/vmd.c
659
ps = &env->vmd_ps;
usr.sbin/vmd/vmd.c
660
ps->ps_env = env;
usr.sbin/vmd/vmd.c
661
env->vmd_psp_fd = psp_fd;
usr.sbin/vmd/vmd.c
663
if (config_init(env) == -1)
usr.sbin/vmd/vmd.c
697
if (env->vmd_noaction == 0 && proc_id == PROC_PARENT) {
usr.sbin/vmd/vmd.c
698
env->vmd_vmm_fd = open(VMM_NODE, O_RDWR | O_CLOEXEC);
usr.sbin/vmd/vmd.c
699
if (env->vmd_vmm_fd == -1)
usr.sbin/vmd/vmd.c
707
env->vmd_conffile = conffile;
usr.sbin/vmd/vmd.c
709
if (env->vmd_noaction)
usr.sbin/vmd/vmd.c
715
proc_init(ps, procs, nitems(procs), env->vmd_debug, argc0, argv,
usr.sbin/vmd/vmd.c
735
if (!env->vmd_noaction)
usr.sbin/vmd/vmd.c
738
env->vmd_psp_fd = -1;
usr.sbin/vmd/vmd.c
739
if (env->vmd_noaction == 0 && proc_id == PROC_PARENT)
usr.sbin/vmd/vmd.c
759
env->vmd_cfg.parallelism);
usr.sbin/vmd/vmd.c
760
TAILQ_FOREACH(vm, env->vmd_vms, vm_entry) {
usr.sbin/vmd/vmd.c
767
if (i > env->vmd_cfg.parallelism) {
usr.sbin/vmd/vmd.c
769
&env->vmd_cfg.delay);
usr.sbin/vmd/vmd.c
773
config_setvm(&env->vmd_ps, vm, -1, vm->vm_params.vmc_owner.uid);
usr.sbin/vmd/vmd.c
803
if ((env->vmd_ptm_fd = getptmfd()) == -1)
usr.sbin/vmd/vmd.c
806
if (parse_config(env->vmd_conffile) == -1) {
usr.sbin/vmd/vmd.c
807
proc_kill(&env->vmd_ps);
usr.sbin/vmd/vmd.c
811
if (env->vmd_noaction) {
usr.sbin/vmd/vmd.c
813
proc_kill(&env->vmd_ps);
usr.sbin/vmd/vmd.c
818
proc_compose_imsg(&env->vmd_ps, PROC_VMM,
usr.sbin/vmd/vmd.c
819
IMSG_VMDOP_RECEIVE_VMM_FD, -1, env->vmd_vmm_fd, NULL, 0);
usr.sbin/vmd/vmd.c
822
if (env->vmd_psp_fd != -1) {
usr.sbin/vmd/vmd.c
823
proc_compose_imsg(&env->vmd_ps, PROC_VMM,
usr.sbin/vmd/vmd.c
824
IMSG_VMDOP_RECEIVE_PSP_FD, -1, env->vmd_psp_fd, NULL, 0);
usr.sbin/vmd/vmd.c
828
if (config_setconfig(env) == -1)
usr.sbin/vmd/vmd.c
831
TAILQ_FOREACH(vsw, env->vmd_switches, sw_entry) {
usr.sbin/vmd/vmd.c
834
if (vm_priv_brconfig(&env->vmd_ps, vsw) == -1) {
usr.sbin/vmd/vmd.c
842
if (!(env->vmd_cfg.cfg_flags & VMD_CFG_STAGGERED_START)) {
usr.sbin/vmd/vmd.c
843
env->vmd_cfg.delay.tv_sec = VMD_DEFAULT_STAGGERED_START_DELAY;
usr.sbin/vmd/vmd.c
846
env->vmd_cfg.parallelism = ncpus;
usr.sbin/vmd/vmd.c
849
__func__, ncpus, (long long) env->vmd_cfg.delay.tv_sec);
usr.sbin/vmd/vmd.c
869
filename = env->vmd_conffile;
usr.sbin/vmd/vmd.c
877
config_purge(env, reset);
usr.sbin/vmd/vmd.c
878
config_setreset(env, reset);
usr.sbin/vmd/vmd.c
889
TAILQ_FOREACH_SAFE(vm, env->vmd_vms, vm_entry,
usr.sbin/vmd/vmd.c
907
if (config_setconfig(env) == -1)
usr.sbin/vmd/vmd.c
911
TAILQ_FOREACH(vsw, env->vmd_switches, sw_entry) {
usr.sbin/vmd/vmd.c
914
if (vm_priv_brconfig(&env->vmd_ps, vsw) == -1) {
usr.sbin/vmd/vmd.c
939
TAILQ_FOREACH_SAFE(vm, env->vmd_vms, vm_entry, vm_next) {
usr.sbin/vmd/vmd.c
943
proc_kill(&env->vmd_ps);
usr.sbin/vmd/vmd.c
944
free(env);
usr.sbin/vmd/vmd.c
957
TAILQ_FOREACH(vm, env->vmd_vms, vm_entry) {
usr.sbin/vmd/vmd.c
973
TAILQ_FOREACH(vm, env->vmd_vms, vm_entry) {
usr.sbin/vmd/vmm.c
220
config_getconfig(env, imsg);
usr.sbin/vmd/vmm.c
229
config_purge(env, mode);
usr.sbin/vmd/vmm.c
234
env->vmd_verbose = verbose;
usr.sbin/vmd/vmm.c
236
TAILQ_FOREACH(vm, env->vmd_vms, vm_entry) {
usr.sbin/vmd/vmm.c
274
if (env->vmd_vmm_fd != -1)
usr.sbin/vmd/vmm.c
276
env->vmd_vmm_fd = imsg_get_fd(imsg);
usr.sbin/vmd/vmm.c
282
if (env->vmd_psp_fd != -1)
usr.sbin/vmd/vmm.c
284
env->vmd_psp_fd = imsg_get_fd(imsg);
usr.sbin/vmd/vmm.c
403
TAILQ_FOREACH_SAFE(vm, env->vmd_vms, vm_entry, vm_next) {
usr.sbin/vmd/vmm.c
53
extern struct vmd *env;
usr.sbin/vmd/vmm.c
533
if (ioctl(env->vmd_vmm_fd, VMM_IOC_TERM, vtp) == -1)
usr.sbin/vmd/vmm.c
680
sz = atomicio(vwrite, fds[0], &env->vmd_cfg.cfg_localprefix,
usr.sbin/vmd/vmm.c
681
sizeof(env->vmd_cfg.cfg_localprefix));
usr.sbin/vmd/vmm.c
682
if (sz != sizeof(env->vmd_cfg.cfg_localprefix)) {
usr.sbin/vmd/vmm.c
719
if (!env->vmd_debug) {
usr.sbin/vmd/vmm.c
727
if (env->vmd_psp_fd > 0)
usr.sbin/vmd/vmm.c
728
fcntl(env->vmd_psp_fd, F_SETFD, 0); /* psp device fd */
usr.sbin/vmd/vmm.c
737
snprintf(vmm_fd, sizeof(vmm_fd), "%d", env->vmd_vmm_fd);
usr.sbin/vmd/vmm.c
739
snprintf(psp_fd, sizeof(psp_fd), "%d", env->vmd_psp_fd);
usr.sbin/vmd/vmm.c
742
nargv[i++] = env->argv0;
usr.sbin/vmd/vmm.c
749
if (env->vmd_debug)
usr.sbin/vmd/vmm.c
75
if (!env->vmd_debug) {
usr.sbin/vmd/vmm.c
751
if (env->vmd_verbose == 1)
usr.sbin/vmd/vmm.c
753
else if (env->vmd_verbose > 1)
usr.sbin/vmd/vmm.c
820
if (ioctl(env->vmd_vmm_fd, VMM_IOC_INFO, &vip) == -1)
usr.sbin/vmd/vmm.c
832
if (ioctl(env->vmd_vmm_fd, VMM_IOC_INFO, &vip) == -1) {
usr.sbin/vmd/vmm.c
84
if (unveil(env->argv0, "x") == -1)
usr.sbin/vmd/vmm.c
85
fatal("unveil %s", env->argv0);
usr.sbin/ypldap/entries.c
100
RB_FOREACH(ge, group_name_tree, env->sc_group_names) {
usr.sbin/ypldap/entries.c
114
env->sc_group_lines = linep;
usr.sbin/ypldap/entries.c
40
flatten_entries(struct env *env)
usr.sbin/ypldap/entries.c
57
if ((linep = calloc(1, env->sc_user_line_len + 1)) == NULL) {
usr.sbin/ypldap/entries.c
65
RB_FOREACH(ue, user_name_tree, env->sc_user_names) {
usr.sbin/ypldap/entries.c
90
env->sc_user_lines = linep;
usr.sbin/ypldap/entries.c
93
if ((linep = calloc(1, env->sc_group_line_len + 1)) == NULL) {
usr.sbin/ypldap/ldapclient.c
136
struct env *env = p;
usr.sbin/ypldap/ldapclient.c
137
struct imsgev *iev = env->sc_iev_dns;
usr.sbin/ypldap/ldapclient.c
166
TAILQ_FOREACH(idm, &env->sc_idms, idm_entry)
usr.sbin/ypldap/ldapclient.c
206
TAILQ_FOREACH(idm, &env->sc_idms, idm_entry) {
usr.sbin/ypldap/ldapclient.c
208
if (client_try_idm(env, idm, h) == -1)
usr.sbin/ypldap/ldapclient.c
218
imsg_compose_event(env->sc_iev, IMSG_END_UPDATE, 0, 0, -1,
usr.sbin/ypldap/ldapclient.c
236
struct env *env = p;
usr.sbin/ypldap/ldapclient.c
237
struct imsgev *iev = env->sc_iev;
usr.sbin/ypldap/ldapclient.c
266
struct env params;
usr.sbin/ypldap/ldapclient.c
268
if (env->sc_flags & F_CONFIGURING) {
usr.sbin/ypldap/ldapclient.c
274
env->sc_flags |= F_CONFIGURING;
usr.sbin/ypldap/ldapclient.c
275
purge_config(env);
usr.sbin/ypldap/ldapclient.c
276
memcpy(&env->sc_conf_tv, ¶ms.sc_conf_tv,
usr.sbin/ypldap/ldapclient.c
277
sizeof(env->sc_conf_tv));
usr.sbin/ypldap/ldapclient.c
278
env->sc_flags |= params.sc_flags;
usr.sbin/ypldap/ldapclient.c
284
if (!(env->sc_flags & F_CONFIGURING))
usr.sbin/ypldap/ldapclient.c
289
idm->idm_env = env;
usr.sbin/ypldap/ldapclient.c
290
TAILQ_INSERT_TAIL(&env->sc_idms, idm, idm_entry);
usr.sbin/ypldap/ldapclient.c
294
env->sc_flags &= ~F_CONFIGURING;
usr.sbin/ypldap/ldapclient.c
296
client_configure(env);
usr.sbin/ypldap/ldapclient.c
332
struct env env;
usr.sbin/ypldap/ldapclient.c
344
memset(&env, 0, sizeof(env));
usr.sbin/ypldap/ldapclient.c
345
TAILQ_INIT(&env.sc_idms);
usr.sbin/ypldap/ldapclient.c
389
if ((env.sc_iev = calloc(1, sizeof(*env.sc_iev))) == NULL)
usr.sbin/ypldap/ldapclient.c
391
if ((env.sc_iev_dns = calloc(1, sizeof(*env.sc_iev_dns))) == NULL)
usr.sbin/ypldap/ldapclient.c
394
env.sc_iev->events = EV_READ;
usr.sbin/ypldap/ldapclient.c
395
env.sc_iev->data = &env;
usr.sbin/ypldap/ldapclient.c
396
if (imsgbuf_init(&env.sc_iev->ibuf, pipe_main2client[1]) == -1)
usr.sbin/ypldap/ldapclient.c
398
env.sc_iev->handler = client_dispatch_parent;
usr.sbin/ypldap/ldapclient.c
399
event_set(&env.sc_iev->ev, env.sc_iev->ibuf.fd, env.sc_iev->events,
usr.sbin/ypldap/ldapclient.c
400
env.sc_iev->handler, &env);
usr.sbin/ypldap/ldapclient.c
401
event_add(&env.sc_iev->ev, NULL);
usr.sbin/ypldap/ldapclient.c
403
env.sc_iev_dns->events = EV_READ;
usr.sbin/ypldap/ldapclient.c
404
env.sc_iev_dns->data = &env;
usr.sbin/ypldap/ldapclient.c
405
if (imsgbuf_init(&env.sc_iev_dns->ibuf, pipe_dns[0]) == -1)
usr.sbin/ypldap/ldapclient.c
407
env.sc_iev_dns->handler = client_dispatch_dns;
usr.sbin/ypldap/ldapclient.c
408
event_set(&env.sc_iev_dns->ev, env.sc_iev_dns->ibuf.fd,
usr.sbin/ypldap/ldapclient.c
409
env.sc_iev_dns->events, env.sc_iev_dns->handler, &env);
usr.sbin/ypldap/ldapclient.c
410
event_add(&env.sc_iev_dns->ev, NULL);
usr.sbin/ypldap/ldapclient.c
49
void client_configure(struct env *);
usr.sbin/ypldap/ldapclient.c
493
client_search_idm(struct env *env, struct idm *idm, struct aldap *al,
usr.sbin/ypldap/ldapclient.c
53
int client_search_idm(struct env *, struct idm *, struct aldap *,
usr.sbin/ypldap/ldapclient.c
540
imsg_compose_event(env->sc_iev, type, 0, 0, -1,
usr.sbin/ypldap/ldapclient.c
55
int client_try_idm(struct env *, struct idm *, struct ypldap_addr *);
usr.sbin/ypldap/ldapclient.c
560
client_try_idm(struct env *env, struct idm *idm, struct ypldap_addr *addr)
usr.sbin/ypldap/ldapclient.c
668
if (client_search_idm(env, idm, al, attrs,
usr.sbin/ypldap/ldapclient.c
685
if (client_search_idm(env, idm, al, attrs,
usr.sbin/ypldap/ldapclient.c
705
struct env *env = p;
usr.sbin/ypldap/ldapclient.c
712
TAILQ_FOREACH(idm, &env->sc_idms, idm_entry) {
usr.sbin/ypldap/ldapclient.c
722
imsg_compose_event(env->sc_iev, IMSG_TRASH_UPDATE, 0, 0, -1,
usr.sbin/ypldap/ldapclient.c
726
client_configure(env);
usr.sbin/ypldap/ldapclient.c
730
client_configure(struct env *env)
usr.sbin/ypldap/ldapclient.c
738
imsg_compose_event(env->sc_iev, IMSG_START_UPDATE, 0, 0, -1, NULL, 0);
usr.sbin/ypldap/ldapclient.c
741
TAILQ_FOREACH(idm, &env->sc_idms, idm_entry) {
usr.sbin/ypldap/ldapclient.c
743
imsg_compose_event(env->sc_iev_dns, IMSG_HOST_DNS, idm->idm_id,
usr.sbin/ypldap/ldapclient.c
747
tv.tv_sec = env->sc_conf_tv.tv_sec;
usr.sbin/ypldap/ldapclient.c
748
tv.tv_usec = env->sc_conf_tv.tv_usec;
usr.sbin/ypldap/ldapclient.c
749
evtimer_set(&env->sc_conf_ev, client_periodic_update, env);
usr.sbin/ypldap/ldapclient.c
750
evtimer_add(&env->sc_conf_ev, &tv);
usr.sbin/ypldap/parse.y
920
parse_config(struct env *x_conf, const char *filename, int opts)
usr.sbin/ypldap/parse.y
94
struct env *conf = NULL;
usr.sbin/ypldap/yp.c
113
yp_init(struct env *x_env)
usr.sbin/ypldap/yp.c
123
env = x_env;
usr.sbin/ypldap/yp.c
124
env->sc_yp = yp;
usr.sbin/ypldap/yp.c
126
switch (env->sc_bind_mode) {
usr.sbin/ypldap/yp.c
199
snprintf(path, sizeof path, "%s/%s.%ld", BINDINGDIR, env->sc_domainname,
usr.sbin/ypldap/yp.c
397
if (strcmp(domain, env->sc_domainname) != 0) {
usr.sbin/ypldap/yp.c
410
if (strcmp(*arg, env->sc_domainname) != 0)
usr.sbin/ypldap/yp.c
420
if (strcmp(*arg, env->sc_domainname) != 0)
usr.sbin/ypldap/yp.c
444
if (env->sc_user_names == NULL) {
usr.sbin/ypldap/yp.c
461
if ((ue = RB_FIND(user_name_tree, env->sc_user_names,
usr.sbin/ypldap/yp.c
477
if ((ue = RB_FIND(user_uid_tree, &env->sc_user_uids,
usr.sbin/ypldap/yp.c
491
if ((ge = RB_FIND(group_gid_tree, &env->sc_group_gids,
usr.sbin/ypldap/yp.c
501
if ((ge = RB_FIND(group_name_tree, env->sc_group_names,
usr.sbin/ypldap/yp.c
540
if ((ue = RB_FIND(user_uid_tree, &env->sc_user_uids,
usr.sbin/ypldap/yp.c
566
if (env->sc_user_lines == NULL)
usr.sbin/ypldap/yp.c
569
yp_make_keyval(&res, env->sc_user_lines, env->sc_user_lines);
usr.sbin/ypldap/yp.c
571
if (env->sc_group_lines == NULL)
usr.sbin/ypldap/yp.c
574
yp_make_keyval(&res, env->sc_group_lines, env->sc_group_lines);
usr.sbin/ypldap/yp.c
60
static struct env *env;
usr.sbin/ypldap/yp.c
603
if ((ue = RB_NFIND(user_name_tree, env->sc_user_names,
usr.sbin/ypldap/yp.c
620
if ((ge = RB_NFIND(group_name_tree, env->sc_group_names,
usr.sbin/ypldap/yp.c
691
if (!(env->sc_flags & mapnames[i].cond))
usr.sbin/ypldap/yp.c
78
while ((ye = TAILQ_FIRST(&env->sc_yp->yd_events)) != NULL) {
usr.sbin/ypldap/yp.c
79
TAILQ_REMOVE(&env->sc_yp->yd_events, ye, ye_entry);
usr.sbin/ypldap/yp.c
99
TAILQ_INSERT_TAIL(&env->sc_yp->yd_events, ye, ye_entry);
usr.sbin/ypldap/ypldap.c
126
main_start_update(struct env *env)
usr.sbin/ypldap/ypldap.c
128
env->update_trashed = 0;
usr.sbin/ypldap/ypldap.c
131
env->sc_user_line_len = 0;
usr.sbin/ypldap/ypldap.c
132
env->sc_group_line_len = 0;
usr.sbin/ypldap/ypldap.c
133
if ((env->sc_user_names_t = calloc(1,
usr.sbin/ypldap/ypldap.c
134
sizeof(*env->sc_user_names_t))) == NULL ||
usr.sbin/ypldap/ypldap.c
135
(env->sc_group_names_t = calloc(1,
usr.sbin/ypldap/ypldap.c
136
sizeof(*env->sc_group_names_t))) == NULL)
usr.sbin/ypldap/ypldap.c
138
RB_INIT(env->sc_user_names_t);
usr.sbin/ypldap/ypldap.c
139
RB_INIT(env->sc_group_names_t);
usr.sbin/ypldap/ypldap.c
148
main_trash_update(struct env *env)
usr.sbin/ypldap/ypldap.c
153
env->update_trashed = 1;
usr.sbin/ypldap/ypldap.c
155
while ((ue = RB_ROOT(env->sc_user_names_t)) != NULL) {
usr.sbin/ypldap/ypldap.c
157
env->sc_user_names_t, ue);
usr.sbin/ypldap/ypldap.c
162
free(env->sc_user_names_t);
usr.sbin/ypldap/ypldap.c
163
env->sc_user_names_t = NULL;
usr.sbin/ypldap/ypldap.c
164
while ((ge = RB_ROOT(env->sc_group_names_t))
usr.sbin/ypldap/ypldap.c
167
env->sc_group_names_t, ge);
usr.sbin/ypldap/ypldap.c
171
free(env->sc_group_names_t);
usr.sbin/ypldap/ypldap.c
172
env->sc_group_names_t = NULL;
usr.sbin/ypldap/ypldap.c
176
main_create_user_groups(struct env *env)
usr.sbin/ypldap/ypldap.c
187
RB_FOREACH(ue, user_name_tree, env->sc_user_names_t) {
usr.sbin/ypldap/ypldap.c
224
RB_FOREACH(ge, group_name_tree, env->sc_group_names_t) {
usr.sbin/ypldap/ypldap.c
244
if ((ue = RB_FIND(user_name_tree, env->sc_user_names_t,
usr.sbin/ypldap/ypldap.c
274
main_end_update(struct env *env)
usr.sbin/ypldap/ypldap.c
279
if (env->update_trashed)
usr.sbin/ypldap/ypldap.c
284
if (main_create_user_groups(env) == -1) {
usr.sbin/ypldap/ypldap.c
285
main_trash_update(env);
usr.sbin/ypldap/ypldap.c
289
if (env->sc_user_names == NULL) {
usr.sbin/ypldap/ypldap.c
290
env->sc_user_names = env->sc_user_names_t;
usr.sbin/ypldap/ypldap.c
291
env->sc_user_lines = NULL;
usr.sbin/ypldap/ypldap.c
292
env->sc_user_names_t = NULL;
usr.sbin/ypldap/ypldap.c
294
env->sc_group_names = env->sc_group_names_t;
usr.sbin/ypldap/ypldap.c
295
env->sc_group_lines = NULL;
usr.sbin/ypldap/ypldap.c
296
env->sc_group_names_t = NULL;
usr.sbin/ypldap/ypldap.c
298
flatten_entries(env);
usr.sbin/ypldap/ypldap.c
305
while ((ue = RB_ROOT(env->sc_user_names)) != NULL) {
usr.sbin/ypldap/ypldap.c
306
RB_REMOVE(user_name_tree, env->sc_user_names,
usr.sbin/ypldap/ypldap.c
311
free(env->sc_user_names);
usr.sbin/ypldap/ypldap.c
312
free(env->sc_user_lines);
usr.sbin/ypldap/ypldap.c
314
env->sc_user_names = env->sc_user_names_t;
usr.sbin/ypldap/ypldap.c
315
env->sc_user_lines = NULL;
usr.sbin/ypldap/ypldap.c
316
env->sc_user_names_t = NULL;
usr.sbin/ypldap/ypldap.c
318
while ((ge = RB_ROOT(env->sc_group_names)) != NULL) {
usr.sbin/ypldap/ypldap.c
320
env->sc_group_names, ge);
usr.sbin/ypldap/ypldap.c
323
free(env->sc_group_names);
usr.sbin/ypldap/ypldap.c
324
free(env->sc_group_lines);
usr.sbin/ypldap/ypldap.c
326
env->sc_group_names = env->sc_group_names_t;
usr.sbin/ypldap/ypldap.c
327
env->sc_group_lines = NULL;
usr.sbin/ypldap/ypldap.c
328
env->sc_group_names_t = NULL;
usr.sbin/ypldap/ypldap.c
331
flatten_entries(env);
usr.sbin/ypldap/ypldap.c
338
RB_INIT(&env->sc_user_uids);
usr.sbin/ypldap/ypldap.c
339
RB_INIT(&env->sc_group_gids);
usr.sbin/ypldap/ypldap.c
340
RB_FOREACH(ue, user_name_tree, env->sc_user_names)
usr.sbin/ypldap/ypldap.c
342
&env->sc_user_uids, ue);
usr.sbin/ypldap/ypldap.c
343
RB_FOREACH(ge, group_name_tree, env->sc_group_names)
usr.sbin/ypldap/ypldap.c
345
&env->sc_group_gids, ge);
usr.sbin/ypldap/ypldap.c
354
struct env *env = p;
usr.sbin/ypldap/ypldap.c
355
struct imsgev *iev = env->sc_iev;
usr.sbin/ypldap/ypldap.c
386
main_start_update(env);
usr.sbin/ypldap/ypldap.c
392
if (env->update_trashed)
usr.sbin/ypldap/ypldap.c
408
if (RB_INSERT(user_name_tree, env->sc_user_names_t,
usr.sbin/ypldap/ypldap.c
413
env->sc_user_line_len += len;
usr.sbin/ypldap/ypldap.c
420
if (env->update_trashed)
usr.sbin/ypldap/ypldap.c
436
if (RB_INSERT(group_name_tree, env->sc_group_names_t,
usr.sbin/ypldap/ypldap.c
441
env->sc_group_line_len += len;
usr.sbin/ypldap/ypldap.c
445
main_trash_update(env);
usr.sbin/ypldap/ypldap.c
448
main_end_update(env);
usr.sbin/ypldap/ypldap.c
469
main_configure_client(struct env *env)
usr.sbin/ypldap/ypldap.c
47
void main_configure_client(struct env *);
usr.sbin/ypldap/ypldap.c
472
struct imsgev *iev = env->sc_iev;
usr.sbin/ypldap/ypldap.c
474
imsg_compose_event(iev, IMSG_CONF_START, 0, 0, -1, env, sizeof(*env));
usr.sbin/ypldap/ypldap.c
475
TAILQ_FOREACH(idm, &env->sc_idms, idm_entry) {
usr.sbin/ypldap/ypldap.c
485
struct env *env = p;
usr.sbin/ypldap/ypldap.c
487
main_configure_client(env);
usr.sbin/ypldap/ypldap.c
49
void main_start_update(struct env *);
usr.sbin/ypldap/ypldap.c
491
purge_config(struct env *env)
usr.sbin/ypldap/ypldap.c
495
while ((idm = TAILQ_FIRST(&env->sc_idms)) != NULL) {
usr.sbin/ypldap/ypldap.c
496
TAILQ_REMOVE(&env->sc_idms, idm, idm_entry);
usr.sbin/ypldap/ypldap.c
50
void main_trash_update(struct env *);
usr.sbin/ypldap/ypldap.c
507
struct env env;
usr.sbin/ypldap/ypldap.c
51
void main_end_update(struct env *);
usr.sbin/ypldap/ypldap.c
52
int main_create_user_groups(struct env *);
usr.sbin/ypldap/ypldap.c
53
void purge_config(struct env *);
usr.sbin/ypldap/ypldap.c
553
RB_INIT(&env.sc_user_uids);
usr.sbin/ypldap/ypldap.c
554
RB_INIT(&env.sc_group_gids);
usr.sbin/ypldap/ypldap.c
556
if (parse_config(&env, conffile, opts))
usr.sbin/ypldap/ypldap.c
584
signal_set(&ev_sigint, SIGINT, main_sig_handler, &env);
usr.sbin/ypldap/ypldap.c
585
signal_set(&ev_sigterm, SIGTERM, main_sig_handler, &env);
usr.sbin/ypldap/ypldap.c
586
signal_set(&ev_sighup, SIGHUP, main_sig_handler, &env);
usr.sbin/ypldap/ypldap.c
587
signal_set(&ev_sigchld, SIGCHLD, main_sig_handler, &env);
usr.sbin/ypldap/ypldap.c
594
if ((env.sc_iev = calloc(1, sizeof(*env.sc_iev))) == NULL)
usr.sbin/ypldap/ypldap.c
596
if (imsgbuf_init(&env.sc_iev->ibuf, pipe_main2client[0]) == -1)
usr.sbin/ypldap/ypldap.c
598
env.sc_iev->handler = main_dispatch_client;
usr.sbin/ypldap/ypldap.c
600
env.sc_iev->events = EV_READ;
usr.sbin/ypldap/ypldap.c
601
env.sc_iev->data = &env;
usr.sbin/ypldap/ypldap.c
602
event_set(&env.sc_iev->ev, env.sc_iev->ibuf.fd, env.sc_iev->events,
usr.sbin/ypldap/ypldap.c
603
env.sc_iev->handler, &env);
usr.sbin/ypldap/ypldap.c
604
event_add(&env.sc_iev->ev, NULL);
usr.sbin/ypldap/ypldap.c
606
yp_init(&env);
usr.sbin/ypldap/ypldap.c
624
evtimer_set(&ev_timer, main_init_timer, &env);
usr.sbin/ypldap/ypldap.h
131
struct env *idm_env;
usr.sbin/ypldap/ypldap.h
197
int parse_config(struct env *, const char *, int);
usr.sbin/ypldap/ypldap.h
204
void purge_config(struct env *);
usr.sbin/ypldap/ypldap.h
210
void flatten_entries(struct env *);
usr.sbin/ypldap/ypldap.h
221
void yp_init(struct env *);
usr.sbin/ypldap/ypldap_dns.c
113
if ((env.sc_iev = calloc(1, sizeof(*env.sc_iev))) == NULL)
usr.sbin/ypldap/ypldap_dns.c
116
env.sc_iev->events = EV_READ;
usr.sbin/ypldap/ypldap_dns.c
117
env.sc_iev->data = &env;
usr.sbin/ypldap/ypldap_dns.c
118
if (imsgbuf_init(&env.sc_iev->ibuf, pipe_ntp[1]) == -1)
usr.sbin/ypldap/ypldap_dns.c
120
env.sc_iev->handler = dns_dispatch_imsg;
usr.sbin/ypldap/ypldap_dns.c
121
event_set(&env.sc_iev->ev, env.sc_iev->ibuf.fd, env.sc_iev->events,
usr.sbin/ypldap/ypldap_dns.c
122
env.sc_iev->handler, &env);
usr.sbin/ypldap/ypldap_dns.c
123
event_add(&env.sc_iev->ev, NULL);
usr.sbin/ypldap/ypldap_dns.c
140
struct env *env = p;
usr.sbin/ypldap/ypldap_dns.c
141
struct imsgev *iev = env->sc_iev;
usr.sbin/ypldap/ypldap_dns.c
81
struct env env;