Skip to content
Commit a5195e78 authored by Niels Widger's avatar Niels Widger Committed by Jo-Philipp Wich
Browse files

rpcd-mod-luci: Return array of addresses in getHostHints



Update luci-rpc's getHostHints method to return two string arrays for
each host, `ipaddrs` and `ip6addrs`, each containing the host's IPv4
and IPv6 addresses, respectively.  Each array is sorted by a priority
derived from the source from which the address was discovered.  The
current address sources and their priority is as follows (a
higher (larger) priority is listed first):

    - neighbor table entries: 10
    - /etc/ethers entries:    50
    - DHCP leasefile:        100
    - RRDNS queries:         100
    - getifaddrs():          200
    - UCI static leases:     200

The existing `ipv4` and `ipv6` string fields for each host in
`getHostHints` has been removed.  Downstream users of getHostHints
still need to be updated.

Fixes: #4838
Signed-off-by: default avatarNiels Widger <niels@qacafe.com>
[squash commits, reformat fixes tag]
Signed-off-by: default avatarJo-Philipp Wich <jo@mein.io>
parent 2b11ec6f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment