summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--packet/bgp.go4
-rw-r--r--packet/bgp_test.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/packet/bgp.go b/packet/bgp.go
index 15888439..b5d5f9f5 100644
--- a/packet/bgp.go
+++ b/packet/bgp.go
@@ -3681,7 +3681,7 @@ func (p *PathAttributeUnknown) MarshalJSON() ([]byte, error) {
return json.Marshal(p.ToApiStruct())
}
-func getPathAttribute(data []byte) (PathAttributeInterface, error) {
+func GetPathAttribute(data []byte) (PathAttributeInterface, error) {
if len(data) < 1 {
eCode := uint8(BGP_ERROR_UPDATE_MESSAGE_ERROR)
eSubCode := uint8(BGP_ERROR_SUB_MALFORMED_ATTRIBUTE_LIST)
@@ -3789,7 +3789,7 @@ func (msg *BGPUpdate) DecodeFromBytes(data []byte) error {
}
for pathlen := msg.TotalPathAttributeLen; pathlen > 0; {
- p, err := getPathAttribute(data)
+ p, err := GetPathAttribute(data)
if err != nil {
return err
}
diff --git a/packet/bgp_test.go b/packet/bgp_test.go
index ba969419..90ad7d20 100644
--- a/packet/bgp_test.go
+++ b/packet/bgp_test.go
@@ -295,7 +295,7 @@ func Test_RFC5512(t *testing.T) {
buf1, err := attr.Serialize()
assert.Equal(nil, err)
- p, err := getPathAttribute(buf1)
+ p, err := GetPathAttribute(buf1)
assert.Equal(nil, err)
err = p.DecodeFromBytes(buf1)