From faa7ad14c6a64c22b2d82684c9510fdef779c5d1 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Wed, 23 Jan 2008 08:49:57 +0000 Subject: [PATCH] no more debug prints for auto ifs. git-svn-id: file:///svn/unbound/trunk@889 be551aaa-1e26-0410-a405-d3ace91eadb9 --- doc/Changelog | 3 +++ doc/README | 6 ++++++ util/netevent.c | 16 ++++------------ 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/doc/Changelog b/doc/Changelog index 473e4e25e..c42077542 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +23 January 2008: Wouter + - removed debug prints from if-auto, verb-algo enables some. + 22 January 2008: Wouter - library code for async in libunbound/unbound.c. - fix link testbound. diff --git a/doc/README b/doc/README index 9c7ecc9e1..d965801f6 100644 --- a/doc/README +++ b/doc/README @@ -59,6 +59,12 @@ o If you receive no answers deploying unbound on a private network. in fact those same, working, ip-addresses. Unbound will fetch the NS data from the zone and use that information in preference to the config information. +o If you are not receiving the correct source IP address on replies (e.g. + you are running a multihomed, anycast server), the interface-automatic + option can be enabled to set socket options to achieve the correct + source IP address on UDP replies. Listing all IP addresses explicitly in + the config file is an alternative. The interface-automatic option uses + non portable socket options, Linux and FreeBSD should work fine. Acknowledgements ---------------- diff --git a/util/netevent.c b/util/netevent.c index 6a0a3d10e..5587a26f1 100644 --- a/util/netevent.c +++ b/util/netevent.c @@ -289,7 +289,8 @@ comm_point_send_udp_msg_if(struct comm_point *c, ldns_buffer* packet, msg.msg_controllen = cmsg->cmsg_len; #endif /* S_SPLINT_S */ - p_ancil("send_udp over interface", r); + if(verbosity >= VERB_ALGO) + p_ancil("send_udp over interface", r); sent = sendmsg(c->fd, &msg, 0); if(sent == -1) { verbose(VERB_OPS, "sendmsg failed: %s", strerror(errno)); @@ -354,16 +355,6 @@ comm_point_udp_ancil_callback(int fd, short event, void* arg) #ifndef S_SPLINT_S for(cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; cmsg = CMSG_NXTHDR(&msg, cmsg)) { - log_info("looking at hdr %d %d (need %d %d or %d %d)", - cmsg->cmsg_level, cmsg->cmsg_type, - IPPROTO_IPV6, IPV6_PKTINFO, - IPPROTO_IP, -#ifdef IP_RECVDSTADDR - IP_RECVDSTADDR -#elif defined(IP_PKTINFO) - IP_PKTINFO -#endif - ); if( cmsg->cmsg_level == IPPROTO_IPV6 && cmsg->cmsg_type == IPV6_PKTINFO) { rep.srctype = 6; @@ -387,7 +378,8 @@ comm_point_udp_ancil_callback(int fd, short event, void* arg) #endif } } - p_ancil("receive_udp on interface", &rep); + if(verbosity >= VERB_ALGO) + p_ancil("receive_udp on interface", &rep); #endif /* S_SPLINT_S */ log_assert(fptr_whitelist_comm_point(rep.c->callback)); if((*rep.c->callback)(rep.c, rep.c->cb_arg, NETEVENT_NOERROR, &rep)) { -- 2.47.2