Skip to content

Commit

Permalink
vxlan vni should not be type uint16
Browse files Browse the repository at this point in the history
Signed-off-by: arthur-zhang <[email protected]>
  • Loading branch information
arthur-zhang committed Nov 27, 2023
1 parent 0373f88 commit 634aeba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/backend/vxlan/vxlan.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func New(sm subnet.Manager, extIface *backend.ExternalInterface) (backend.Backen
return backend, nil
}

func newSubnetAttrs(publicIP net.IP, publicIPv6 net.IP, vnid uint16, dev, v6Dev *vxlanDevice) (*lease.LeaseAttrs, error) {
func newSubnetAttrs(publicIP net.IP, publicIPv6 net.IP, vnid uint32, dev, v6Dev *vxlanDevice) (*lease.LeaseAttrs, error) {
leaseAttrs := &lease.LeaseAttrs{
BackendType: "vxlan",
}
Expand Down Expand Up @@ -178,7 +178,7 @@ func (be *VXLANBackend) RegisterNetwork(ctx context.Context, wg *sync.WaitGroup,
v6Dev.directRouting = cfg.DirectRouting
}

subnetAttrs, err := newSubnetAttrs(be.extIface.ExtAddr, be.extIface.ExtV6Addr, uint16(cfg.VNI), dev, v6Dev)
subnetAttrs, err := newSubnetAttrs(be.extIface.ExtAddr, be.extIface.ExtV6Addr, uint32(cfg.VNI), dev, v6Dev)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/backend/vxlan/vxlan_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (nw *network) MTU() int {
}

type vxlanLeaseAttrs struct {
VNI uint16
VNI uint32
VtepMAC hardwareAddr
}

Expand Down

0 comments on commit 634aeba

Please sign in to comment.