Redesign struct hostapd_ip_addr to be of fixed size
authorJouni Malinen <j@w1.fi>
Thu, 24 Dec 2009 10:26:47 +0000 (12:26 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 24 Dec 2009 10:26:47 +0000 (12:26 +0200)
This structure is embedded in some other structures and as such, it
would be nicer if this would not change its length based on build
options.

src/utils/ip_addr.h

index 192049a..28ccaef 100644 (file)
 #define IP_ADDR_H
 
 struct hostapd_ip_addr {
+       int af; /* AF_INET / AF_INET6 */
        union {
                struct in_addr v4;
 #ifdef CONFIG_IPV6
                struct in6_addr v6;
 #endif /* CONFIG_IPV6 */
+               u8 max_len[16];
        } u;
-       int af; /* AF_INET / AF_INET6 */
 };
 
 const char * hostapd_ip_txt(const struct hostapd_ip_addr *addr, char *buf,