summaryrefslogtreecommitdiff
path: root/common/discover.c
diff options
context:
space:
mode:
authorDavid Hankins <dhankins@isc.org>2008-08-08 22:37:46 +0000
committerDavid Hankins <dhankins@isc.org>2008-08-08 22:37:46 +0000
commit0524508a91826897c158c605db476351bdc253e4 (patch)
tree931c858b031065a1c4f9d2c1a8579188e81ebe77 /common/discover.c
parent08c4e7ce2b1ec87d81c99bacc0bb157c6bec5956 (diff)
downloadisc-dhcp-0524508a91826897c158c605db476351bdc253e4.tar.gz
Backing out [ISC-Bugs #17610]
Diffstat (limited to 'common/discover.c')
-rw-r--r--common/discover.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/common/discover.c b/common/discover.c
index 20aaf661..7022b091 100644
--- a/common/discover.c
+++ b/common/discover.c
@@ -1265,10 +1265,6 @@ discover_interfaces(int state) {
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register I/O handle for %s: %s",
tmp -> name, isc_result_totext (status));
-#if defined(DHCPv6)
- /* Only register the first interface with OMAPI for select. */
- break;
-#endif
}
if (state == DISCOVER_SERVER && wifcount == 0) {
@@ -1399,7 +1395,6 @@ got_one_v6(omapi_object_t *h) {
char buf[65536]; /* maximum size for a UDP packet is 65536 */
struct interface_info *ip;
int is_unicast;
- unsigned int if_idx = 0;
if (h->type != dhcp_type_interface) {
return ISC_R_INVALIDARG;
@@ -1407,16 +1402,12 @@ got_one_v6(omapi_object_t *h) {
ip = (struct interface_info *)h;
result = receive_packet6(ip, (unsigned char *)buf, sizeof(buf),
- &from, &to, &if_idx);
+ &from, &to);
if (result < 0) {
log_error("receive_packet6() failed on %s: %m", ip->name);
return ISC_R_UNEXPECTED;
}
- /* 0 is 'any' interface. */
- if (if_idx == 0)
- return ISC_R_NOTFOUND;
-
if (dhcpv6_packet_handler != NULL) {
/*
* If a packet is not multicast, we assume it is unicast.
@@ -1430,13 +1421,6 @@ got_one_v6(omapi_object_t *h) {
ifrom.len = 16;
memcpy(ifrom.iabuf, &from.sin6_addr, ifrom.len);
- /* Seek forward to find the matching source interface. */
- while ((ip != NULL) && (if_nametoindex(ip->name) != if_idx))
- ip = ip->next;
-
- if (ip == NULL)
- return ISC_R_NOTFOUND;
-
(*dhcpv6_packet_handler)(ip, buf,
result, from.sin6_port,
&ifrom, is_unicast);