mirror of
https://github.com/luscis/openlan.git
synced 2025-10-05 08:36:59 +08:00
fea: switch: support key options for gretap
This commit is contained in:
@@ -20,7 +20,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vlan": 0,
|
"vlan": 0,
|
||||||
"interface": "gre:3.3.3.3"
|
"interface": "gre:3.3.3.3:55"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@@ -159,7 +159,10 @@ func (w *WorkerImpl) AddOutput(bridge string, port *LinuxPort) {
|
|||||||
if port.link == "" {
|
if port.link == "" {
|
||||||
port.link = co.GenName("gre")
|
port.link = co.GenName("gre")
|
||||||
}
|
}
|
||||||
|
key, _ := strconv.Atoi(values[2])
|
||||||
link := &netlink.Gretap{
|
link := &netlink.Gretap{
|
||||||
|
IKey: uint32(key),
|
||||||
|
OKey: uint32(key),
|
||||||
LinkAttrs: netlink.LinkAttrs{
|
LinkAttrs: netlink.LinkAttrs{
|
||||||
Name: port.link,
|
Name: port.link,
|
||||||
MTU: 1460,
|
MTU: 1460,
|
||||||
|
Reference in New Issue
Block a user