From 78de22fd21b348fc00dde6fa0bfec73abb8fd651 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 12 Aug 2013 18:18:26 +0200 Subject: Improve interface name handling --- src/config.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/config.c') diff --git a/src/config.c b/src/config.c index 8ad4f72..5ed7bc3 100644 --- a/src/config.c +++ b/src/config.c @@ -609,6 +609,11 @@ void fastd_configure(fastd_context_t *ctx, fastd_config_t *conf, int argc, char if (conf->generate_key || conf->show_key) return; + if (conf->ifname) { + if (strchr(conf->ifname, '/')) + exit_error(ctx, "config error: invalid interface name"); + } + if (conf->mode == MODE_TUN) { if (!conf->peers || conf->peers->next) exit_error(ctx, "config error: in TUN mode exactly one peer must be configured"); -- cgit v1.2.3