From ff5663a7c9c47989623bdf9b9d78a1030b2ed1e8 Mon Sep 17 00:00:00 2001 From: Eiichiro Watanabe Date: Mon, 7 Dec 2015 18:05:30 +0900 Subject: packet: fix Version and Type are reversed --- packet/rtr.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packet/rtr.go') 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 -- cgit v1.2.3