f-56: agent: MTU unique network.mtu_vm, underlay à 9000 contrôlé à la création, option DHCP 26 et host_mtu #56

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-10-23 12:10:01 +02:00
commit 8639c4727f
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
37 changed files with 518 additions and 24 deletions

20
internal/dhcp/mtu_test.go Normal file
View file

@ -0,0 +1,20 @@
package dhcp
import (
"strings"
"testing"
)
func TestGenerateConfig_CarriesTheInterfaceMTU(t *testing.T) {
c := newConf(t, "192.168.1.0/29")
c.MTU = 1450
if content := confLines(t, c); !strings.Contains(content, "dhcp-option=26,1450\n") {
t.Errorf("option 26 absente :\n%s", content)
}
}
func TestGenerateConfig_InterfaceMTUIs1500WhenUnset(t *testing.T) {
if content := confLines(t, newConf(t, "192.168.1.0/29")); !strings.Contains(content, "dhcp-option=26,1500\n") {
t.Errorf("option 26 absente :\n%s", content)
}
}