From 1236a7ccc31635eb2ea2be036e776abaeb18553a Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 23 Mar 2015 02:44:55 +0100 Subject: Handle interface creation failure for peer-specific interfaces --- src/peer.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/peer.c b/src/peer.c index 56a203d..9310263 100644 --- a/src/peer.c +++ b/src/peer.c @@ -383,7 +383,12 @@ static void setup_peer(fastd_peer_t *peer) { } else if (conf.iface_persist && !peer->iface) { peer->iface = fastd_iface_open(peer); - fastd_on_up(peer->iface); + if (peer->iface) + fastd_on_up(peer->iface); + else if (!peer->config_source_dir) + /* Fail for statically configured peers; + an error message has already been printed by fastd_iface_open() */ + exit(1); } if (!fastd_peer_is_enabled(peer)) -- cgit v1.2.3