From: Pavel Tvrdik Date: Tue, 5 Apr 2016 07:12:59 +0000 (+0200) Subject: Socktest: check existence of given name of interface X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43ae8c395fea5d7c2e85146b30ac87a1450d97a3;p=thirdparty%2Fbird.git Socktest: check existence of given name of interface --- diff --git a/socktest/common.c b/socktest/common.c index 8c5995e48..df00388c7 100644 --- a/socktest/common.c +++ b/socktest/common.c @@ -102,6 +102,11 @@ skt_parse_args(int argc, char *argv[], int is_send) case 'i': s->iface = if_get_by_name(optarg); s->iface->index = if_nametoindex(optarg); + if (s->iface->index == 0) + { + printf("No interface exists with the name %s \n", optarg); + exit(1); + } break; case 'B': cf_bind = 1;