Merge pull request #19134 from poettering/outbound-special-hostname
introduce a new synthetic hostname "_outbound" that maps to "the" local IP address
This commit is contained in:
@@ -40,5 +40,12 @@ int main(int argc, char *argv[]) {
|
||||
print_local_addresses(a, (unsigned) n);
|
||||
free(a);
|
||||
|
||||
n = local_outbounds(NULL, 0, AF_UNSPEC, &a);
|
||||
assert_se(n >= 0);
|
||||
|
||||
printf("Local Outbounds:\n");
|
||||
print_local_addresses(a, (unsigned) n);
|
||||
free(a);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -455,8 +455,7 @@ static int parse_argv(int argc, char **argv,
|
||||
} else {
|
||||
_cleanup_free_ char *hostname;
|
||||
assert_se(hostname = gethostname_malloc());
|
||||
|
||||
assert_se(names = strv_new("localhost", "_gateway", "foo_no_such_host", hostname));
|
||||
assert_se(names = strv_new("localhost", "_gateway", "_outbound", "foo_no_such_host", hostname));
|
||||
|
||||
n = make_addresses(&addrs);
|
||||
assert_se(n >= 0);
|
||||
|
||||
Reference in New Issue
Block a user