summaryrefslogtreecommitdiffhomepage
path: root/packet/bgp.go
diff options
context:
space:
mode:
authorSoramichi Akiyama <akiyama@m.soramichi.jp>2015-06-06 16:23:12 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-06-09 23:01:09 +0900
commit78850b1a68427ca5459b667f50c64709db21c4c2 (patch)
tree6bef58de02ec074cc2a0cc9b7b31958e957f3057 /packet/bgp.go
parent9c583d4c8c813f5d599ce35802bc87a3353f183d (diff)
packet: fix PathAttributeAs4Aggregator serialization
Diffstat (limited to 'packet/bgp.go')
-rw-r--r--packet/bgp.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/packet/bgp.go b/packet/bgp.go
index bd9cefa6..c745effa 100644
--- a/packet/bgp.go
+++ b/packet/bgp.go
@@ -3356,7 +3356,7 @@ func (p *PathAttributeAs4Aggregator) DecodeFromBytes(data []byte) error {
func (p *PathAttributeAs4Aggregator) Serialize() ([]byte, error) {
buf := make([]byte, 8)
binary.BigEndian.PutUint32(buf[0:], p.Value.AS)
- copy(buf[4:], p.Value.Address)
+ copy(buf[4:], p.Value.Address.To4())
p.PathAttribute.Value = buf
return p.PathAttribute.Serialize()
}