Page MenuHomeFreeBSD

D49353.id152248.diff
No OneTemporary

D49353.id152248.diff

diff --git a/sys/netinet/in_fib.c b/sys/netinet/in_fib.c
--- a/sys/netinet/in_fib.c
+++ b/sys/netinet/in_fib.c
@@ -119,8 +119,7 @@
nh = dp->f(dp->arg, key, scopeid);
if (nh != NULL) {
nh = nhop_select(nh, flowid);
- /* Ensure route & ifp is UP */
- if (RT_LINK_IS_UP(nh->nh_ifp)) {
+ if (NH_IS_VALID(nh)) {
if (flags & NHR_REF)
nhop_ref_object(nh);
return (nh);
@@ -156,8 +155,7 @@
rn = rh->rnh_matchaddr((void *)&sin4, &rh->head);
if (rn != NULL && ((rn->rn_flags & RNF_ROOT) == 0)) {
nh = nhop_select((RNTORT(rn))->rt_nhop, flowid);
- /* Ensure route & ifp is UP */
- if (RT_LINK_IS_UP(nh->nh_ifp)) {
+ if (NH_IS_VALID(nh)) {
if (flags & NHR_REF)
nhop_ref_object(nh);
RIB_RUNLOCK(rh);
@@ -322,8 +320,7 @@
rt = fib4_lookup_rt(fibnum, dst, scopeid, NHR_UNLOCKED, &rnd);
if (rt != NULL) {
struct nhop_object *nh = nhop_select(rnd.rnd_nhop, 0);
- /* Ensure route & ifp is UP */
- if (RT_LINK_IS_UP(nh->nh_ifp))
+ if (NH_IS_VALID(nh))
return (nh);
}
diff --git a/sys/netinet6/in6_fib.c b/sys/netinet6/in6_fib.c
--- a/sys/netinet6/in6_fib.c
+++ b/sys/netinet6/in6_fib.c
@@ -127,8 +127,7 @@
nh = dp->f(dp->arg, key, scopeid);
if (nh != NULL) {
nh = nhop_select(nh, flowid);
- /* Ensure route & ifp is UP */
- if (RT_LINK_IS_UP(nh->nh_ifp)) {
+ if (NH_IS_VALID(nh)) {
if (flags & NHR_REF)
nhop_ref_object(nh);
return (nh);
@@ -165,8 +164,7 @@
rn = rh->rnh_matchaddr((void *)&sin6, &rh->head);
if (rn != NULL && ((rn->rn_flags & RNF_ROOT) == 0)) {
nh = nhop_select((RNTORT(rn))->rt_nhop, flowid);
- /* Ensure route & ifp is UP */
- if (RT_LINK_IS_UP(nh->nh_ifp)) {
+ if (NH_IS_VALID(nh)) {
if (flags & NHR_REF)
nhop_ref_object(nh);
RIB_RUNLOCK(rh);
@@ -337,8 +335,7 @@
rt = fib6_lookup_rt(fibnum, dst6, scopeid, NHR_UNLOCKED, &rnd);
if (rt != NULL) {
struct nhop_object *nh = nhop_select(rnd.rnd_nhop, 0);
- /* Ensure route & ifp is UP */
- if (RT_LINK_IS_UP(nh->nh_ifp))
+ if (NH_IS_VALID(nh))
return (nh);
}

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 27, 4:52 AM (7 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26221408
Default Alt Text
D49353.id152248.diff (1 KB)

Event Timeline