diff options
Diffstat (limited to 'source4/lib/netif')
-rw-r--r-- | source4/lib/netif/interface.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source4/lib/netif/interface.c b/source4/lib/netif/interface.c index 80041d5350..670913ab6f 100644 --- a/source4/lib/netif/interface.c +++ b/source4/lib/netif/interface.c @@ -353,3 +353,16 @@ const char *iface_best_ip(const char *dest) } return iface_n_ip(0); } + +/* + return True if an IP is one one of our local networks +*/ +BOOL iface_is_local(const char *dest) +{ + struct in_addr ip; + ip.s_addr = interpret_addr(dest); + if (iface_find(ip, True)) { + return True; + } + return False; +} |