Skip to content

Commit

Permalink
Avoid jumbo frames as it produces issues with traffic flow.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 committed Oct 2, 2023
1 parent b03413a commit 425034d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions pkg/netconf/interfaces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"os"
"sort"
"strings"
"testing"

"github.com/google/go-cmp/cmp"
Expand Down Expand Up @@ -70,8 +71,8 @@ func equalDirs(dir1, dir2 string) (bool, string) {
if err != nil {
panic(err)
}
s1 := string(f1)
s2 := string(f2)
s1 := strings.TrimSpace(string(f1))
s2 := strings.TrimSpace(string(f2))
if !cmp.Equal(s1, s2) {
return false, fmt.Sprintf("file %s differs: %v", f, cmp.Diff(s1, s2))
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/netconf/systemd.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ const (
// tplSystemdNetworkLan defines the name of the template to render system.network file.
tplSystemdNetworkLan = "networkd/10-lan.network.tpl"
// mtuFirewall defines the value for MTU specific to the needs of a firewall. VXLAN requires higher MTU.
mtuFirewall = 9216
mtuFirewall = 1500
// mtuMachine defines the value for MTU specific to the needs of a machine.
mtuMachine = 9000
mtuMachine = 1440
)

type (
Expand Down
2 changes: 1 addition & 1 deletion pkg/netconf/testdata/networkd/firewall/10-lan0.link
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ PermanentMACAddress=00:03:00:11:11:01
[Link]
Name=lan0
NamePolicy=
MTUBytes=9216
MTUBytes=1500
2 changes: 1 addition & 1 deletion pkg/netconf/testdata/networkd/firewall/11-lan1.link
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ PermanentMACAddress=00:03:00:11:12:01
[Link]
Name=lan1
NamePolicy=
MTUBytes=9216
MTUBytes=1500
2 changes: 1 addition & 1 deletion pkg/netconf/testdata/networkd/machine/10-lan0.link
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ PermanentMACAddress=00:03:00:11:11:01
[Link]
Name=lan0
NamePolicy=
MTUBytes=9000
MTUBytes=1440
2 changes: 1 addition & 1 deletion pkg/netconf/testdata/networkd/machine/11-lan1.link
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ PermanentMACAddress=00:03:00:11:12:01
[Link]
Name=lan1
NamePolicy=
MTUBytes=9000
MTUBytes=1440

0 comments on commit 425034d

Please sign in to comment.