}
static const char* const ndisc_router_preference_table[] = {
- [SD_NDISC_PREFERENCE_LOW] = "low",
- [SD_NDISC_PREFERENCE_MEDIUM] = "medium",
- [SD_NDISC_PREFERENCE_HIGH] = "high",
+ [SD_NDISC_PREFERENCE_LOW] = "low",
+ [SD_NDISC_PREFERENCE_MEDIUM] = "medium",
+ [SD_NDISC_PREFERENCE_HIGH] = "high",
+ [SD_NDISC_PREFERENCE_RESERVED] = "reserved",
};
DEFINE_STRING_TABLE_LOOKUP_TO_STRING(ndisc_router_preference, int);
if (r < 0)
return r;
- log_ndisc(nd, "Received Router Advertisement from %s: flags=0x%0*"PRIx64"%s%s%s, preference=%s, lifetime=%s",
+ log_ndisc(nd, "Received Router Advertisement from %s: flags=0x%0*"PRIx64"(%s), preference=%s, lifetime=%s",
IN6_ADDR_TO_STRING(&a),
flags & UINT64_C(0x00ffffffffffff00) ? 14 : 2, flags, /* suppress too many zeros if no extension */
- s ? " (" : "", s, s ? ")" : "",
+ s ?: "none",
ndisc_router_preference_to_string(pref),
FORMAT_TIMESPAN(lifetime, USEC_PER_SEC));
}