diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-03-23 02:44:55 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-03-23 02:44:55 +0100 |
commit | 1236a7ccc31635eb2ea2be036e776abaeb18553a (patch) | |
tree | af3a71139d3b9e75da25809d8f1504993a5506e8 /src | |
parent | 6dbb8e041cd07b76712bec54d3fcd974a591c620 (diff) | |
download | fastd-1236a7ccc31635eb2ea2be036e776abaeb18553a.tar fastd-1236a7ccc31635eb2ea2be036e776abaeb18553a.zip |
Handle interface creation failure for peer-specific interfaces
Diffstat (limited to 'src')
-rw-r--r-- | src/peer.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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)) |