YAML strings should be quoted if they contain colon characters.
Since IPv6 addresses do, we now quote the query_address and
response_address strings in all YAML output.
strlcat(sockstr, "0", sizeof(sockstr));
}
- printf(" response_address: %s\n", sockstr);
+ printf(" response_address: \"%s\"\n", sockstr);
printf(" response_port: %u\n", sport);
}
strlcat(sockstr, "0", sizeof(sockstr));
}
- printf(" query_address: %s\n", sockstr);
+ printf(" query_address: \"%s\"\n", sockstr);
printf(" query_port: %u\n", sport);
}
(void)inet_ntop(ip->len == 4 ? AF_INET : AF_INET6, ip->data,
buf, sizeof(buf));
- printf(" query_address: %s\n", buf);
+ printf(" query_address: \"%s\"\n", buf);
}
if (m->has_response_address) {
(void)inet_ntop(ip->len == 4 ? AF_INET : AF_INET6, ip->data,
buf, sizeof(buf));
- printf(" response_address: %s\n", buf);
+ printf(" response_address: \"%s\"\n", buf);
}
if (m->has_query_port) {
if (hash != NULL) {
*hash = '\0';
}
- printf(" response_address: %s\n", sockstr);
+ printf(" response_address: \"%s\"\n", sockstr);
printf(" response_port: %u\n", sport);
}
if (hash != NULL) {
*hash = '\0';
}
- printf(" query_address: %s\n", sockstr);
+ printf(" query_address: \"%s\"\n", sockstr);
printf(" query_port: %u\n", sport);
}