From 534ae7240bc5cad6edb9fd160cdb0ff0eb4778de Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 26 Jan 2014 09:23:00 +0100 Subject: Add support for link-local bind addresses --- src/config.y | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/config.y') diff --git a/src/config.y b/src/config.y index b7243a5..878f6e7 100644 --- a/src/config.y +++ b/src/config.y @@ -292,6 +292,10 @@ interface: TOK_STRING { free(conf->ifname); conf->ifname = strdup($1->str); } bind: bind_address maybe_bind_interface maybe_bind_default { fastd_config_bind_address(ctx, conf, &$1, $2 ? $2->str : NULL, $3 == AF_UNSPEC || $3 == AF_INET, $3 == AF_UNSPEC || $3 == AF_INET6); } + | TOK_ADDR6_SCOPED maybe_port maybe_bind_default { + fastd_peer_address_t addr = { .in6 = { .sin6_family = AF_INET6, .sin6_addr = $1.addr, .sin6_port = htons($2) } }; + fastd_config_bind_address(ctx, conf, &addr, $1.ifname, $3 == AF_UNSPEC || $3 == AF_INET, $3 == AF_UNSPEC || $3 == AF_INET6); + } ; bind_address: -- cgit v1.2.3