mirror of
https://github.com/yarrick/iodine.git
synced 2025-04-10 04:21:01 +00:00
fix #38: removed unnecessary code
See previous commit for description of this fix.
This commit is contained in:
parent
a2d1ffa150
commit
dd3f9e4228
1 changed files with 0 additions and 4 deletions
|
@ -1548,9 +1548,7 @@ handle_ns_request(int dns_fd, struct query *q)
|
||||||
if (ns_ip != INADDR_ANY) {
|
if (ns_ip != INADDR_ANY) {
|
||||||
/* If ns_ip set, overwrite destination addr with it.
|
/* If ns_ip set, overwrite destination addr with it.
|
||||||
* Destination addr will be sent as additional record (A, IN) */
|
* Destination addr will be sent as additional record (A, IN) */
|
||||||
struct sockaddr_in *addr = (struct sockaddr_in *) &q->destination; /* probably not needed */
|
|
||||||
memcpy(&q->destination, &ns_ip, sizeof(ns_ip));
|
memcpy(&q->destination, &ns_ip, sizeof(ns_ip));
|
||||||
memcpy(&addr->sin_addr, &ns_ip, sizeof(ns_ip)); /* probably not needed */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
len = dns_encode_ns_response(buf, sizeof(buf), q, topdomain);
|
len = dns_encode_ns_response(buf, sizeof(buf), q, topdomain);
|
||||||
|
@ -1583,9 +1581,7 @@ handle_a_request(int dns_fd, struct query *q, int fakeip)
|
||||||
} else if (ns_ip != INADDR_ANY) {
|
} else if (ns_ip != INADDR_ANY) {
|
||||||
/* If ns_ip set, overwrite destination addr with it.
|
/* If ns_ip set, overwrite destination addr with it.
|
||||||
* Destination addr will be sent as additional record (A, IN) */
|
* Destination addr will be sent as additional record (A, IN) */
|
||||||
struct sockaddr_in *addr = (struct sockaddr_in *) &q->destination; /* probably not needed */
|
|
||||||
memcpy(&q->destination, &ns_ip, sizeof(ns_ip));
|
memcpy(&q->destination, &ns_ip, sizeof(ns_ip));
|
||||||
memcpy(&addr->sin_addr, &ns_ip, sizeof(ns_ip)); /* probably not needed */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
len = dns_encode_a_response(buf, sizeof(buf), q);
|
len = dns_encode_a_response(buf, sizeof(buf), q);
|
||||||
|
|
Loading…
Add table
Reference in a new issue