mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-24 08:39:51 -05:00
corrected fix for test link.
git-svn-id: file:///svn/unbound/trunk@4382 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
4863f45f7e
commit
f9add77d7b
2 changed files with 29 additions and 12 deletions
|
|
@ -2839,23 +2839,15 @@ xfr_fd_for_master(struct module_env* env, struct auth_master* master)
|
|||
if(master_is_ip6(master)) {
|
||||
struct sockaddr_in6 sa = *(struct sockaddr_in6*)addr;
|
||||
sa.sin6_port = (in_port_t)htons((uint16_t)port);
|
||||
(void)noproto;
|
||||
(void)sa;
|
||||
(void)freebind;
|
||||
(void)addrlen;
|
||||
/* TODO link fix
|
||||
fd = create_udp_sock(AF_INET6, SOCK_DGRAM,
|
||||
(struct sockaddr*)&sa, addrlen, 1, &inuse, &noproto,
|
||||
0, 0, 0, NULL, 0, freebind, 0);
|
||||
*/
|
||||
} else {
|
||||
struct sockaddr_in* sa = (struct sockaddr_in*)addr;
|
||||
sa->sin_port = (in_port_t)htons((uint16_t)port);
|
||||
/* TODO link fix
|
||||
fd = create_udp_sock(AF_INET, SOCK_DGRAM,
|
||||
(struct sockaddr*)&sa, addrlen, 1, &inuse, &noproto,
|
||||
0, 0, 0, NULL, 0, freebind, 0);
|
||||
*/
|
||||
}
|
||||
if(fd != -1) {
|
||||
return fd;
|
||||
|
|
@ -3063,11 +3055,9 @@ xfr_probe_send_probe(struct auth_xfer* xfr, struct module_env* env)
|
|||
zname, master->host);
|
||||
return 0;
|
||||
}
|
||||
/* TODO link fix
|
||||
xfr->task_probe->cp = comm_point_create_udp(env->worker_base,
|
||||
fd, env->outnet->udp_buff, auth_xfer_probe_udp_callback,
|
||||
xfr);
|
||||
*/
|
||||
if(!xfr->task_probe->cp) {
|
||||
close(fd);
|
||||
log_err("malloc failure");
|
||||
|
|
@ -3082,7 +3072,6 @@ xfr_probe_send_probe(struct auth_xfer* xfr, struct module_env* env)
|
|||
}
|
||||
|
||||
/* send udp packet */
|
||||
/* TODO link fix
|
||||
if(!comm_point_send_udp_msg(xfr->task_probe->cp, env->scratch_buffer,
|
||||
(struct sockaddr*)&addr, addrlen)) {
|
||||
char zname[255+1];
|
||||
|
|
@ -3091,7 +3080,6 @@ xfr_probe_send_probe(struct auth_xfer* xfr, struct module_env* env)
|
|||
zname, master->host);
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1420,4 +1420,33 @@ void daemon_remote_stop_accept(struct daemon_remote* ATTR_UNUSED(rc))
|
|||
{
|
||||
}
|
||||
|
||||
int create_udp_sock(int ATTR_UNUSED(family), int ATTR_UNUSED(socktype),
|
||||
struct sockaddr* ATTR_UNUSED(addr), socklen_t ATTR_UNUSED(addrlen),
|
||||
int ATTR_UNUSED(v6only), int* ATTR_UNUSED(inuse),
|
||||
int* ATTR_UNUSED(noproto), int ATTR_UNUSED(rcv), int ATTR_UNUSED(snd),
|
||||
int ATTR_UNUSED(listen), int* ATTR_UNUSED(reuseport),
|
||||
int ATTR_UNUSED(transparent), int ATTR_UNUSED(freebind),
|
||||
int ATTR_UNUSED(use_systemd))
|
||||
{
|
||||
/* if you actually print to this, it'll be stdout during test */
|
||||
return 1;
|
||||
}
|
||||
|
||||
struct comm_point* comm_point_create_udp(struct comm_base *ATTR_UNUSED(base),
|
||||
int ATTR_UNUSED(fd), sldns_buffer* ATTR_UNUSED(buffer),
|
||||
comm_point_callback_type* ATTR_UNUSED(callback),
|
||||
void* ATTR_UNUSED(callback_arg))
|
||||
{
|
||||
/* could create a test framework; and intercept eg. authzone probes */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int comm_point_send_udp_msg(struct comm_point *ATTR_UNUSED(c),
|
||||
sldns_buffer* ATTR_UNUSED(packet), struct sockaddr* ATTR_UNUSED(addr),
|
||||
socklen_t ATTR_UNUSED(addrlen))
|
||||
{
|
||||
/* could create a test framework; and intercept eg. authzone probes */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*********** End of Dummy routines ***********/
|
||||
|
|
|
|||
Loading…
Reference in a new issue