From 335d273f70605eeca735d5ee72743f39559e45d9 Mon Sep 17 00:00:00 2001 From: Daniel Ding Date: Wed, 24 Jan 2024 16:40:35 +0800 Subject: [PATCH] fix: set gre mtu to 1450 --- pkg/config/output.go | 2 +- pkg/switch/network.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/config/output.go b/pkg/config/output.go index d1f55a9..5e69eb2 100755 --- a/pkg/config/output.go +++ b/pkg/config/output.go @@ -4,6 +4,6 @@ type Output struct { Segment int `json:"segment"` Protocol string `json:"protocol"` // gre, vxlan, etc. Remote string `json:"remote"` - DstPort int `json:"dstport"` + DstPort int `json:"dstport,omitempty"` Link string `json:"link"` // link name } diff --git a/pkg/switch/network.go b/pkg/switch/network.go index a50b026..69ed032 100755 --- a/pkg/switch/network.go +++ b/pkg/switch/network.go @@ -156,7 +156,7 @@ func (w *WorkerImpl) AddOutput(bridge string, port *LinuxPort) { if port.link == "" { port.link = co.GenName("gre") } - mtu = 1460 + mtu = 1450 link := &nl.Gretap{ IKey: uint32(cfg.Segment), OKey: uint32(cfg.Segment),