diff options
author | Eiichiro Watanabe <a16tochjp@gmail.com> | 2015-12-07 18:05:30 +0900 |
---|---|---|
committer | Eiichiro Watanabe <a16tochjp@gmail.com> | 2015-12-07 18:05:30 +0900 |
commit | ff5663a7c9c47989623bdf9b9d78a1030b2ed1e8 (patch) | |
tree | f640adfa6b5e0eb45113217f8f5b842e608a1528 /packet/rtr.go | |
parent | 3e880da4ba93427bf637bff2d980a26a17350f0c (diff) |
packet: fix Version and Type are reversed
Diffstat (limited to 'packet/rtr.go')
-rw-r--r-- | packet/rtr.go | 4 |
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 |