diff options
-rw-r--r-- | packet/bgp/bgp.go | 4 | ||||
-rw-r--r-- | packet/bgp/validate.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/packet/bgp/bgp.go b/packet/bgp/bgp.go index 17d11f4e..49a7cc01 100644 --- a/packet/bgp/bgp.go +++ b/packet/bgp/bgp.go @@ -3782,7 +3782,7 @@ type PathAttributeInterface interface { DecodeFromBytes([]byte) error Serialize() ([]byte, error) Len() int - getFlags() BGPAttrFlag + GetFlags() BGPAttrFlag GetType() BGPAttrType String() string MarshalJSON() ([]byte, error) @@ -3808,7 +3808,7 @@ func (p *PathAttribute) Len() int { return int(l) } -func (p *PathAttribute) getFlags() BGPAttrFlag { +func (p *PathAttribute) GetFlags() BGPAttrFlag { return p.Flags } diff --git a/packet/bgp/validate.go b/packet/bgp/validate.go index 7173138b..2c743c44 100644 --- a/packet/bgp/validate.go +++ b/packet/bgp/validate.go @@ -161,7 +161,7 @@ func ValidateAttribute(a PathAttributeInterface, rfs map[RouteFamily]bool, doCon } case *PathAttributeUnknown: - if p.getFlags()&BGP_ATTR_FLAG_OPTIONAL == 0 { + if p.GetFlags()&BGP_ATTR_FLAG_OPTIONAL == 0 { eMsg := fmt.Sprintf("unrecognized well-known attribute %s", p.GetType()) data, _ := a.Serialize() return false, NewMessageError(eCode, eSubCodeUnknown, data, eMsg) |