summaryrefslogtreecommitdiffhomepage
path: root/zebra
diff options
context:
space:
mode:
Diffstat (limited to 'zebra')
-rw-r--r--zebra/zapi.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/zebra/zapi.go b/zebra/zapi.go
index f4b8615e..0c131f7f 100644
--- a/zebra/zapi.go
+++ b/zebra/zapi.go
@@ -850,14 +850,15 @@ func (b *IPRouteBody) DecodeFromBytes(data []byte, version uint8) error {
if b.Message&MESSAGE_DISTANCE > 0 {
b.Distance = data[pos]
+ pos += 1
}
if b.Message&MESSAGE_METRIC > 0 {
- pos += 1
b.Metric = binary.BigEndian.Uint32(data[pos : pos+4])
+ pos += 4
}
if b.Message&MESSAGE_MTU > 0 {
- pos += 4
b.Mtu = binary.BigEndian.Uint32(data[pos : pos+4])
+ pos += 4
}
return nil