Generalise --interface-name to cope with IPv6 addresses.

This commit is contained in:
Simon Kelley
2013-05-20 11:28:32 +01:00
parent cfcad42ff1
commit 115ac3e4d7
11 changed files with 307 additions and 140 deletions

View File

@@ -3215,6 +3215,10 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
new = opt_malloc(sizeof(struct interface_name));
new->next = NULL;
new->addr4 = NULL;
#ifdef HAVE_IPV6
new->addr6 = NULL;
#endif
/* Add to the end of the list, so that first name
of an interface is used for PTR lookups. */
for (up = &daemon->int_names; *up; up = &((*up)->next));