summaryrefslogtreecommitdiffstats
path: root/src/config.y
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-01-26 09:23:00 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-01-26 09:23:00 +0100
commit534ae7240bc5cad6edb9fd160cdb0ff0eb4778de (patch)
tree9d77fdd80b3fb5da130de1c55b5f96406814447a /src/config.y
parentb78d55b69ed9d9c88d12f0159e78973ad0d70b49 (diff)
downloadfastd-534ae7240bc5cad6edb9fd160cdb0ff0eb4778de.tar
fastd-534ae7240bc5cad6edb9fd160cdb0ff0eb4778de.zip
Add support for link-local bind addresses
Diffstat (limited to 'src/config.y')
-rw-r--r--src/config.y4
1 files changed, 4 insertions, 0 deletions
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: