/**
- * Copyright (C) 2012-2013 Steven Barth <steven@midlink.org>
+ * Copyright (C) 2012-2014 Steven Barth <steven@midlink.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License v2 as published by
#include <syslog.h>
#include <signal.h>
#include <unistd.h>
+#include <inttypes.h>
#include <arpa/inet.h>
#include <netinet/in.h>
inet_ntop(AF_INET6, &e[i].target, &buf[buf_len], INET6_ADDRSTRLEN);
buf_len += strlen(&buf[buf_len]);
if (type != ENTRY_HOST) {
- buf_len += snprintf(&buf[buf_len], 6, "/%hhu", e[i].length);
+ buf_len += snprintf(&buf[buf_len], 6, "/%"PRIu16, e[i].length);
if (type == ENTRY_ROUTE) {
buf[buf_len++] = ',';
if (!IN6_IS_ADDR_UNSPECIFIED(&e[i].router)) {
if ((type == ENTRY_PREFIX || type == ENTRY_ADDRESS) && e[i].class)
buf_len += snprintf(&buf[buf_len], 12, ",class=%u", e[i].class);
- else if (type == ENTRY_PREFIX)
+ else if (type == ENTRY_PREFIX && ntohl(e[i].iaid) != 1)
buf_len += snprintf(&buf[buf_len], 16, ",class=%08x", ntohl(e[i].iaid));
if (type == ENTRY_PREFIX && e[i].priority) {