- Cleaned up
- Remove dneed for `link_local_v6`

tncattach

- Removed `link_local_v6`
This commit is contained in:
Tristan Brice Velloza Kildaire 2024-12-15 18:11:14 +02:00
parent 5223391129
commit 439bce5e4d
2 changed files with 28 additions and 40 deletions

12
TAP.c
View File

@ -242,7 +242,7 @@ int open_tap(void) {
}
}
if(set_ipv6 || link_local_v6)
if(set_ipv6)
{
// Firstly, obtain the interface index by `ifr_name`
int inet6 = socket(AF_INET6, SOCK_DGRAM, 0);
@ -254,15 +254,6 @@ int open_tap(void) {
exit(1);
}
// If link-local was requested
if(link_local_v6)
{
// Do nothing; kernel adds for us
}
// If use-specified non-link-local IPv6 was
if(set_ipv6)
{
char* ipPart = strtok(ipv6_addr, "/");
char* prefixPart_s = strtok(NULL, "/");
printf("ip part: %s\n", ipPart);
@ -299,7 +290,6 @@ int open_tap(void) {
}
}
}
}
return fd;
}

View File

@ -35,7 +35,6 @@ bool noup = false;
bool daemonize = false;
bool set_ipv4 = false;
bool set_ipv6 = false;
bool link_local_v6 = false; // FIXME: make this true by default
bool set_netmask = false;
bool kiss_over_tcp = false;
char* ipv4_addr;
@ -641,7 +640,6 @@ int main(int argc, char **argv) {
if (arguments.set_ipv4) set_ipv4 = true;
if (arguments.set_netmask) set_netmask = true;
if (arguments.set_ipv6) set_ipv6 = true;
if (arguments.link_local_v6) link_local_v6 = true;
if (arguments.noup) noup = true;
mtu = arguments.mtu;