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,9 +429,11 @@ 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,9 +544,11 @@ 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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue