diff options
| author | David Härdeman | 2025-10-09 09:08:14 +0000 |
|---|---|---|
| committer | Álvaro Fernández Rojas | 2025-10-10 06:29:58 +0000 |
| commit | 30780debd691aee7567784daf1fdfd8db500a485 (patch) | |
| tree | abc4a7e7528a99cd2b35927a7618658f6b23c600 | |
| parent | e0b2c3cf9476b25e317b7fcfa63b7accc34f054c (diff) | |
| download | odhcpd-30780debd691aee7567784daf1fdfd8db500a485.tar.gz | |
odhcpd: fix a compilation error
odhcpd_get_interface_dns_addr() calls odhcpd_get_interface_linklocal_addr(),
the former takes a const struct interface ptr, the latter takes a non-const
struct interface ptr.
The end result is an unhappy compiler.
Signed-off-by: David Härdeman <david@hardeman.nu>
Link: https://github.com/openwrt/odhcpd/pull/272
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
| -rw-r--r-- | src/odhcpd.c | 2 | ||||
| -rw-r--r-- | src/odhcpd.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/odhcpd.c b/src/odhcpd.c index 313dae1..5116ba3 100644 --- a/src/odhcpd.c +++ b/src/odhcpd.c @@ -331,7 +331,7 @@ ssize_t odhcpd_try_send_with_src(int socket, struct sockaddr_in6 *dest, * - use an IPv6 ULA address if the already selected IPv6 address is not an ULA address * - use the IPv6 address with the longest preferred lifetime */ -int odhcpd_get_interface_dns_addr(const struct interface *iface, struct in6_addr *addr) +int odhcpd_get_interface_dns_addr(struct interface *iface, struct in6_addr *addr) { time_t now = odhcpd_time(); ssize_t m = -1; diff --git a/src/odhcpd.h b/src/odhcpd.h index e96cc35..be80646 100644 --- a/src/odhcpd.h +++ b/src/odhcpd.h @@ -491,7 +491,7 @@ ssize_t odhcpd_send(int socket, struct sockaddr_in6 *dest, ssize_t odhcpd_try_send_with_src(int socket, struct sockaddr_in6 *dest, struct iovec *iov, size_t iov_len, struct interface *iface); -int odhcpd_get_interface_dns_addr(const struct interface *iface, +int odhcpd_get_interface_dns_addr(struct interface *iface, struct in6_addr *addr); int odhcpd_get_interface_linklocal_addr(struct interface *iface, struct in6_addr *addr); |