count++;
timebuf_t tmp;
fprintf(filePtr.get(), "%s\t%s\t%s\t%s\t%s\n",
- entry.d_address.toStringWithPortExcept(53).c_str(), entry.d_localaddress.toString().c_str(),
- entry.d_cookie.toDisplayString().c_str(),
+ entry.d_address.toStringWithPortExcept(53).c_str(),
+ entry.d_localaddress.isUnspecified() ? "-" : entry.d_localaddress.toString().c_str(),
+ entry.d_support == CookieEntry::Support::Unsupported ? "-" : entry.d_cookie.toDisplayString().c_str(),
CookieEntry::toString(entry.d_support).c_str(),
entry.d_lastused == std::numeric_limits<time_t>::max() ? "Forever" : timestamp(entry.d_lastused, tmp));
}