Raspbian MTU setting

This commit is contained in:
Mark Qvist 2020-05-28 14:15:29 +02:00
parent a4f79f204b
commit 8a70eedfc5
2 changed files with 10 additions and 1 deletions

View File

@ -111,3 +111,12 @@ tnc0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> 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
```

2
TAP.c
View File

@ -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();