CLoses https://github.com/systemd/systemd/issues/10839
int ifindex) {
_cleanup_free_ struct local_address *local = NULL;
+ _cleanup_free_ char *dhcp4_address = NULL;
int r, n, i;
assert(rtnl);
if (n < 0)
return n;
+ (void) sd_network_link_get_dhcp4_address(ifindex, &dhcp4_address);
+
for (i = 0; i < n; i++) {
_cleanup_free_ char *pretty = NULL;
if (r < 0)
return r;
+ if (dhcp4_address && streq(pretty, dhcp4_address)) {
+ _cleanup_free_ char *p = NULL;
+
+ p = pretty;
+ pretty = strjoin(pretty , " (DHCP4)");
+ if (!pretty)
+ return log_oom();
+ }
+
if (ifindex <= 0) {
char name[IF_NAMESIZE+1];