summaryrefslogtreecommitdiff
path: root/sysdep/unix/krt.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2013-11-25 01:21:39 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2013-11-25 01:21:39 +0100
commite237b28a4d4b17ab50182ac110f28594967e76dc (patch)
tree6ddd5c6b7138ed0bd60a925859d76005f21447e6 /sysdep/unix/krt.c
parent5ebc92935cb58c78286d91f0831de94cd4ae0f9e (diff)
Changes primary addr selection on BSD to respect SIOCGIFADDR ioctl() result.
Thanks to Alexander V. Chernikov for the original patch.
Diffstat (limited to 'sysdep/unix/krt.c')
-rw-r--r--sysdep/unix/krt.c3
1 files changed, 3 insertions, 0 deletions
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);
}