mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
fix for localhost queries in automatic interface mode.
git-svn-id: file:///svn/unbound/trunk@868 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
8343901c0f
commit
ac74d176cc
2 changed files with 5 additions and 2 deletions
|
|
@ -1,5 +1,8 @@
|
||||||
16 January 2008: Wouter
|
16 January 2008: Wouter
|
||||||
- incoming queries to the server with TC bit on are replied FORMERR.
|
- incoming queries to the server with TC bit on are replied FORMERR.
|
||||||
|
- interface-automatic replied the wrong source address on localhost
|
||||||
|
queries. Seems to be due to ifnum=0 in recvmsg PKTINFO. Trying
|
||||||
|
to use ifnum=-1 to mean 'no interface, use kernel route'.
|
||||||
|
|
||||||
15 January 2008: Wouter
|
15 January 2008: Wouter
|
||||||
- interface-automatic feature. experimental. Nice for anycast.
|
- interface-automatic feature. experimental. Nice for anycast.
|
||||||
|
|
|
||||||
|
|
@ -330,7 +330,7 @@ comm_point_udp_callback(int fd, short event, void* arg)
|
||||||
}
|
}
|
||||||
ldns_buffer_skip(rep.c->buffer, recv);
|
ldns_buffer_skip(rep.c->buffer, recv);
|
||||||
ldns_buffer_flip(rep.c->buffer);
|
ldns_buffer_flip(rep.c->buffer);
|
||||||
rep.ifnum = 0;
|
rep.ifnum = -1;
|
||||||
log_assert(fptr_whitelist_comm_point(rep.c->callback));
|
log_assert(fptr_whitelist_comm_point(rep.c->callback));
|
||||||
if((*rep.c->callback)(rep.c, rep.c->cb_arg, NETEVENT_NOERROR, &rep)) {
|
if((*rep.c->callback)(rep.c, rep.c->cb_arg, NETEVENT_NOERROR, &rep)) {
|
||||||
/* send back immediate reply */
|
/* send back immediate reply */
|
||||||
|
|
@ -1004,7 +1004,7 @@ comm_point_send_reply(struct comm_reply *repinfo)
|
||||||
{
|
{
|
||||||
log_assert(repinfo && repinfo->c);
|
log_assert(repinfo && repinfo->c);
|
||||||
if(repinfo->c->type == comm_udp) {
|
if(repinfo->c->type == comm_udp) {
|
||||||
if(repinfo->ifnum)
|
if(repinfo->ifnum != -1)
|
||||||
comm_point_send_udp_msg_if(repinfo->c,
|
comm_point_send_udp_msg_if(repinfo->c,
|
||||||
repinfo->c->buffer, (struct sockaddr*)&repinfo->addr,
|
repinfo->c->buffer, (struct sockaddr*)&repinfo->addr,
|
||||||
repinfo->addrlen, repinfo->ifnum);
|
repinfo->addrlen, repinfo->ifnum);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue