fix endian handling of the ipv4 broadcast address
authorFelix Fietkau <nbd@openwrt.org>
Fri, 25 May 2012 07:54:13 +0000 (09:54 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 25 May 2012 07:54:13 +0000 (09:54 +0200)
interface-ip.c

index e09a74fd932f8603ba4c4e1b034ddea3333dcf30..14feb6fa6ddcdf41b353d6cd82c0c2347c1f9701 100644 (file)
@@ -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);
                }
        }