summaryrefslogtreecommitdiffhomepage
path: root/packet
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-06-13 20:13:26 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-06-13 20:13:26 +0900
commitf2cea556c18da0419ee64a47653455c3c4dc6811 (patch)
tree7c0aa99a92adbd0d977e7379f367de9e031934c6 /packet
parent470171d51f1d654d9f47af765fce135c088ea7ec (diff)
packet: export PathAttributeInterface GetFlags()
Needs to access to Flags. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'packet')
-rw-r--r--packet/bgp/bgp.go4
-rw-r--r--packet/bgp/validate.go2
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)