Merge pull request #15185 from ssahani/fix-sip-copy-paste

network: DHCP lease load SIP copy paste error
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2020-03-24 10:03:57 +01:00 committed by GitHub
commit 2e7d6d1d32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 2 deletions

View file

@ -1175,7 +1175,7 @@ int dhcp_lease_load(sd_dhcp_lease **ret, const char *lease_file) {
if (r < 0)
log_debug_errno(r, "Failed to deserialize SIP servers %s, ignoring: %m", sip);
else
lease->ntp_size = r;
lease->sip_size = r;
}
if (mtu) {

View file

@ -240,6 +240,10 @@ _public_ int sd_network_link_get_ntp(int ifindex, char ***ret) {
return network_link_get_strv(ifindex, "NTP", ret);
}
_public_ int sd_network_link_get_sip(int ifindex, char ***ret) {
return network_link_get_strv(ifindex, "SIP", ret);
}
_public_ int sd_network_link_get_search_domains(int ifindex, char ***ret) {
return network_link_get_strv(ifindex, "DOMAINS", ret);
}

View file

@ -1221,7 +1221,7 @@ static int link_status_one(
sd_hwdb *hwdb,
const LinkInfo *info) {
_cleanup_strv_free_ char **dns = NULL, **ntp = NULL, **search_domains = NULL, **route_domains = NULL;
_cleanup_strv_free_ char **dns = NULL, **ntp = NULL, **sip = NULL, **search_domains = NULL, **route_domains = NULL;
_cleanup_free_ char *setup_state = NULL, *operational_state = NULL, *tz = NULL;
_cleanup_free_ char *t = NULL, *network = NULL;
const char *driver = NULL, *path = NULL, *vendor = NULL, *model = NULL, *link = NULL;
@ -1247,6 +1247,7 @@ static int link_status_one(
(void) sd_network_link_get_search_domains(info->ifindex, &search_domains);
(void) sd_network_link_get_route_domains(info->ifindex, &route_domains);
(void) sd_network_link_get_ntp(info->ifindex, &ntp);
(void) sd_network_link_get_sip(info->ifindex, &sip);
if (info->sd_device) {
(void) sd_device_get_property_value(info->sd_device, "ID_NET_LINK_FILE", &link);
@ -1749,6 +1750,9 @@ static int link_status_one(
if (r < 0)
return r;
r = dump_list(table, "NTP:", ntp);
if (r < 0)
return r;
r = dump_list(table, "SIP:", sip);
if (r < 0)
return r;
r = dump_ifindexes(table, "Carrier Bound To:", carrier_bound_to);

View file

@ -118,6 +118,10 @@ int sd_network_link_get_dhcp4_address(int ifindex, char **ret);
* representations of IP addresses */
int sd_network_link_get_ntp(int ifindex, char ***ret);
/* Get SIP entries for a given link. These are string
* representations of IP addresses */
int sd_network_link_get_sip(int ifindex, char ***ret);
/* Indicates whether or not LLMNR should be enabled for the link
* Possible levels of support: yes, no, resolve
* Possible return codes: