If can interface is misspelled or the kernel is configured without netlink
cangw displayed only generic usage instruction. Now, an appropriate error
message is displayed.
Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
case 's':
src_ifindex = if_nametoindex(optarg);
+ if (src_ifindex == 0) {
+ perror(optarg);
+ return 1;
+ }
break;
case 'd':
dst_ifindex = if_nametoindex(optarg);
+ if (dst_ifindex == 0) {
+ perror(optarg);
+ return 1;
+ }
break;
case 't':