Lines Matching refs:NULL
197 * caller provides a non-NULL ifpp. The caller is responsible for checking
207 struct ifnet *ifp = NULL;
208 struct in6_ifaddr *ia = NULL, *ia_best = NULL;
209 struct in6_pktinfo *pi = NULL;
211 struct in6_addrpolicy *dst_policy = NULL, *best_policy = NULL;
223 if (ifpp != NULL)
224 *ifpp = NULL;
226 if (inp != NULL) {
231 mopts = NULL;
251 src_storage = NULL;
266 if (ifp != NULL) {
267 *errorp = in6_setscope(&srcsock.sin6_addr, ifp, NULL);
269 src_storage = NULL;
275 if (ia6 == NULL) {
277 src_storage = NULL;
287 src_storage = NULL;
300 if (inp != NULL && !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) {
313 src_storage = NULL;
319 src_storage = NULL;
326 struct in6_addrpolicy *new_policy = NULL;
364 if (ia_best == NULL)
415 * Note that best_policy should be non-NULL here.
417 if (dst_policy == NULL)
439 in6_mask2len(&ia_best->ia_prefixmask.sin6_addr, NULL))
441 if (opts == NULL ||
507 if (ia_best != NULL)
519 if (ia_best != NULL)
527 if (ia_best != NULL &&
531 ia_best = NULL;
534 if ((ia = ia_best) == NULL) {
536 src_storage = NULL;
545 if (ifpp != NULL) {
546 /* if ifp is non-NULL, refcnt held in in6_selectif() */
548 } else if (ifp != NULL) {
565 * a non-NULL retifp. The caller is responsible for checking if the
577 struct ifnet *ifp = NULL, *ifp0 = NULL;
578 struct route_in6 *route = NULL;
580 struct in6_pktinfo *pi = NULL;
582 struct ifaddr *ifa = NULL;
602 if (retifp != NULL)
603 *retifp = NULL;
605 if (retrt != NULL)
606 *retrt = NULL;
610 src = (srcsock != NULL) ? srcsock->sin6_addr : in6addr_any;
627 select_srcif = (ip6_doscopedroute && srcsock != NULL &&
639 if (opts != NULL && (pi = opts->ip6po_pktinfo) != NULL &&
646 /* ifp may be NULL if detached or out of range */
648 ((ifscope <= if_index) ? ifindex2ifnet[ifscope] : NULL);
650 if (norouteok || retrt == NULL || IN6_IS_ADDR_MULTICAST(dst)) {
657 if (ifp == NULL)
669 if (IN6_IS_ADDR_MULTICAST(dst) && mopts != NULL) {
671 if ((ifp = ifp0 = mopts->im6o_multicast_ifp) != NULL) {
694 if (!select_srcif || (ro != NULL && ro->ro_rt != NULL &&
698 if (ro != NULL && ro->ro_rt != NULL) {
712 if (ifscope != IFSCOPE_NONE || (ro != NULL && ro->ro_rt != NULL)) {
716 rt_ifp = (ro->ro_rt != NULL) ? ro->ro_rt->rt_ifp : NULL;
742 if (ifa == NULL && ip6_forwarding && nd6_prproxy) {
745 if (ifa != NULL && !(proxied_ifa =
748 ifa = NULL;
752 if (ip6_select_srcif_debug && ifa != NULL) {
753 if (ro->ro_rt != NULL) {
776 if (ifa == NULL && ifscope == IFSCOPE_NONE) {
779 if (ip6_select_srcif_debug && ifa != NULL) {
787 if (ifa != NULL && !proxied_ifa)
794 if (opts != NULL && opts->ip6po_nexthop != NULL) {
810 if (ron->ro_rt != NULL)
812 if ((ron->ro_rt != NULL &&
816 (select_srcif && (ifa == NULL ||
820 if (ron->ro_rt != NULL) {
823 ron->ro_rt = NULL;
827 if (ron->ro_rt == NULL) {
829 if (ron->ro_rt != NULL)
831 if (ron->ro_rt == NULL ||
835 if (ron->ro_rt != NULL) {
838 ron->ro_rt = NULL;
868 if (ro == NULL)
870 if (ro->ro_rt != NULL)
872 if (ro->ro_rt != NULL && (!(ro->ro_rt->rt_flags & RTF_UP) ||
876 (select_srcif && (ifa == NULL ||
880 ro->ro_rt = NULL;
882 if (ro->ro_rt == NULL) {
885 if (ro->ro_rt != NULL)
899 if (ro->ro_rt != NULL)
907 if (opts != NULL && opts->ip6po_nexthop != NULL) {
908 if (ro->ro_rt != NULL)
913 if (ro->ro_rt != NULL) {
923 boolean_t has_route = (route != NULL && route->ro_rt != NULL);
934 if (has_route && (ifa == NULL ||
943 if (ifa != NULL && proxied_ifa &&
949 if (ifa != NULL) {
965 route->ro_rt = NULL;
969 route = NULL;
970 ifp = NULL; /* ditch ifp; keep ifp0 */
984 if (ro->ro_rt != NULL)
986 if (ifp != NULL && opts != NULL &&
987 opts->ip6po_pktinfo != NULL &&
1007 ((ifp != NULL && ifp->if_type == IFT_CELLULAR) ||
1008 (route != NULL && route->ro_rt != NULL &&
1010 if (route != NULL && route->ro_rt != NULL) {
1012 route->ro_rt = NULL;
1014 route = NULL;
1016 ifp = NULL; /* ditch ifp; keep ifp0 */
1021 if (ifp == NULL && (route == NULL || route->ro_rt == NULL)) {
1034 * releasing the ifp if it is non-NULL.
1037 if (retifp != NULL) {
1038 if (ifp != NULL)
1044 if (retrt != NULL && route != NULL)
1045 *retrt = route->ro_rt; /* ro_rt may be NULL */
1049 (ifa != NULL) ? if_name(ifa->ifa_ifp) : "NONE",
1050 (ifp != NULL) ? if_name(ifp) : "NONE", error);
1053 if (ifa != NULL)
1061 * caller provides a non-NULL retifp. The caller is responsible for checking
1071 struct rtentry *rt = NULL;
1073 if (ro == NULL) {
1078 if ((err = selectroute(NULL, dstsock, opts, mopts, ro, retifp,
1111 if (rt != NULL && rt->rt_ifa != NULL && rt->rt_ifa->ifa_ifp != NULL &&
1112 retifp != NULL) {
1114 if (*retifp != NULL)
1125 * caller is responsible for releasing it if non-NULL.
1132 * caller provides a non-NULL retifp. The caller is responsible for checking
1255 inp->in6p_last_outifp = NULL;
1279 inp->in6p_last_outifp = NULL;
1296 inp->in6p_last_outifp = NULL;
1435 struct in6_addrpolicy *match = NULL;
1440 if (match == NULL)
1453 struct in6_addrpolicy *bestpol = NULL, *pol;
1480 if (bestpol == NULL ||
1543 if (pol == NULL) {
1550 pol = NULL;
1624 if (in6_mask2len(&ent0.addrmask.sin6_addr, NULL) < 0)
1674 struct ifnet *ifp = NULL;
1676 struct ip6_pktopts *optp = NULL;
1680 if (ifpp != NULL)
1681 *ifpp = NULL;
1695 struct ifnet *im6o_multicast_ifp = NULL;
1697 if (in6p != NULL && IN6_IS_ADDR_MULTICAST(in6) &&
1698 in6p->in6p_moptions != NULL) {
1718 in6p->in6p_moptions != NULL && im6o_multicast_ifp != NULL) {
1737 if (ifpp != NULL) {
1738 if (ifp != NULL)