From: Felix Fietkau Date: Fri, 25 May 2012 07:54:13 +0000 (+0200) Subject: fix endian handling of the ipv4 broadcast address X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8758677c03d3c94d3fd81c8e44b3a7307b693e9c;p=oweals%2Fnetifd.git fix endian handling of the ipv4 broadcast address --- diff --git a/interface-ip.c b/interface-ip.c index e09a74f..14feb6f 100644 --- a/interface-ip.c +++ b/interface-ip.c @@ -301,7 +301,7 @@ interface_update_proto_addr(struct vlist_tree *tree, uint32_t *a = (uint32_t *) &a_new->addr; mask >>= a_new->mask; - a_new->broadcast = *a | mask; + a_new->broadcast = *a | htonl(mask); } }