projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06419e9
)
rpcd-mod-luci: let IPv4 hostnames take precedence over IPv6 ones
author
Jo-Philipp Wich
<
[email protected]
>
Wed, 22 Sep 2021 07:41:12 +0000
(09:41 +0200)
committer
Jo-Philipp Wich
<
[email protected]
>
Tue, 12 Oct 2021 21:03:41 +0000
(23:03 +0200)
Do not overwrite IPv4-resolved hostnames with IPv6 ones in case both are
available or resolvable.
Signed-off-by: Jo-Philipp Wich <
[email protected]
>
(cherry picked from commit
93bd93e220714276eff95ea51793bb2f826328e8
)
libs/rpcd-mod-luci/src/luci.c
patch
|
blob
|
history
diff --git
a/libs/rpcd-mod-luci/src/luci.c
b/libs/rpcd-mod-luci/src/luci.c
index eb6f58803e86e9c5fd0e5ca0be2e06dbcf9205ca..b89bca494d42c6eec6ae231dd000989be86c251d 100644
(file)
--- a/
libs/rpcd-mod-luci/src/luci.c
+++ b/
libs/rpcd-mod-luci/src/luci.c
@@
-1672,8
+1672,9
@@
rpc_luci_get_host_hints_rrdns_cb(struct ubus_request *req, int type,
avl_for_each_element(&rctx->avl, hint, avl) {
avl_for_each_element(&hint->ip6addrs, addr, avl) {
if (!memcmp(&addr->addr.in6, &in6, sizeof(in6))) {
- free(hint->hostname);
- hint->hostname = strdup(blobmsg_get_string(cur));
+ if (!hint->hostname)
+ hint->hostname = strdup(blobmsg_get_string(cur));
+
break;
}
}