Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/cxgbe/tom/t4_listen.c
Show First 20 Lines • Show All 1,107 Lines • ▼ Show 20 Lines | if (inc->inc_flags & INC_ISIPV6) { | ||||||||||||
dst->sa_family = AF_INET; | dst->sa_family = AF_INET; | ||||||||||||
nh = fib4_lookup(RT_DEFAULT_FIB, inc->inc_faddr, 0, NHR_NONE, 0); | nh = fib4_lookup(RT_DEFAULT_FIB, inc->inc_faddr, 0, NHR_NONE, 0); | ||||||||||||
if (nh == NULL) | if (nh == NULL) | ||||||||||||
return (NULL); | return (NULL); | ||||||||||||
if (nh->nh_ifp != ifp) | if (nh->nh_ifp != ifp) | ||||||||||||
return (NULL); | return (NULL); | ||||||||||||
if (nh->nh_flags & NHF_GATEWAY) | if (nh->nh_flags & NHF_GATEWAY) | ||||||||||||
if (nh->gw_sa.sa_family == AF_INET) | |||||||||||||
((struct sockaddr_in *)dst)->sin_addr = nh->gw4_sa.sin_addr; | ((struct sockaddr_in *)dst)->sin_addr = nh->gw4_sa.sin_addr; | ||||||||||||
else { | |||||||||||||
bzero(dst, sizeof(struct sockaddr_in6)); | |||||||||||||
dst->sa_len = sizeof(struct sockaddr_in6); | |||||||||||||
dst->sa_family = AF_INET6; | |||||||||||||
((struct sockaddr_in6 *)dst)->sin6_addr = nh->gw6_sa.sin6_addr; | |||||||||||||
melifaroUnsubmitted Done Inline Actions
melifaro: | |||||||||||||
} | |||||||||||||
else | else | ||||||||||||
((struct sockaddr_in *)dst)->sin_addr = inc->inc_faddr; | ((struct sockaddr_in *)dst)->sin_addr = inc->inc_faddr; | ||||||||||||
} | } | ||||||||||||
e = t4_l2t_get(pi, ifp, dst); | e = t4_l2t_get(pi, ifp, dst); | ||||||||||||
return (e); | return (e); | ||||||||||||
} | } | ||||||||||||
▲ Show 20 Lines • Show All 477 Lines • Show Last 20 Lines |