diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-08-24 03:17:50 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-08-24 03:17:50 +0200 |
commit | 25c9d9351636be717664e745395fe016b86911be (patch) | |
tree | b55938c20ca0e0cd60b320c35df347767987820f /src/config.y | |
parent | e7b0801809d55fb41b7aa2987623743d3be90e99 (diff) | |
download | fastd-25c9d9351636be717664e745395fe016b86911be.tar fastd-25c9d9351636be717664e745395fe016b86911be.zip |
Improve error messages for invalid static peers
Diffstat (limited to 'src/config.y')
-rw-r--r-- | src/config.y | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/config.y b/src/config.y index 44fc59f..389cf31 100644 --- a/src/config.y +++ b/src/config.y @@ -429,8 +429,10 @@ peer: TOK_STRING { ; peer_after: { - if (!fastd_peer_add(state->peer)) + if (!fastd_peer_add(state->peer)) { + fastd_config_error(&@$, state, "invalid peer definition"); YYERROR; + } } peer_conf: peer_conf peer_statement @@ -542,8 +544,10 @@ include: TOK_PEER TOK_STRING maybe_as { if (!fastd_config_read($2->str, state->peer_group, peer, state->depth)) YYERROR; - if (!fastd_peer_add(peer)) + if (!fastd_peer_add(peer)) { + fastd_config_error(&@$, state, "invalid peer definition"); YYERROR; + } } | TOK_PEERS TOK_FROM TOK_STRING { fastd_config_add_peer_dir(state->peer_group, $3->str); |