udpOrTCP is used the wrong way around #644

Closed
Habbie opened this Issue Apr 26, 2013 · 1 comment

Projects

None yet

1 participant

@Habbie
Member
Habbie commented Apr 26, 2013

in pdns/resolver.cc there is a function:

int makeQuerySocket(const ComboAddress& local, bool udpOrTCP)

where:

udpOrTCP ? UDP : TCP

but in an if statement you see

if(!udpOrTCP) {

this means TCP, but a bit further inside that branch there is

throw AhuException("Resolver binding to local UDP socket on "+ourLocal.toString()+": "+stringerror());

When mentioning this to Peter, he told me the whole branches might be needing switching: bind to specific port on udp, but not on tcp. Right now the implementation is the other way around.

This ticket is loosely related to #643

@Habbie Habbie was assigned Apr 26, 2013
@Habbie Habbie closed this Apr 26, 2013
@Habbie Habbie added a commit that referenced this issue Apr 26, 2013
@Habbie Habbie use the right binding code for TCP vs UDP, thanks Sander Hoentjen. Cl…
…oses #644 and possibly #643

git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@3014 d19b8d6e-7fed-0310-83ef-9ca221ded41b
eabdf7e
@Habbie
Member
Habbie commented Apr 26, 2013

Author: peter
fixed in r3014

@mind04 mind04 pushed a commit to mind04/pdns that referenced this issue Apr 26, 2013
peter use the right binding code for TCP vs UDP, thanks Sander Hoentjen. Cl…
…oses #644 and possibly #643

git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@3014 d19b8d6e-7fed-0310-83ef-9ca221ded41b
91d151d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment