link: add don't fragment support to Geneve

This commit is contained in:
konradh 2023-05-15 15:02:32 +02:00 committed by Alessandro Boch
parent 9453b0562a
commit 0e685ffcfc
2 changed files with 12 additions and 0 deletions

10
link.go
View File

@ -1033,6 +1033,7 @@ type Geneve struct {
Link uint32
FlowBased bool
InnerProtoInherit bool
Df GeneveDf
}
func (geneve *Geneve) Attrs() *LinkAttrs {
@ -1043,6 +1044,15 @@ func (geneve *Geneve) Type() string {
return "geneve"
}
type GeneveDf uint8
const (
GENEVE_DF_UNSET GeneveDf = iota
GENEVE_DF_SET
GENEVE_DF_INHERIT
GENEVE_DF_MAX
)
// Gretap devices must specify LocalIP and RemoteIP on create
type Gretap struct {
LinkAttrs

View File

@ -3029,6 +3029,8 @@ func addGeneveAttrs(geneve *Geneve, linkInfo *nl.RtAttr) {
if geneve.Tos != 0 {
data.AddRtAttr(nl.IFLA_GENEVE_TOS, nl.Uint8Attr(geneve.Tos))
}
data.AddRtAttr(nl.IFLA_GENEVE_DF, nl.Uint8Attr(uint8(geneve.Df)))
}
func parseGeneveData(link Link, data []syscall.NetlinkRouteAttr) {