diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-11-15 23:46:10 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-11-21 10:56:23 +0900 |
commit | 2d805011dd135ce248aef64aae54c4ddeb1bc8ef (patch) | |
tree | c70489b286f7d2868c7d169c2bb21b78bddbdff0 /packet | |
parent | d40fc9f5be766a9f1e6828e9251f98a20de6b760 (diff) |
packet/bgp: Use decimal AS number in EVPN ESI
Currently, the representation of AS number in EVPN ESI Type AS (Type 5)
uses the colon separated 2 octet values format, but in other places,
the AS4_PATH attribute for example, the single decimal format is used.
This patch fixes to use the decimal AS number for the consistency with
the AS_PATH/AS4_PATH attributes and also the CLI input format.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'packet')
-rw-r--r-- | packet/bgp/bgp.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packet/bgp/bgp.go b/packet/bgp/bgp.go index 3cd09ecf..3bbb3502 100644 --- a/packet/bgp/bgp.go +++ b/packet/bgp/bgp.go @@ -1973,7 +1973,7 @@ func (esi *EthernetSegmentIdentifier) String() string { s.WriteString(fmt.Sprintf("router id %s, ", net.IP(esi.Value[:4]))) s.WriteString(fmt.Sprintf("local discriminator %d", binary.BigEndian.Uint32(esi.Value[4:8]))) case ESI_AS: - s.WriteString(fmt.Sprintf("as %d:%d, ", binary.BigEndian.Uint16(esi.Value[:2]), binary.BigEndian.Uint16(esi.Value[2:4]))) + s.WriteString(fmt.Sprintf("as %d, ", binary.BigEndian.Uint32(esi.Value[:4]))) s.WriteString(fmt.Sprintf("local discriminator %d", binary.BigEndian.Uint32(esi.Value[4:8]))) default: s.WriteString(fmt.Sprintf("value %s", esi.Value)) |