Lines Matching refs:NULL
303 (!((elm)->chain.le_next == NULL && (elm)->chain.le_prev == NULL))
307 if (curelm == NULL) {\
549 if ((sadb_mutex = lck_mtx_alloc_init(sadb_mutex_grp, sadb_mutex_attr)) == NULL) {
558 if ((pfkey_stat_mutex = lck_mtx_alloc_init(pfkey_stat_mutex_grp, pfkey_stat_mutex_attr)) == NULL) {
578 * OUT: NULL: not found
591 if (spidx == NULL)
592 panic("key_allocsp: NULL pointer is passed.\n");
620 return NULL;
656 return NULL;
664 r1 = r2 = NULL;
700 return NULL;
728 *sav = NULL;
731 if (isr == NULL || saidx == NULL)
732 panic("key_checkrequest: NULL pointer is passed.\n");
752 if (*sav == NULL)
756 if (*sav != NULL)
781 * OUT: NULL: not found.
808 return NULL;
835 if (sav != NULL) {
841 return NULL;
848 * NULL : not found
862 candidate = NULL;
863 natt_candidate = NULL;
864 no_natt_candidate = NULL;
867 sav != NULL;
889 if (natt_candidate == NULL) {
895 if (no_natt_candidate == NULL) {
905 if (candidate->lft_c == NULL || sav->lft_c == NULL)
907 "lifetime_current is NULL.\n");
976 if (result == NULL)
986 if (key_sendup_mbuf(NULL, result,
995 if (natt_candidate == NULL)
997 else if (no_natt_candidate == NULL)
1021 * NULL: not found, or error occurred.
1048 if (src == NULL || dst == NULL)
1049 panic("key_allocsa: NULL pointer is passed.\n");
1073 match = NULL;
1175 return NULL;
1255 candidate = NULL;
1258 currsav != NULL;
1270 if (candidate == NULL) {
1278 if (candidate->lft_c == NULL || currsav->lft_c == NULL)
1280 "lifetime_current is NULL.\n");
1317 if (sp == NULL)
1318 panic("key_freesp: NULL pointer is passed.\n");
1349 if (so == NULL)
1350 panic("key_freeso: NULL pointer is passed.\n");
1360 if (pcb == NULL || pcb->inp_sp == NULL)
1374 if (pcb == NULL || pcb->inp_sp == NULL)
1382 if (pcb == NULL || pcb->in6p_sp == NULL)
1407 if (sp == NULL || *sp == NULL)
1408 panic("key_freesp_so: sp == NULL\n");
1417 *sp = NULL;
1443 if (sav == NULL)
1444 panic("key_freesav: NULL pointer is passed.\n");
1472 if (sp == NULL)
1473 panic("key_delsp: NULL pointer is passed.\n");
1490 while (isr != NULL) {
1503 * OUT: NULL : not found
1515 if (spidx == NULL)
1516 panic("key_getsp: NULL pointer is passed.\n");
1527 return NULL;
1532 * OUT: NULL : not found
1561 return NULL;
1567 struct secpolicy *newsp = NULL;
1575 newsp->req = NULL;
1596 if (xpl0 == NULL)
1597 panic("key_msg2sp: NULL pointer was passed.\n");
1603 return NULL;
1606 if ((newsp = key_newsp()) == NULL) {
1608 return NULL;
1621 newsp->req = NULL;
1636 return NULL;
1650 return NULL;
1655 if ((*p_isr) == NULL) {
1660 return NULL;
1665 (*p_isr)->next = NULL;
1678 return NULL;
1693 return NULL;
1723 return NULL;
1739 return NULL;
1756 return NULL;
1771 return NULL;
1788 return NULL;
1800 return NULL;
1835 if (sp == NULL)
1836 panic("key_sp2msg: NULL pointer was passed.\n");
1844 return NULL;
1848 m->m_next = NULL;
1864 for (isr = sp->req; isr != NULL; isr = isr->next) {
1896 struct mbuf *result = NULL, *n;
1899 if (m == NULL || mhp == NULL)
1907 if (idx == SADB_EXT_RESERVED && mhp->msg == NULL)
1910 (mhp->ext[idx] == NULL || mhp->extlen[idx] == 0))
1923 n->m_next = NULL;
1940 if (n == NULL)
1959 return NULL;
1986 struct sadb_lifetime *lft = NULL;
1995 if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL)
1996 panic("key_spdadd: NULL pointer is passed.\n");
1998 if (mhp->ext[SADB_EXT_ADDRESS_SRC] == NULL ||
1999 mhp->ext[SADB_EXT_ADDRESS_DST] == NULL ||
2000 mhp->ext[SADB_X_EXT_POLICY] == NULL) {
2010 if (mhp->ext[SADB_EXT_LIFETIME_HARD] != NULL) {
2074 if (newsp != NULL) {
2083 if ((newsp = key_msg2sp(xpl0, PFKEY_EXTLEN(xpl0), &error)) == NULL) {
2176 if ((spacq = key_getspacq(&spidx)) != NULL) {
2216 if (mpolicy == NULL) {
2250 if ((sp = key_getspbyid(newid)) == NULL)
2290 if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL)
2291 panic("key_spddelete: NULL pointer is passed.\n");
2293 if (mhp->ext[SADB_EXT_ADDRESS_SRC] == NULL ||
2294 mhp->ext[SADB_EXT_ADDRESS_DST] == NULL ||
2295 mhp->ext[SADB_X_EXT_POLICY] == NULL) {
2332 if ((sp = key_getsp(&spidx)) == NULL) {
2390 if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL)
2391 panic("key_spddelete2: NULL pointer is passed.\n");
2393 if (mhp->ext[SADB_X_EXT_POLICY] == NULL ||
2404 if ((sp = key_getspbyid(id)) == NULL) {
2429 n = NULL;
2436 n->m_next = NULL;
2492 if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL)
2493 panic("key_spdget: NULL pointer is passed.\n");
2495 if (mhp->ext[SADB_X_EXT_POLICY] == NULL ||
2505 if ((sp = key_getspbyid(id)) == NULL) {
2512 if (n != NULL) {
2538 struct mbuf *result = NULL, *m;
2545 if (sp == NULL)
2546 panic("key_spdacquire: NULL pointer is passed.\n");
2547 if (sp->req != NULL)
2554 if ((newspacq = key_getspacq(&sp->spidx)) != NULL) {
2566 if ((newspacq = key_newspacq(&sp->spidx)) == NULL) {
2589 return key_sendup_mbuf(NULL, m, KEY_SENDUP_REGISTERED);
2620 if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL)
2621 panic("key_spdflush: NULL pointer is passed.\n");
2641 m->m_next = NULL;
2668 struct secpolicy *sp, **spbuf = NULL, **sp_ptr;
2675 if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL)
2676 panic("key_spddump: NULL pointer is passed.\n");
2684 if (spbuf == NULL) {
2740 struct mbuf *result = NULL, *m;
2771 if (result == NULL)
2786 return NULL;
2809 for (isr = sp->req; isr != NULL; isr = isr->next) {
2834 struct mbuf *result = NULL, *m;
2842 if (sp == NULL)
2843 panic("key_spdexpire: NULL pointer is passed.\n");
2914 if (result == NULL) {
2927 return key_sendup_mbuf(NULL, result, KEY_SENDUP_REGISTERED);
2938 * OUT: NULL : failure due to the lack of memory.
2948 if (saidx == NULL)
2949 panic("key_newsaidx: NULL pointer is passed.\n");
2952 if (newsah == NULL)
2953 return NULL;
3000 if (sah == NULL)
3001 panic("key_delsah: NULL pointer is passed.\n");
3010 sav != NULL;
3027 sav->sah = NULL;
3028 sav = NULL;
3038 sah->sa_route.ro_rt = (struct rtentry *)NULL;
3057 * OUT: NULL : fail
3075 if (m == NULL || mhp == NULL || mhp->msg == NULL || sah == NULL)
3076 panic("key_newsa: NULL pointer is passed.\n");
3079 if (newsav == NULL) {
3083 if (newsav == NULL) {
3086 return NULL;
3107 if (mhp->ext[SADB_EXT_SA] == NULL) {
3111 return NULL;
3120 return NULL;
3130 return NULL;
3165 if (sav == NULL)
3166 panic("key_delsav: NULL pointer is passed.\n");
3179 if (sav->key_auth != NULL) {
3182 sav->key_auth = NULL;
3184 if (sav->key_enc != NULL) {
3187 sav->key_enc = NULL;
3192 sav->sched = NULL;
3194 if (sav->replay != NULL) {
3196 sav->replay = NULL;
3198 if (sav->lft_c != NULL) {
3200 sav->lft_c = NULL;
3202 if (sav->lft_h != NULL) {
3204 sav->lft_h = NULL;
3206 if (sav->lft_s != NULL) {
3208 sav->lft_s = NULL;
3210 if (sav->iv != NULL) {
3212 sav->iv = NULL;
3223 * NULL : not found
3241 return NULL;
3248 * NULL : not found
3264 return NULL;
3281 return NULL;
3300 * NULL : not found
3312 match = NULL;
3355 if (m == NULL || mhp == NULL || mhp->msg == NULL)
3356 panic("key_setsaval: NULL pointer is passed.\n");
3359 sav->replay = NULL;
3360 sav->key_auth = NULL;
3361 sav->key_enc = NULL;
3362 sav->sched = NULL;
3364 sav->iv = NULL;
3365 sav->lft_c = NULL;
3366 sav->lft_h = NULL;
3367 sav->lft_s = NULL;
3373 if (mhp->ext[SADB_EXT_SA] != NULL) {
3414 if (sav->replay == NULL) {
3423 if (mhp->ext[SADB_EXT_KEY_AUTH] != NULL) {
3454 if (sav->key_auth == NULL) {
3462 if (mhp->ext[SADB_EXT_KEY_ENCRYPT] != NULL) {
3484 if (sav->key_enc == NULL) {
3493 sav->key_enc = NULL; /*just in case*/
3549 if (sav->lft_c == NULL) {
3554 if (sav->lft_c == NULL) {
3576 if (lft0 != NULL) {
3584 if (sav->lft_h == NULL) {
3593 if (lft0 != NULL) {
3601 if (sav->lft_s == NULL) {
3614 if (sav->replay != NULL) {
3616 sav->replay = NULL;
3618 if (sav->key_auth != NULL) {
3621 sav->key_auth = NULL;
3623 if (sav->key_enc != NULL) {
3626 sav->key_enc = NULL;
3631 sav->sched = NULL;
3633 if (sav->iv != NULL) {
3635 sav->iv = NULL;
3637 if (sav->lft_c != NULL) {
3639 sav->lft_c = NULL;
3641 if (sav->lft_h != NULL) {
3643 sav->lft_h = NULL;
3645 if (sav->lft_s != NULL) {
3647 sav->lft_s = NULL;
3841 struct mbuf *result = NULL, *tres = NULL, *m;
3855 if (m == NULL)
3860 m = NULL;
3861 p = NULL;
3962 if (result == NULL)
3978 return NULL;
3998 return NULL;
4004 m = NULL;
4008 return NULL;
4010 m->m_next = NULL;
4043 return NULL;
4052 p->sadb_sa_replay = (sav->replay != NULL ? sav->replay->wsize : 0);
4081 return NULL;
4132 return NULL;
4169 return NULL;
4204 return NULL;
4232 if (new == NULL) {
4236 if (new == NULL) {
4238 return NULL;
4260 if (sa == NULL)
4261 panic("key_ismyaddr: NULL pointer is passed.\n");
4321 in6m = NULL;
4356 if (saidx0 == NULL && saidx1 == NULL)
4359 if (saidx0 == NULL || saidx1 == NULL)
4418 if (spidx0 == NULL && spidx1 == NULL)
4421 if (spidx0 == NULL || spidx1 == NULL)
4455 if (spidx0 == NULL && spidx1 == NULL)
4458 if (spidx0 == NULL || spidx1 == NULL)
4614 if (p1 == NULL || p2 == NULL)
4645 struct secpolicy **spbuf = NULL, **spptr = NULL;
4646 struct secasvar **savexbuf = NULL, **savexptr = NULL;
4647 struct secasvar **savkabuf = NULL, **savkaptr = NULL;
4677 sp != NULL;
4713 sah != NULL;
4726 if (LIST_FIRST(&sah->savtree[SADB_SASTATE_LARVAL]) == NULL &&
4727 LIST_FIRST(&sah->savtree[SADB_SASTATE_MATURE]) == NULL &&
4728 LIST_FIRST(&sah->savtree[SADB_SASTATE_DYING]) == NULL &&
4729 LIST_FIRST(&sah->savtree[SADB_SASTATE_DEAD]) == NULL) {
4737 sav != NULL;
4775 sav != NULL;
4783 if (sav->lft_s == NULL)
4787 if (sav->lft_c == NULL) {
4804 sav = NULL;
4838 sav != NULL;
4846 if (sav->lft_h == NULL)
4850 if (sav->lft_c == NULL) {
4860 sav = NULL;
4864 && sav->lft_s != NULL
4887 sav = NULL;
4893 sav != NULL;
4951 acq != NULL;
4970 acq != NULL;
5157 * OUT: NULL if fail.
5179 if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL)
5180 panic("key_getspi: NULL pointer is passed.\n");
5182 if (mhp->ext[SADB_EXT_ADDRESS_SRC] == NULL ||
5183 mhp->ext[SADB_EXT_ADDRESS_DST] == NULL) {
5192 if (mhp->ext[SADB_X_EXT_SA2] != NULL) {
5257 if ((newsah = key_getsah(&saidx)) == NULL) {
5259 if ((newsah = key_newsah(&saidx)) == NULL) {
5269 if (newsav == NULL) {
5282 if ((acq = key_getacqbyseq(mhp->msg->sadb_msg_seq)) != NULL) {
5311 n = NULL;
5318 n->m_next = NULL;
5345 if (n == NULL)
5382 if (spirange != NULL) {
5402 if (key_checkspidup(saidx, keymin) != NULL) {
5424 if (key_checkspidup(saidx, newspi) == NULL)
5473 if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL)
5474 panic("key_update: NULL pointer is passed.\n");
5482 if (mhp->ext[SADB_EXT_SA] == NULL ||
5483 mhp->ext[SADB_EXT_ADDRESS_SRC] == NULL ||
5484 mhp->ext[SADB_EXT_ADDRESS_DST] == NULL ||
5486 mhp->ext[SADB_EXT_KEY_ENCRYPT] == NULL) ||
5488 mhp->ext[SADB_EXT_KEY_AUTH] == NULL) ||
5489 (mhp->ext[SADB_EXT_LIFETIME_HARD] != NULL &&
5490 mhp->ext[SADB_EXT_LIFETIME_SOFT] == NULL) ||
5491 (mhp->ext[SADB_EXT_LIFETIME_HARD] == NULL &&
5492 mhp->ext[SADB_EXT_LIFETIME_SOFT] != NULL)) {
5502 if (mhp->ext[SADB_X_EXT_SA2] != NULL) {
5521 if ((sah = key_getsah(&saidx)) == NULL) {
5538 && (sav = key_getsavbyseq(sah, mhp->msg->sadb_msg_seq)) == NULL) {
5546 if ((sav = key_getsavbyspi(sah, sa0->sadb_sa_spi)) == NULL) {
5612 if (n == NULL) {
5626 * NULL : not found
5657 return NULL;
5695 if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL)
5696 panic("key_add: NULL pointer is passed.\n");
5704 if (mhp->ext[SADB_EXT_SA] == NULL ||
5705 mhp->ext[SADB_EXT_ADDRESS_SRC] == NULL ||
5706 mhp->ext[SADB_EXT_ADDRESS_DST] == NULL ||
5708 mhp->ext[SADB_EXT_KEY_ENCRYPT] == NULL) ||
5710 mhp->ext[SADB_EXT_KEY_AUTH] == NULL) ||
5711 (mhp->ext[SADB_EXT_LIFETIME_HARD] != NULL &&
5712 mhp->ext[SADB_EXT_LIFETIME_SOFT] == NULL) ||
5713 (mhp->ext[SADB_EXT_LIFETIME_HARD] == NULL &&
5714 mhp->ext[SADB_EXT_LIFETIME_SOFT] != NULL)) {
5725 if (mhp->ext[SADB_X_EXT_SA2] != NULL) {
5743 if ((newsah = key_getsah(&saidx)) == NULL) {
5745 if ((newsah = key_newsah(&saidx)) == NULL) {
5768 if (newsav == NULL) {
5801 if (n == NULL) {
5824 if (sah == NULL || m == NULL || mhp == NULL || mhp->msg == NULL)
5825 panic("key_setident: NULL pointer is passed.\n");
5828 if (mhp->ext[SADB_EXT_IDENTITY_SRC] == NULL &&
5829 mhp->ext[SADB_EXT_IDENTITY_DST] == NULL) {
5830 sah->idents = NULL;
5831 sah->identd = NULL;
5835 if (mhp->ext[SADB_EXT_IDENTITY_SRC] == NULL ||
5836 mhp->ext[SADB_EXT_IDENTITY_DST] == NULL) {
5858 sah->idents = NULL;
5859 sah->identd = NULL;
5865 if (sah->idents == NULL) {
5869 if (sah->idents == NULL) {
5875 if (sah->identd == NULL) {
5879 if (sah->identd == NULL) {
5881 sah->idents = NULL;
5909 if (m == NULL || mhp == NULL || mhp->msg == NULL)
5910 panic("key_getmsgbuf_x1: NULL pointer is passed.\n");
5915 return NULL;
5919 if (n == NULL)
5920 return NULL;
5953 struct secasvar *sav = NULL;
5959 if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL)
5960 panic("key_delete: NULL pointer is passed.\n");
5968 if (mhp->ext[SADB_EXT_ADDRESS_SRC] == NULL ||
5969 mhp->ext[SADB_EXT_ADDRESS_DST] == NULL) {
5982 if (mhp->ext[SADB_EXT_SA] == NULL) {
6016 if (sah == NULL) {
6026 sav = NULL;
6041 if (n == NULL)
6091 sav != NULL; sav = nextsav) {
6122 if (n == NULL)
6156 struct secasvar *sav = NULL;
6162 if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL)
6163 panic("key_get: NULL pointer is passed.\n");
6171 if (mhp->ext[SADB_EXT_SA] == NULL ||
6172 mhp->ext[SADB_EXT_ADDRESS_SRC] == NULL ||
6173 mhp->ext[SADB_EXT_ADDRESS_DST] == NULL) {
6205 if (sah == NULL) {
6263 struct mbuf *result = NULL, *m, *n;
6269 m = NULL;
6293 m->m_next = NULL;
6333 return NULL;
6350 m = NULL;
6377 m->m_next = NULL;
6382 return NULL;
6408 m = NULL;
6423 m->m_next = NULL;
6428 return NULL;
6467 return NULL;
6471 return NULL;
6474 return NULL;
6514 struct mbuf *result = NULL, *m;
6525 if (saidx == NULL)
6526 panic("key_acquire: NULL pointer is passed.\n");
6539 if ((newacq = key_getacq(saidx)) != NULL) {
6551 if ((newacq = key_newacq(saidx)) == NULL) {
6672 if (result == NULL) {
6685 return key_sendup_mbuf(NULL, result, KEY_SENDUP_REGISTERED);
6703 if (newacq == NULL) {
6707 if (newacq == NULL) {
6709 return NULL;
6737 return NULL;
6753 return NULL;
6766 if (acq == NULL) {
6770 if (acq == NULL) {
6772 return NULL;
6799 return NULL;
6830 if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL)
6831 panic("key_acquire2: NULL pointer is passed.\n");
6854 if ((acq = key_getacqbyseq(mhp->msg->sadb_msg_seq)) == NULL) {
6885 if (mhp->ext[SADB_EXT_ADDRESS_SRC] == NULL ||
6886 mhp->ext[SADB_EXT_ADDRESS_DST] == NULL ||
6887 mhp->ext[SADB_EXT_PROPOSAL] == NULL) {
6915 if (sah != NULL) {
6921 error = key_acquire(&saidx, NULL);
6953 if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL)
6954 panic("key_register: NULL pointer is passed.\n");
6966 if (newreg == NULL) {
7029 n = NULL;
7036 n->m_next = NULL;
7085 * give NULL to get the value preferred by
7089 (*ealgo->ivlen)(ealgo, NULL);
7121 if (so == NULL)
7122 panic("key_freereg: NULL pointer is passed.\n");
7159 struct mbuf *result = NULL, *m;
7167 if (sav == NULL)
7168 panic("key_expire: NULL pointer is passed.\n");
7169 if (sav->sah == NULL)
7170 panic("key_expire: Why was SA index in SA NULL.\n");
7248 if (result == NULL) {
7261 return key_sendup_mbuf(NULL, result, KEY_SENDUP_REGISTERED);
7295 if (so == NULL || mhp == NULL || mhp->msg == NULL)
7296 panic("key_flush: NULL pointer is passed.\n");
7308 sah != NULL;
7321 sav != NULL;
7343 m->m_next = NULL;
7378 struct sav_dump_elem *savbuf = NULL, *elem_ptr;
7390 if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL)
7391 panic("key_dump: NULL pointer is passed.\n");
7405 if (savbuf == NULL) {
7498 if (so == NULL || m == NULL || mhp == NULL || mhp->msg == NULL)
7499 panic("key_promisc: NULL pointer is passed.\n");
7515 if ((kp = (struct keycb *)sotorawcb(so)) == NULL)
7544 NULL, /* SADB_RESERVED */
7552 NULL, /* SADB_EXPIRE */
7556 NULL, /* SADB_X_PCHANGE */
7561 NULL, /* SADB_X_SPDACQUIRE */
7565 NULL, /* SADB_X_SPDEXPIRE */
7594 if (m == NULL || so == NULL)
7595 panic("key_parse: NULL pointer is passed.\n");
7650 n = NULL;
7659 n->m_next = NULL;
7735 if (mh.ext[SADB_EXT_ADDRESS_SRC] != NULL
7736 && mh.ext[SADB_EXT_ADDRESS_DST] != NULL) {
7822 key_typesw[msg->sadb_msg_type] == NULL) {
7870 if (m == NULL || mhp == NULL)
7871 panic("key_align: NULL pointer is passed.\n");
7916 if (mhp->ext[ext->sadb_ext_type] != NULL) {
8087 if (sav->sah == NULL)
8088 panic("sav->sah == NULL at key_checktunnelsanity");
8104 panic("key_sa_recordxfer called with sav == NULL");
8106 panic("key_sa_recordxfer called with m == NULL");
8162 ro->ro_rt = (struct rtentry *)NULL;
8176 if (sav == NULL)
8177 panic("key_sa_chgstate called with sav == NULL");
8198 panic("key_sa_stir_iv called with sav == NULL");
8208 struct mbuf *m = NULL, *n;
8218 return NULL;
8221 n->m_next = NULL;
8369 ipsecif_attach_proto, NULL)) != 0) {
8378 ipsecif_attach_proto, NULL)) != 0) {
8403 if (pcb == NULL)
8442 result = ifnet_attach(pcb->ifp, NULL);
8555 socket_t pf_socket = NULL;
8556 ifaddr_t *addresses = NULL;
8565 result = sock_socket(protocol, SOCK_DGRAM, 0, NULL, NULL, &pf_socket);
8600 addresses = NULL;
8611 if (pf_socket != NULL)
8614 if (addresses != NULL)
8628 pcb->ctlref = NULL;
8677 hack_hdr.mh_nextpkt = NULL;
8767 while (data != NULL && mbuf_len(data) < 1) {
8771 if (data != NULL) {