summaryrefslogtreecommitdiffstats
path: root/sys/net/route.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2009-06-22 10:59:34 +0000
committerrwatson <rwatson@FreeBSD.org>2009-06-22 10:59:34 +0000
commit3c02410d55d9cfe0cb4dcbfad5eef376463d8e08 (patch)
tree45a4f946feeb75c5ed5e8dcc028809c6966e1ba1 /sys/net/route.c
parent0b01d8c2101aa4512c45bd77f2c3fee5137b4595 (diff)
downloadFreeBSD-src-3c02410d55d9cfe0cb4dcbfad5eef376463d8e08.zip
FreeBSD-src-3c02410d55d9cfe0cb4dcbfad5eef376463d8e08.tar.gz
Add a new function, ifa_ifwithaddr_check(), which rather than returning
a pointer to an ifaddr matching the passed socket address, returns a boolean indicating whether one was present. In the (near) future, ifa_ifwithaddr() will return a referenced ifaddr rather than a raw ifaddr pointer, and the new wrapper will allow callers that care only about the boolean condition to avoid having to free that reference. MFC after: 3 weeks
Diffstat (limited to 'sys/net/route.c')
-rw-r--r--sys/net/route.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index 1705e98..2ebdeaa 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -547,7 +547,7 @@ rtredirect_fib(struct sockaddr *dst,
if (!(flags & RTF_DONE) && rt &&
(!sa_equal(src, rt->rt_gateway) || rt->rt_ifa != ifa))
error = EINVAL;
- else if (ifa_ifwithaddr(gateway))
+ else if (ifa_ifwithaddr_check(gateway))
error = EHOSTUNREACH;
if (error)
goto done;
OpenPOWER on IntegriCloud