From 7fddce631112866ba53850862c89bddf0dc908ea Mon Sep 17 00:00:00 2001
From: Armin Luntzer <armin.luntzer@univie.ac.at>
Date: Tue, 5 May 2020 18:50:10 +0200
Subject: [PATCH]  reserved byte in header is needed for all packets except
 write replies

---
 lib/rmap.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/rmap.c b/lib/rmap.c
index c95d2a7..6deb6a0 100644
--- a/lib/rmap.c
+++ b/lib/rmap.c
@@ -472,6 +472,8 @@ int rmap_build_hdr(struct rmap_pkt *pkt, uint8_t *hdr)
 	} else if (!pkt->ri.cmd_resp && pkt->ri.cmd & RMAP_CMD_BIT_WRITE) {
 		/* all headers have data length unless they are a write reply */
 		return n;
+	} else {
+		hdr[n++] = 0x0;	/* on other replies, this is a reserved field */
 	}
 
 	hdr[n++] = (uint8_t) (pkt->data_len >> 16); /* data len MSB */
-- 
GitLab