X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=system-linux.c;h=28029c1eb19011f8b7f3923c058704535bfd7250;hp=0a989b090a841565559ecb3aa7850a4abc676bb5;hb=73a32ab092ae32ec97e20b61512998c8411b8bd5;hpb=05c0ded29cf9dd7716528e61029886550ba1f7ab;ds=sidebyside diff --git a/system-linux.c b/system-linux.c index 0a989b0..28029c1 100644 --- a/system-linux.c +++ b/system-linux.c @@ -823,13 +823,8 @@ static int system_addr(struct device *dev, struct device_addr *addr, int cmd) nlmsg_append(msg, &ifa, sizeof(ifa), 0); nla_put(msg, IFA_LOCAL, alen, &addr->addr); - if (v4) { - uint32_t mask = ~0; - uint32_t *a = (uint32_t *) &addr->addr; - - mask >>= addr->mask; - nla_put_u32(msg, IFA_BROADCAST, *a | mask); - } + if (v4) + nla_put_u32(msg, IFA_BROADCAST, addr->broadcast); return system_rtnl_call(msg); }