Bug 41128 - dns/dnrd: recv_addr init wrong and 512 byte udp packets dropped
Summary: dns/dnrd: recv_addr init wrong and 512 byte udp packets dropped
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-29 18:30 UTC by mad1
Modified: 2004-01-03 05:42 UTC (History)
0 users

See Also:


Attachments
file.diff (1.84 KB, patch)
2002-07-29 18:30 UTC, mad1
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mad1 2002-07-29 18:30:01 UTC
There are a few bugs in dnrd that should probably be fixed by the author
but could be made to work on bsd:

1.  Initialization in common.h of recv_addr is broken, causing at least the
'-a' switch not to work.  Instead of assuming positions of fields in the
struct across platforms I thought it safer to do a standard initialization
in main().

2.  The buffer overflow code in udp.c:dnsrecv() is off by one, rejecting
messages where the size exactly fills the available buffer.  I also changed
to the calls to dnsrecv to pass 512 as the max size instead of the buffers
that seem to be padded by 4 bytes for a reason I don't understand.  This
causes a calling named to resend packets.  Eventually one seems to get
through but response times can be painfully slow.
Comment 1 Christian Weisgerber freebsd_committer freebsd_triage 2002-07-29 21:50:18 UTC
Responsible Changed
From-To: freebsd-ports->greid

over to maintainer
Comment 2 Kris Kennaway freebsd_committer freebsd_triage 2003-11-03 01:03:10 UTC
Responsible Changed
From-To: greid->freebsd-ports-bugs

Responsible person is no longer a ports committer
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2004-01-03 05:42:48 UTC
State Changed
From-To: open->closed

Commited, thanks!