mirror of
https://github.com/neocturne/fastd.git
synced 2025-05-14 20:25:08 +02:00
Improve error messages for invalid static peers
This commit is contained in:
parent
e7b0801809
commit
25c9d93516
1 changed files with 6 additions and 2 deletions
|
@ -429,8 +429,10 @@ peer: TOK_STRING {
|
||||||
;
|
;
|
||||||
|
|
||||||
peer_after: {
|
peer_after: {
|
||||||
if (!fastd_peer_add(state->peer))
|
if (!fastd_peer_add(state->peer)) {
|
||||||
|
fastd_config_error(&@$, state, "invalid peer definition");
|
||||||
YYERROR;
|
YYERROR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
peer_conf: peer_conf peer_statement
|
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))
|
if (!fastd_config_read($2->str, state->peer_group, peer, state->depth))
|
||||||
YYERROR;
|
YYERROR;
|
||||||
|
|
||||||
if (!fastd_peer_add(peer))
|
if (!fastd_peer_add(peer)) {
|
||||||
|
fastd_config_error(&@$, state, "invalid peer definition");
|
||||||
YYERROR;
|
YYERROR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
| TOK_PEERS TOK_FROM TOK_STRING {
|
| TOK_PEERS TOK_FROM TOK_STRING {
|
||||||
fastd_config_add_peer_dir(state->peer_group, $3->str);
|
fastd_config_add_peer_dir(state->peer_group, $3->str);
|
||||||
|
|
Loading…
Add table
Reference in a new issue