From: Roy Marples Date: Wed, 18 Mar 2015 11:54:23 +0000 (+0000) Subject: Always prefer master interfaces X-Git-Tag: v6.8.0~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5dc8a3e0c3d389dcf3f2ac14b32e18484c378b38;p=thirdparty%2Fdhcpcd.git Always prefer master interfaces --- diff --git a/if.c b/if.c index 9b013905..e3c16eb9 100644 --- a/if.c +++ b/if.c @@ -596,6 +596,14 @@ if_cmp(const struct interface *si, const struct interface *ti) int r; #endif + /* Always prefer master interfaces */ + if (!(si->options->options & DHCPCD_PFXDLGONLY) && + ti->options->options & DHCPCD_PFXDLGONLY) + return -1; + if (si->options->options & DHCPCD_PFXDLGONLY && + !(ti->options->options & DHCPCD_PFXDLGONLY)) + return 1; + if (D_STATE_RUNNING(si) && !D_STATE_RUNNING(ti)) return -1; if (!D_STATE_RUNNING(si) && D_STATE_RUNNING(ti))