Bug 125043
Summary: | IPv6-listening and views and match-destination breaks TCP queries | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Peter Bieringer <pb> | ||||
Component: | bind | Assignee: | Daniel Walsh <dwalsh> | ||||
Status: | CLOSED WORKSFORME | QA Contact: | Ben Levenson <benl> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 2 | ||||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2004-06-05 11:58:12 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Peter Bieringer
2004-06-02 11:44:15 UTC
After digging into the source code it looks like it's a missing feature. File: bin/named/client.c Function: client_request /* * Determine the destination address. For IPv6, we get this from the * pktinfo structure (if supported). For IPv4, we have to make do with * the address of the interface where the request was received. */ if (client->interface->addr.type.sa.sa_family == AF_INET6) { if ((client->attributes & NS_CLIENTATTR_PKTINFO) != 0) isc_netaddr_fromin6(&destaddr, &client->pktinfo.ipi6_addr); else isc_netaddr_any6(&destaddr); } else { isc_netaddr_fromsockaddr(&destaddr, &client->interface->addr); } NS_CLIENTATTR_PKTINFO is only set on IPv6-UDP queries, like seen in same function some lines above and "isc_netaddr_any6(&destaddr)" is not expected in other case by users.... if (event->ev_type == ISC_SOCKEVENT_RECVDONE) { INSIST(!TCP_CLIENT(client)); sevent = (isc_socketevent_t *)event; REQUIRE(sevent == client->recvevent); isc_buffer_init(&tbuffer, sevent->region.base, sevent->n); isc_buffer_add(&tbuffer, sevent->n); buffer = &tbuffer; result = sevent->result; if (result == ISC_R_SUCCESS) { client->peeraddr = sevent->address; client->peeraddr_valid = ISC_TRUE; } if ((sevent->attributes & ISC_SOCKEVENTATTR_PKTINFO) != 0) { client->attributes |= NS_CLIENTATTR_PKTINFO; client->pktinfo = sevent->pktinfo; } if ((sevent->attributes & ISC_SOCKEVENTATTR_MULTICAST) != 0) client->attributes |= NS_CLIENTATTR_MULTICAST; client->nrecvs--; } else { INSIST(TCP_CLIENT(client)); REQUIRE(event->ev_type == DNS_EVENT_TCPMSG); REQUIRE(event->ev_sender == &client->tcpmsg); buffer = &client->tcpmsg.buffer; result = client->tcpmsg.result; INSIST(client->nreads == 1); /* * client->peeraddr was set when the connection was accepted. */ client->nreads--; } Looks either it's not so easy to get the destination address of incoming IPv6-TCP connects or someone forgot to code it. Created attachment 100895 [details]
Patch to fix not working match-destination on IPv6 TCP queries
Extracted patch from 9.2.4rc4, can be clean applied to FC2's bind-9.2.3 and
looks like working well.
|