View Issue Details

IDProjectCategoryView StatusLast Update
0003858unrealircdpublic2009-11-04 11:52
ReporterLe_Coyote Assigned Tosyzop  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx86OSLinux Vserver-2.2.0.7 + IPv6OS Version2.6.22
Product Version3.2.8 
Fixed in Version3.2.9-RC1 
Summary0003858: link::bind-ip in 1.2.3.4 style breaks links on IPv6-enabled build
DescriptionUsing (unmodified) 3.2.8.1

After reading the Changelog (- 0003163: [ircd] Allow 1.2.3.4 style IPs in IPv6 mode (not only ::ffff:1.2.3.4)), I decided to edit my config file and use classic IPv4 style. This caused the IPv4 link to fail with "Operation not permitted". I determined the culprit to be link::bind-ip.

Note that setting link::hostname with 1.2.3.4 notation is not enough to reproduce the problem. In other words, at the moment, it is OK to use the standard IPv4 notation for anything *but* link::bind-ip.
Steps To Reproduce- Build 3.2.8 (or 3.2.8.1) with IPv6 support
- Create an IPv4 link block with link::bind-ip in 1.2.3.4 style
- Start ircd and attempt to link
Additional InformationWhen attempting to link, the ircd is actually binding on an available IPv6 address instead of an IPv4 one, which causes the subsequent connect() to fail.

Good :
bind(10, {sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "::ffff:1.2.3.4", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
(...)
connect(10, {sa_family=AF_INET6, sin6_port=htons(6602), inet_pton(AF_INET6, "::ffff:5.6.7.8", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 EINPROGRESS (Operation now in progress)

Bad :
bind(10, {sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "2001:my:v6::here", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
(...)
connect(10, {sa_family=AF_INET6, sin6_port=htons(6602), inet_pton(AF_INET6, "::ffff:5.6.7.8", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 EPERM (Operation not permitted)
TagsNo tags attached.
3rd party modules

Relationships

child of 0003776 resolvedsyzop Unreal3.2.9 TODO 

Activities

syzop

2009-11-04 11:52

administrator   ~0015949

Fixed in .770, thanks for the report.
- Fixed IPv4 ip's in link::bind-ip on IPv6 builds. This caused issues ranging
  from not binding to that ip when linking, to not being able to link at
  all. Also fixed a very small memory leak upon /REHASH. Bug reported by
  Mr_Smoke (0003858).

Issue History

Date Modified Username Field Change
2009-07-02 17:33 Le_Coyote New Issue
2009-09-07 20:27 syzop Relationship added child of 0003776
2009-11-04 11:52 syzop QA => Not touched yet by developer
2009-11-04 11:52 syzop U4: Need for upstream patch => No need for upstream InspIRCd patch
2009-11-04 11:52 syzop Note Added: 0015949
2009-11-04 11:52 syzop Status new => resolved
2009-11-04 11:52 syzop Fixed in Version => 3.2.9-RC1
2009-11-04 11:52 syzop Resolution open => fixed
2009-11-04 11:52 syzop Assigned To => syzop