Skip to content

Commit

Permalink
removed vxlan params (learning l2/3 miss
Browse files Browse the repository at this point in the history
  • Loading branch information
hellt committed Oct 6, 2023
1 parent f7965ff commit 6d6ebb8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
7 changes: 2 additions & 5 deletions cmd/vxlan.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,8 @@ var vxlanCreateCmd = &cobra.Command{
LinkCommonParams: links.LinkCommonParams{
MTU: vxlanMTU,
},
UDPPort: vxlanUDPPort,
NoLearning: true,
NoL2Miss: true,
NoL3Miss: true,
LinkType: links.LinkTypeVxlanStitch,
UDPPort: vxlanUDPPort,
LinkType: links.LinkTypeVxlanStitch,
Endpoint: *links.NewEndpointRaw(
"host",
cntLink,
Expand Down
12 changes: 0 additions & 12 deletions links/link_vxlan.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ type LinkVxlanRaw struct {
Endpoint EndpointRaw `yaml:"endpoint"`
UDPPort int `yaml:"udp-port,omitempty"`
ParentInterface string `yaml:"parent-interface,omitempty"`
NoLearning bool `yaml:"no-learning,omitempty"`
NoL2Miss bool `yaml:"no-l2miss,omitempty"`
NoL3Miss bool `yaml:"no-l3miss,omitempty"`

// we use the same struct for vxlan and vxlan stitch, so we need to differentiate them in the raw format
LinkType LinkType
Expand Down Expand Up @@ -98,9 +95,6 @@ func (lr *LinkVxlanRaw) resolveVxlan(params *ResolveParams, stitched bool) (*Lin
var err error
link := &LinkVxlan{
LinkCommonParams: lr.LinkCommonParams,
noLearning: lr.NoLearning,
noL2Miss: lr.NoL2Miss,
noL3Miss: lr.NoL3Miss,
}

link.localEndpoint, err = lr.resolveLocalEndpoint(stitched, params, link)
Expand Down Expand Up @@ -206,9 +200,6 @@ type LinkVxlan struct {
LinkCommonParams
localEndpoint Endpoint
remoteEndpoint *EndpointVxlan
noLearning bool
noL2Miss bool
noL3Miss bool
}

func (l *LinkVxlan) Deploy(ctx context.Context) error {
Expand Down Expand Up @@ -246,9 +237,6 @@ func (l *LinkVxlan) deployVxlanInterface() error {
VxlanId: l.remoteEndpoint.vni,
VtepDevIndex: parentIface.Attrs().Index,
Group: l.remoteEndpoint.remote,
Learning: !l.noLearning, // invert the value - we make use of the bool default value == false
L2miss: !l.noL2Miss, // invert the value
L3miss: !l.noL3Miss, // invert the value
}
// set the upd port if defined in the input
if l.remoteEndpoint.udpPort != 0 {
Expand Down

0 comments on commit 6d6ebb8

Please sign in to comment.