Skip to content

Commit

Permalink
tableID can be greater than 255
Browse files Browse the repository at this point in the history
  • Loading branch information
Cellebyte authored and MaxRink committed Oct 14, 2024
1 parent 28a37d8 commit d6b08e4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/nl/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package nl
import (
"errors"
"fmt"
"math"
"strconv"

"github.com/telekom/das-schiff-network-operator/pkg/route"
Expand Down Expand Up @@ -141,8 +142,8 @@ func GetAddressFamily(addressFamily int) (string, error) {
}

func (*Manager) getVRFName(tableID int, vrfInterfaces map[int]VRFInformation) (string, error) {
if tableID < 0 || tableID > 255 {
return "", fmt.Errorf("table id %d out of range [0-255]", tableID)
if tableID < 0 || tableID > math.MaxInt {
return "", fmt.Errorf("table id %d out of range [0-%d]", tableID, math.MaxInt)
}
switch tableID {
case localTableID:
Expand Down

0 comments on commit d6b08e4

Please sign in to comment.