summaryrefslogtreecommitdiffstats
path: root/src/config.y
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-04-01 22:28:31 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-04-01 22:28:31 +0200
commitbd781685508ae5096f864ba969824e299c7f327c (patch)
tree574d91e2dcbc61a7bb9096d6a46dd3b6f70825c5 /src/config.y
parent14d6915f098c6d51a6e879b81f70d9b9dba0b867 (diff)
downloadfastd-bd781685508ae5096f864ba969824e299c7f327c.tar
fastd-bd781685508ae5096f864ba969824e299c7f327c.zip
Require port with peer specfication, remove default port
Diffstat (limited to 'src/config.y')
-rw-r--r--src/config.y13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/config.y b/src/config.y
index fd60d0d..d4b9af6 100644
--- a/src/config.y
+++ b/src/config.y
@@ -96,7 +96,6 @@
%type <num> port
%type <num> maybe_port
-%type <num> maybe_port_default
%type <str> maybe_as
%%
@@ -188,15 +187,15 @@ peer_statement: TOK_ADDRESS peer_address ';'
| TOK_INCLUDE peer_include ';'
;
-peer_address: TOK_ADDR maybe_port_default {
+peer_address: TOK_ADDR ':' port {
conf->peers->address.in.sin_family = AF_INET;
conf->peers->address.in.sin_addr = $1;
- conf->peers->address.in.sin_port = $2;
+ conf->peers->address.in.sin_port = $3;
}
- | TOK_ADDR6 maybe_port_default {
+ | TOK_ADDR6 ':' port {
conf->peers->address.in6.sin6_family = AF_INET6;
conf->peers->address.in6.sin6_addr = $1;
- conf->peers->address.in6.sin6_port = $2;
+ conf->peers->address.in6.sin6_port = $3;
}
;
@@ -230,10 +229,6 @@ maybe_port: ':' port { $$ = $2; }
| { $$ = 0; }
;
-maybe_port_default: ':' port { $$ = $2; }
- | { $$ = htons(1337); }
- ;
-
maybe_as: TOK_AS TOK_STRING { $$ = $2; }
| { $$ = NULL; }
;