Lines Matching defs:gwrt
2993 struct rtentry *gwrt;
3036 if ((gwrt = rt->rt_gwroute) == NULL) {
3044 * Take gwrt's lock while holding route's lock;
3045 * this is okay since gwrt never points back
3048 RT_LOCK_SPIN(gwrt);
3049 if (!(gwrt->rt_flags & RTF_UP)) {
3051 RT_UNLOCK(gwrt);
3053 rtfree(gwrt);
3056 gwrt = rtalloc1_scoped_locked(
3067 gwrt == NULL || gwrt == rt ||
3069 if (gwrt == rt) {
3070 RT_REMREF_LOCKED(gwrt);
3071 gwrt = NULL;
3074 if (gwrt != NULL)
3075 rtfree_locked(gwrt);
3079 VERIFY(gwrt != NULL);
3081 * Set gateway route; callee adds ref to gwrt;
3082 * gwrt has an extra ref from rtalloc1() for
3085 rt_set_gwroute(rt, rt_key(rt), gwrt);
3090 rt = gwrt;
3092 RT_ADDREF_LOCKED(gwrt);
3093 RT_UNLOCK(gwrt);
3097 rt = gwrt;
3099 VERIFY(rt == gwrt);
3105 * clone (hint) holds a reference to it. rt == gwrt.
3123 /* rt == gwrt; if it is now down, give up */