[Home]

Summary:ASTERISK-02623: [patch] Use of bindaddr=0.0.0.0 broken under BSD
Reporter:tih (tih)Labels:
Date Opened:2004-10-18 02:11:45Date Closed:2008-01-15 15:11:36.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) DIFFS.acl.txt
( 1) DIFFS.acl.txt
( 2) DIFFS.rtsock.txt
Description:Misunderstanding the use of an undocumented feature of the kernel routing socket from acl.c, I've previously supplied an erroneous patch that, in effect, broke the use of "bindaddr = 0.0.0.0". The real problem was a bug in the NetBSD kernel, which mistakenly refused the use of the feature. The attached patch, DIFFS.acl.txt, reinstates the correct functionality.

****** ADDITIONAL INFORMATION ******

The feature in question is that when a client is using the routing socket to look up a route to a destination, only one single address (the destination) is supplied by the client. The bitmap telling the server what addresses the client is supplying is thus, technically, superfluous, and someone, sometime, decided that it would be cool to overload that bitmap by using it, in this specific case, to tell the server whether the client wants local interface information in addition to the normal routing information. At some point, parameter checking has been added to NetBSD, which does not check for this specific (ab)use.

I'll be submitting the attached NetBSD patch to reinstate the feature, DIFFS.rtsock.txt, to the NetBSD maintainers.

Sorry about the screw-up!

(Disclaimer on file.)
Comments:By: tih (tih) 2004-10-18 05:14:22

I've just uploaded a new version of the diff -- I just noticed that it only worked the first time it was called, which was caused by the use of a constant '1' instead of the actual sequence number of the query sent.

By: Mark Spencer (markster) 2004-10-23 10:12:20

Fixed in CVS

By: Russell Bryant (russell) 2004-10-24 17:20:46

fixed in 1.0

By: Digium Subversion (svnbot) 2008-01-15 15:11:17.000-0600

Repository: asterisk
Revision: 4065

U   trunk/acl.c

------------------------------------------------------------------------
r4065 | markster | 2008-01-15 15:11:17 -0600 (Tue, 15 Jan 2008) | 2 lines

Fix BSD issue (bug ASTERISK-2623)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=4065

By: Digium Subversion (svnbot) 2008-01-15 15:11:36.000-0600

Repository: asterisk
Revision: 4089

U   branches/v1-0/acl.c

------------------------------------------------------------------------
r4089 | russell | 2008-01-15 15:11:35 -0600 (Tue, 15 Jan 2008) | 2 lines

fix bindaddr for BSD (bug ASTERISK-2623)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=4089