So far the message wasn't pointing to freebind at all:
[net ] bind to '::1@53' (UDP): Operation not supported
I used preprocessor to avoid duplication and unused warnings.
Another way would be to ignore the freebind option if not supported,
but I think it's better to convince users not to specify it.
static int family_to_freebind_option(sa_family_t sa_family, int *level, int *name)
{
+#define LOG_NO_FB kr_log_error(NETWORK, "your system does not support 'freebind', " \
+ "please remove it from your configuration\n")
switch (sa_family) {
case AF_INET:
*level = IPPROTO_IP;
#elif defined(IP_BINDANY)
*name = IP_BINDANY;
#else
+ LOG_NO_FB;
return kr_error(ENOTSUP);
#endif
break;
*level = IPPROTO_IPV6;
*name = IPV6_BINDANY;
#else
+ LOG_NO_FB;
return kr_error(ENOTSUP);
#endif
break;