common: error out if hlq packing encounteres bool type with too old version

The bool type was introduces in HLQ version 1.  We should never see it in an
older version.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
1 files changed, 3 insertions(+), 0 deletions(-)

M common/qso-pack.c
M common/qso-pack.c +3 -0
@@ 330,6 330,9 @@ static int hlq_append_kv(struct buffer *
 		case VT_INT:
 			return hlq_append_kv_int(buf, ns, key, val->i);
 		case VT_BOOL:
+			/* bool type was introduced in version 1 */
+			if (ver < 1)
+				return -EILSEQ;
 			return hlq_append_kv_bool(buf, ns, key, val->b);
 		case VT_STR:
 			return hlq_append_kv_cstr(buf, ns, key, val_cstr(val));