diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/packet/bgp/validate.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/packet/bgp/validate.go b/pkg/packet/bgp/validate.go index 60cf26e4..a76c906a 100644 --- a/pkg/packet/bgp/validate.go +++ b/pkg/packet/bgp/validate.go @@ -159,6 +159,10 @@ func ValidateAttribute(a PathAttributeInterface, rfs map[RouteFamily]BGPAddPathM } isClassDorE := func(ip net.IP) bool { + if ip.To4() == nil { + // needs to verify ipv6 too? + return false + } res := ip[0] & 0xe0 return res == 0xe0 } |