diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-11-14 13:37:14 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-11-21 10:56:23 +0900 |
commit | 517a9433b96eae6dce6d5a29a68afdfc42ca95c3 (patch) | |
tree | 3121e45771f397906c8f602fa2b8eee8f0ba52c6 | |
parent | 794a164b8e779a1ceae0912d791e8fb5656896e6 (diff) |
packet/bgp: Use ESI str in EVPN Ethernet Segment Route
This patch fixes to use the string representation of ESI in the string
representation of EVPN Ethernet Segment Route.
Currently, displayed in the default representation of ESI structure.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
-rw-r--r-- | docs/sources/evpn.md | 2 | ||||
-rw-r--r-- | packet/bgp/bgp.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/docs/sources/evpn.md b/docs/sources/evpn.md index a5d287ae..3ca46308 100644 --- a/docs/sources/evpn.md +++ b/docs/sources/evpn.md @@ -433,7 +433,7 @@ GoBGP will receive these four routes and re-advertise them to YABGP peer on "10. $ gobgp global rib -a evpn Network Labels Next Hop AS_PATH Age Attrs *> [type:A-D][rd:1.1.1.1:32867][esi:single-homed][etag:100] [161] 10.75.44.254 hh:mm:ss [{Extcomms: [esi-label: 8001]} {Origin: i} {LocalPref: 100}] -*> [type:esi][rd:172.16.0.1:8888][esi:{0 [0 0 0 0 0 0 0 0 0]}][ip:192.168.0.1] 10.75.44.254 hh:mm:ss [{Extcomms: [es-import rt: 00:11:22:33:44:55]} {Origin: i} {LocalPref: 100}] +*> [type:esi][rd:172.16.0.1:8888][esi:single-homed][ip:192.168.0.1] 10.75.44.254 hh:mm:ss [{Extcomms: [es-import rt: 00:11:22:33:44:55]} {Origin: i} {LocalPref: 100}] *> [type:macadv][rd:172.17.0.3:2][etag:108][mac:00:11:22:33:44:55][ip:11.11.11.1] [0] 10.75.44.254 hh:mm:ss [{Extcomms: [mac-mobility: 500, sticky]} {Origin: i} {LocalPref: 100} [ESI: single-homed]] *> [type:multicast][rd:172.16.0.1:5904][etag:100][ip:192.168.0.1] 10.75.44.254 hh:mm:ss [{Origin: i} {LocalPref: 100}] ``` diff --git a/packet/bgp/bgp.go b/packet/bgp/bgp.go index 2ed6adcf..a8a58833 100644 --- a/packet/bgp/bgp.go +++ b/packet/bgp/bgp.go @@ -2479,7 +2479,7 @@ func (er *EVPNEthernetSegmentRoute) String() string { // For the purpose of BGP route key processing, only the Ethernet // Segment ID, IP Address Length, and Originating Router's IP Address // fields are considered to be part of the prefix in the NLRI. - return fmt.Sprintf("[type:esi][rd:%s][esi:%d][ip:%s]", er.RD, er.ESI, er.IPAddress) + return fmt.Sprintf("[type:esi][rd:%s][esi:%s][ip:%s]", er.RD, er.ESI.String(), er.IPAddress) } func (er *EVPNEthernetSegmentRoute) MarshalJSON() ([]byte, error) { |