mirror of
https://github.com/markqvist/tncattach.git
synced 2025-07-14 14:25:16 -04:00
TAP
- Added missing `cleanup()` calls
This commit is contained in:
parent
7024d05d0e
commit
175bb90a68
3
TAP.c
3
TAP.c
@ -324,6 +324,7 @@ int open_tap(void) {
|
|||||||
{
|
{
|
||||||
printf("Could not get interface index for interface '%s'\n", ifr.ifr_name);
|
printf("Could not get interface index for interface '%s'\n", ifr.ifr_name);
|
||||||
close(dummySock);
|
close(dummySock);
|
||||||
|
cleanup();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -336,6 +337,7 @@ int open_tap(void) {
|
|||||||
{
|
{
|
||||||
perror("No prefix length was provided"); // TODO: Move logic into arg parsing
|
perror("No prefix length was provided"); // TODO: Move logic into arg parsing
|
||||||
close(dummySock);
|
close(dummySock);
|
||||||
|
cleanup();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
printf("prefix part: %s\n", prefixPart_s);
|
printf("prefix part: %s\n", prefixPart_s);
|
||||||
@ -351,6 +353,7 @@ int open_tap(void) {
|
|||||||
{
|
{
|
||||||
printf("Error parsing IPv6 address '%s'", ipv6_addr);
|
printf("Error parsing IPv6 address '%s'", ipv6_addr);
|
||||||
close(dummySock);
|
close(dummySock);
|
||||||
|
cleanup();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user