diff --git a/pkg/netconf/interfaces_test.go b/pkg/netconf/interfaces_test.go index b0d6092..9e9447d 100644 --- a/pkg/netconf/interfaces_test.go +++ b/pkg/netconf/interfaces_test.go @@ -4,6 +4,7 @@ import ( "fmt" "os" "sort" + "strings" "testing" "github.com/google/go-cmp/cmp" @@ -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)) } diff --git a/pkg/netconf/systemd.go b/pkg/netconf/systemd.go index 6d5ecb1..725a861 100644 --- a/pkg/netconf/systemd.go +++ b/pkg/netconf/systemd.go @@ -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 ( diff --git a/pkg/netconf/testdata/networkd/firewall/10-lan0.link b/pkg/netconf/testdata/networkd/firewall/10-lan0.link index 6b00713..9e5d783 100644 --- a/pkg/netconf/testdata/networkd/firewall/10-lan0.link +++ b/pkg/netconf/testdata/networkd/firewall/10-lan0.link @@ -6,4 +6,4 @@ PermanentMACAddress=00:03:00:11:11:01 [Link] Name=lan0 NamePolicy= -MTUBytes=9216 \ No newline at end of file +MTUBytes=1500 diff --git a/pkg/netconf/testdata/networkd/firewall/11-lan1.link b/pkg/netconf/testdata/networkd/firewall/11-lan1.link index 348f26f..ebd4f9a 100644 --- a/pkg/netconf/testdata/networkd/firewall/11-lan1.link +++ b/pkg/netconf/testdata/networkd/firewall/11-lan1.link @@ -6,4 +6,4 @@ PermanentMACAddress=00:03:00:11:12:01 [Link] Name=lan1 NamePolicy= -MTUBytes=9216 \ No newline at end of file +MTUBytes=1500 diff --git a/pkg/netconf/testdata/networkd/machine/10-lan0.link b/pkg/netconf/testdata/networkd/machine/10-lan0.link index 498c09d..f3c9efa 100644 --- a/pkg/netconf/testdata/networkd/machine/10-lan0.link +++ b/pkg/netconf/testdata/networkd/machine/10-lan0.link @@ -6,4 +6,4 @@ PermanentMACAddress=00:03:00:11:11:01 [Link] Name=lan0 NamePolicy= -MTUBytes=9000 \ No newline at end of file +MTUBytes=1440 diff --git a/pkg/netconf/testdata/networkd/machine/11-lan1.link b/pkg/netconf/testdata/networkd/machine/11-lan1.link index 5d15b91..71745cf 100644 --- a/pkg/netconf/testdata/networkd/machine/11-lan1.link +++ b/pkg/netconf/testdata/networkd/machine/11-lan1.link @@ -6,4 +6,4 @@ PermanentMACAddress=00:03:00:11:12:01 [Link] Name=lan1 NamePolicy= -MTUBytes=9000 \ No newline at end of file +MTUBytes=1440