diff --git a/dist/rootfs/etc/openlan/switch/network/v1024.json.example b/dist/rootfs/etc/openlan/switch/network/v1024.json.example index 8acf275..f2e4646 100755 --- a/dist/rootfs/etc/openlan/switch/network/v1024.json.example +++ b/dist/rootfs/etc/openlan/switch/network/v1024.json.example @@ -20,7 +20,7 @@ }, { "vlan": 0, - "interface": "gre:3.3.3.3" + "interface": "gre:3.3.3.3:55" } ] } diff --git a/pkg/switch/network.go b/pkg/switch/network.go index a1236d3..fe760c8 100755 --- a/pkg/switch/network.go +++ b/pkg/switch/network.go @@ -159,7 +159,10 @@ func (w *WorkerImpl) AddOutput(bridge string, port *LinuxPort) { if port.link == "" { port.link = co.GenName("gre") } + key, _ := strconv.Atoi(values[2]) link := &netlink.Gretap{ + IKey: uint32(key), + OKey: uint32(key), LinkAttrs: netlink.LinkAttrs{ Name: port.link, MTU: 1460,