From: David Härdeman Date: Mon, 17 Nov 2025 22:11:08 +0000 (+0100) Subject: odhcpd: rename union if_addr -> in46_addr X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=407789e5f307d1e84b5e5a89b6da1e27fb6662c2;p=project%2Fodhcpd.git odhcpd: rename union if_addr -> in46_addr 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 Link: https://github.com/openwrt/odhcpd/pull/320 Signed-off-by: Álvaro Fernández Rojas --- diff --git a/src/odhcpd.h b/src/odhcpd.h index 0bf9196..b706831 100644 --- a/src/odhcpd.h +++ b/src/odhcpd.h @@ -115,7 +115,7 @@ typedef ssize_t (*send_reply_cb_t)(struct iovec *iov, size_t iov_len, struct sockaddr *dest, socklen_t dest_len, void *opaque); -union if_addr { +union in46_addr { struct in_addr in; struct in6_addr in6; }; @@ -124,12 +124,12 @@ struct netevent_handler_info { 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; @@ -137,7 +137,7 @@ struct netevent_handler_info { struct odhcpd_ipaddr *addrs; size_t len; } addrs_old; - union if_addr addr; + union in46_addr addr; }; }; @@ -161,7 +161,7 @@ struct netevent_handler { }; struct odhcpd_ipaddr { - union if_addr addr; + union in46_addr addr; uint8_t prefix; uint32_t preferred_lt; uint32_t valid_lt;