summaryrefslogtreecommitdiffhomepage
path: root/packet/rtr.go
diff options
context:
space:
mode:
authorEiichiro Watanabe <a16tochjp@gmail.com>2015-12-07 18:05:30 +0900
committerEiichiro Watanabe <a16tochjp@gmail.com>2015-12-07 18:05:30 +0900
commitff5663a7c9c47989623bdf9b9d78a1030b2ed1e8 (patch)
treef640adfa6b5e0eb45113217f8f5b842e608a1528 /packet/rtr.go
parent3e880da4ba93427bf637bff2d980a26a17350f0c (diff)
packet: fix Version and Type are reversed
Diffstat (limited to 'packet/rtr.go')
-rw-r--r--packet/rtr.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/packet/rtr.go b/packet/rtr.go
index 8eca54f3..7d63114a 100644
--- a/packet/rtr.go
+++ b/packet/rtr.go
@@ -189,8 +189,8 @@ func (m *RTRIPPrefix) DecodeFromBytes(data []byte) error {
func (m *RTRIPPrefix) Serialize() ([]byte, error) {
data := make([]byte, m.Len)
- data[0] = m.Type
- data[1] = m.Version
+ data[0] = m.Version
+ data[1] = m.Type
binary.BigEndian.PutUint16(data[2:4], m.SessionID)
binary.BigEndian.PutUint32(data[4:8], m.Len)
data[8] = m.Flags