From: Steven Barth Date: Thu, 31 Jan 2013 15:47:11 +0000 (+0100) Subject: Fix metric calculation X-Git-Tag: debian/1.1+git20160131-1~188 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=29937f316f27e9ead2f8a0d9cb419aa810fa9d02;p=odhcp6c.git Fix metric calculation --- diff --git a/src/ra.c b/src/ra.c index 597de58..2149a66 100644 --- a/src/ra.c +++ b/src/ra.c @@ -105,8 +105,8 @@ static void ra_send_rs(int signal __attribute__((unused))) static int16_t pref_to_priority(uint8_t flags) { flags = (flags >> 3) & 0x03; - return (flags == 0x00) ? 1024 : (flags == 0x01) ? 512 : - (flags == 0x11) ? 2048 : -1; + return (flags == 0x0) ? 1024 : (flags == 0x1) ? 512 : + (flags == 0x3) ? 2048 : -1; }