mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-27 12:05:15 +00:00
give error when no TAP adapters found, and clean better
This commit is contained in:
parent
d53d06206a
commit
22608bd203
2
Makefile
2
Makefile
@ -58,5 +58,5 @@ clean:
|
|||||||
@echo "Cleaning..."
|
@echo "Cleaning..."
|
||||||
@(cd src; $(MAKE) clean)
|
@(cd src; $(MAKE) clean)
|
||||||
@(cd tests; $(MAKE) clean)
|
@(cd tests; $(MAKE) clean)
|
||||||
@rm -rf bin
|
@rm -rf bin iodine-latest-win32*
|
||||||
|
|
||||||
|
@ -264,8 +264,10 @@ open_tun(const char *tun_device)
|
|||||||
memset(adapter, 0, sizeof(adapter));
|
memset(adapter, 0, sizeof(adapter));
|
||||||
get_device(adapter, sizeof(adapter));
|
get_device(adapter, sizeof(adapter));
|
||||||
|
|
||||||
if (strlen(adapter) == 0)
|
if (strlen(adapter) == 0) {
|
||||||
|
warnx("No TAP adapters found. See README-win32.txt for help.\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
snprintf(tapfile, sizeof(tapfile), "%s%s.tap", TAP_DEVICE_SPACE, adapter);
|
snprintf(tapfile, sizeof(tapfile), "%s%s.tap", TAP_DEVICE_SPACE, adapter);
|
||||||
printf("Opening device %s\n", tapfile);
|
printf("Opening device %s\n", tapfile);
|
||||||
|
Loading…
Reference in New Issue
Block a user