summaryrefslogtreecommitdiffhomepage
path: root/packet/bgp.go
diff options
context:
space:
mode:
Diffstat (limited to 'packet/bgp.go')
-rw-r--r--packet/bgp.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/packet/bgp.go b/packet/bgp.go
index 450d0864..d058d1ec 100644
--- a/packet/bgp.go
+++ b/packet/bgp.go
@@ -826,7 +826,9 @@ func (rd *RouteDistinguisherFourOctetAS) Serialize() ([]byte, error) {
}
func (rd *RouteDistinguisherFourOctetAS) String() string {
- return fmt.Sprintf("%d:%d", rd.Admin, rd.Assigned)
+ fst := rd.Admin >> 16 & 0xffff
+ snd := rd.Admin & 0xffff
+ return fmt.Sprintf("%d.%d:%d", fst, snd, rd.Assigned)
}
func NewRouteDistinguisherFourOctetAS(admin uint32, assigned uint16) *RouteDistinguisherFourOctetAS {