From 3563257247c9444f1b1489fb9f4faba3dc50959e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 1 Jul 2002 05:39:32 +0000 Subject: bias the lookup sorting towards directly reachable IPs (This used to be commit 514b91827a970a0041314af341b8c66a01668e4a) --- source3/lib/interface.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source3/lib') diff --git a/source3/lib/interface.c b/source3/lib/interface.c index 85c49789c4..2704397fb2 100644 --- a/source3/lib/interface.c +++ b/source3/lib/interface.c @@ -355,3 +355,11 @@ struct in_addr *iface_ip(struct in_addr ip) struct interface *i = iface_find(ip, True); return(i ? &i->ip : &local_interfaces->ip); } + +/* + return True if a IP is directly reachable on one of our interfaces +*/ +BOOL iface_local(struct in_addr ip) +{ + return iface_find(ip, True) ? True : False; +} -- cgit