From: David Binderman Date: Thu, 4 May 2017 07:52:41 +0000 (+0100) Subject: Fix test for preferring a fake lease vs a real one. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23c2a5000d18e77732ef5ad83291db815b4e0db6;p=thirdparty%2Fdhcpcd.git Fix test for preferring a fake lease vs a real one. --- diff --git a/src/ipv4.c b/src/ipv4.c index 50c52426..224e8abf 100644 --- a/src/ipv4.c +++ b/src/ipv4.c @@ -229,9 +229,9 @@ ipv4_ifcmp(const struct interface *si, const struct interface *ti) if (!sis->new && tis->new) return 1; /* Always prefer proper leases */ - if (!(sis->added & STATE_FAKE) && (sis->added & STATE_FAKE)) + if (!(sis->added & STATE_FAKE) && (tis->added & STATE_FAKE)) return -1; - if ((sis->added & STATE_FAKE) && !(sis->added & STATE_FAKE)) + if ((sis->added & STATE_FAKE) && !(tis->added & STATE_FAKE)) return 1; /* If we are either, they neither have a lease, or they both have. * We need to check for IPv4LL and make it non-preferred. */