summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2015-03-23 02:44:55 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2015-03-23 02:44:55 +0100
commit1236a7ccc31635eb2ea2be036e776abaeb18553a (patch)
treeaf3a71139d3b9e75da25809d8f1504993a5506e8
parent6dbb8e041cd07b76712bec54d3fcd974a591c620 (diff)
downloadfastd-1236a7ccc31635eb2ea2be036e776abaeb18553a.tar
fastd-1236a7ccc31635eb2ea2be036e776abaeb18553a.zip
Handle interface creation failure for peer-specific interfaces
-rw-r--r--src/peer.c7
1 files changed, 6 insertions, 1 deletions
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))