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 e09a74f..14feb6f 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);
                }
        }