Bug 194954 - [patch] [local_unbound] forward or stub addresses with same address but different port number are not tried
Summary: [patch] [local_unbound] forward or stub addresses with same address but diffe...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.0-RELEASE
Hardware: Any Any
: Normal Affects Some People
Assignee: Dag-Erling Smørgrav
URL: https://forums.freebsd.org/threads/fa...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-11 23:05 UTC by Igor Pavlov
Modified: 2015-10-14 18:21 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Pavlov 2014-11-11 23:05:44 UTC
Bug is confirmed by W.C.A. Wijngaards, he has provided a fix:

Index: iterator/iter_delegpt.c
===================================================================
- --- iterator/iter_delegpt.c   (revision 3256)
+++ iterator/iter_delegpt.c     (working copy)
@@ -147,7 +147,9 @@
 {
        struct delegpt_addr* p = dp->target_list;
        while(p) {
- -             if(sockaddr_cmp_addr(addr, addrlen, &p->addr, p->addrlen)==0) {
+               if(sockaddr_cmp_addr(addr, addrlen, &p->addr, p->addrlen)==0
+                       && ((struct sockaddr_in*)addr)->sin_port ==
+                          ((struct sockaddr_in*)&p->addr)->sin_port) {
                        return p;
                }
                p = p->next_target;
Comment 1 Dag-Erling Smørgrav freebsd_committer 2015-10-14 18:21:14 UTC
Fixed by r276605 in head (2015-01-03) and r285206 in stable/10 (2015-07-06).