From 407789e5f307d1e84b5e5a89b6da1e27fb6662c2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20H=C3=A4rdeman?= Date: Mon, 17 Nov 2025 23:11:08 +0100 Subject: [PATCH] odhcpd: rename union if_addr -> in46_addr MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/odhcpd.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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; -- 2.30.2