0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-01-03 15:41:54 +00:00

Socktest: check existence of given name of interface

This commit is contained in:
Pavel Tvrdik 2016-04-05 09:12:59 +02:00
parent 856c3d105c
commit 43ae8c395f

View File

@ -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;