diff --git a/README.md b/README.md index b3bc628..813861c 100644 --- a/README.md +++ b/README.md @@ -111,3 +111,12 @@ tnc0: flags=4305 mtu 400 TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ``` +## Known Issues + +The utility fails to set the interface MTU on some Raspbian versions. After attaching the TNC, check that the correct MTU has been set on the interface with ifconfig or similar. If not, you can set it manually with a command like: + +```sh +# Attach interface +ifconfig tnc0 mtu 478 + +``` \ No newline at end of file diff --git a/TAP.c b/TAP.c index 77e432c..7b5c834 100644 --- a/TAP.c +++ b/TAP.c @@ -50,7 +50,7 @@ int open_tap(void) { cleanup(); exit(1); } else { - if (ioctl(inet, SIOCGIFFLAGS, &ifr) < 0) { + if (ioctl(inet, SIOCGIFMTU, &ifr) < 0) { perror("Could not get interface flags from kernel"); close(inet); cleanup();