diff options
author | Soramichi Akiyama <akiyama@m.soramichi.jp> | 2015-06-04 22:49:25 +0900 |
---|---|---|
committer | Soramichi Akiyama <akiyama@m.soramichi.jp> | 2015-06-04 22:49:25 +0900 |
commit | 2aab1e0618aa4ee8ba288821db57b9fbbf08ee55 (patch) | |
tree | 36d73168b8c3d7059be7b87f044aac1fcc27375f /packet/bgp.go | |
parent | ff5bf58931ae2508a4d2d50e7ac0d7f451213d54 (diff) |
packet: fix IPAddressAS RD serialization
Diffstat (limited to 'packet/bgp.go')
-rw-r--r-- | packet/bgp.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packet/bgp.go b/packet/bgp.go index 6f541037..bd9cefa6 100644 --- a/packet/bgp.go +++ b/packet/bgp.go @@ -771,7 +771,7 @@ type RouteDistinguisherIPAddressAS struct { func (rd *RouteDistinguisherIPAddressAS) Serialize() ([]byte, error) { buf := make([]byte, 6) - copy(buf[0:], rd.Value.Admin) + copy(buf[0:], rd.Value.Admin.To4()) binary.BigEndian.PutUint16(buf[4:], rd.Value.Assigned) rd.DefaultRouteDistinguisher.Value = buf return rd.DefaultRouteDistinguisher.Serialize() |