Anyone reading "union if_addr" might be tempted to think it's got
something to do with an interface addr (e.g. a MAC, or something). In
reality, it's an IPv4/IPv6 addr (i.e. struct in_addr or struct
in6_addr), so rename it to make things clearer.
Signed-off-by: David Härdeman <[email protected]>
Link: https://github.com/openwrt/odhcpd/pull/320
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
struct sockaddr *dest, socklen_t dest_len,
void *opaque);
-union if_addr {
+union in46_addr {
struct in_addr in;
struct in6_addr in6;
};
struct interface *iface;
union {
struct {
- union if_addr dst;
+ union in46_addr dst;
uint8_t dst_len;
- union if_addr gateway;
+ union in46_addr gateway;
} rt;
struct {
- union if_addr dst;
+ union in46_addr dst;
uint16_t state;
uint8_t flags;
} neigh;
struct odhcpd_ipaddr *addrs;
size_t len;
} addrs_old;
- union if_addr addr;
+ union in46_addr addr;
};
};
};
struct odhcpd_ipaddr {
- union if_addr addr;
+ union in46_addr addr;
uint8_t prefix;
uint32_t preferred_lt;
uint32_t valid_lt;