summaryrefslogtreecommitdiffstats
path: root/src/config.y
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-08-07 02:30:23 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-08-07 02:30:23 +0200
commit5ca89b31210b249f79a1a5cd1a258c85fdb7970e (patch)
treee08c894ab12d68c215713317d841ac6de552e619 /src/config.y
parentae90406453eb894400a25e0557bb2c7bf19f06a4 (diff)
downloadfastd-5ca89b31210b249f79a1a5cd1a258c85fdb7970e.tar
fastd-5ca89b31210b249f79a1a5cd1a258c85fdb7970e.zip
Guard socket options not available on FreeBSD
Diffstat (limited to 'src/config.y')
-rw-r--r--src/config.y5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/config.y b/src/config.y
index 65e95b3..16f3437 100644
--- a/src/config.y
+++ b/src/config.y
@@ -259,7 +259,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);
+ if (!fastd_config_bind_address(ctx, conf, &$1, $2 ? $2->str : NULL, $3 == AF_UNSPEC || $3 == AF_INET, $3 == AF_UNSPEC || $3 == AF_INET6)) {
+ fastd_config_error(&@$, ctx, conf, filename, depth, "invalid bind directive");
+ YYERROR;
+ }
}
;