- More clean up
This commit is contained in:
Tristan Brice Velloza Kildaire 2024-12-15 17:45:05 +02:00
parent 4b0e006139
commit f61b4a0193

6
TAP.c
View File

@ -100,6 +100,7 @@ void trySixSet
interfaceIndex interfaceIndex
); );
// linux IPv6 mtu check
if(mtu < 1280) if(mtu < 1280)
{ {
printf("MTU must be 1280 bytes or more for IPv6\n"); printf("MTU must be 1280 bytes or more for IPv6\n");
@ -315,9 +316,8 @@ int open_tap(void) {
} }
} }
if(set_ipv6 || link_local_v6) { if(set_ipv6 || link_local_v6)
printf("TODO: Implement set ipv6\n"); {
// Firstly, obtain the interface index by `ifr_name` // Firstly, obtain the interface index by `ifr_name`
int dummySock = socket(AF_INET6, SOCK_DGRAM, 0); int dummySock = socket(AF_INET6, SOCK_DGRAM, 0);
if(ioctl(dummySock, SIOCGIFINDEX, &ifr) < 0) if(ioctl(dummySock, SIOCGIFINDEX, &ifr) < 0)