diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-12-31 14:37:56 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-12-31 14:37:56 +0900 |
commit | 04f90d2087d3a0741527d5ee111f7a3900e0687b (patch) | |
tree | ebb0ce48c5606814c4f48b396a3e3c0697789839 /packet/bgp.go | |
parent | bb7f960572bba5ce1ddbded69e8315667e87d4c4 (diff) |
server: handle peer not capable of four byte AS number
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'packet/bgp.go')
-rw-r--r-- | packet/bgp.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packet/bgp.go b/packet/bgp.go index 60502e1a..527ebb7a 100644 --- a/packet/bgp.go +++ b/packet/bgp.go @@ -68,6 +68,7 @@ type ParameterCapabilityInterface interface { DecodeFromBytes([]byte) error Serialize() ([]byte, error) Len() int + Code() BGPCapabilityCode } type DefaultParameterCapability struct { @@ -76,6 +77,10 @@ type DefaultParameterCapability struct { CapValue []byte } +func (c *DefaultParameterCapability) Code() BGPCapabilityCode { + return c.CapCode +} + func (c *DefaultParameterCapability) DecodeFromBytes(data []byte) error { c.CapCode = BGPCapabilityCode(data[0]) c.CapLen = data[1] |