aboutsummaryrefslogtreecommitdiff
path: root/sys/net/route.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/route.h')
-rw-r--r--sys/net/route.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/net/route.h b/sys/net/route.h
index 67217f237e0b..ec77d39b9649 100644
--- a/sys/net/route.h
+++ b/sys/net/route.h
@@ -394,6 +394,10 @@ struct rt_addrinfo {
} \
} while (0)
+#define RO_GET_FAMILY(ro, dst) ((ro) != NULL && \
+ (ro)->ro_flags & RT_HAS_GW \
+ ? (ro)->ro_dst.sa_family : (dst)->sa_family)
+
/*
* Validate a cached route based on a supplied cookie. If there is an
* out-of-date cache, simply free it. Update the generation number