From e237b28a4d4b17ab50182ac110f28594967e76dc Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Mon, 25 Nov 2013 01:21:39 +0100 Subject: Changes primary addr selection on BSD to respect SIOCGIFADDR ioctl() result. Thanks to Alexander V. Chernikov for the original patch. --- sysdep/unix/krt.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sysdep/unix/krt.c') diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c index 57cfe5a4..8f24cf51 100644 --- a/sysdep/unix/krt.c +++ b/sysdep/unix/krt.c @@ -159,6 +159,9 @@ kif_choose_primary(struct iface *i) return a; } + if (a = kif_get_primary_ip(i)) + return a; + return find_preferred_ifa(i, IPA_NONE, IPA_NONE); } -- cgit v1.2.3