Host:port parsing breaks IPv6 addresses #383

Closed
Ladas opened this Issue Mar 1, 2016 · 0 comments

Projects

None yet

2 participants

@Ladas
Ladas commented Mar 1, 2016

If we add IPV6 as host for connection it doesn't work, cause it parses address badly ending up with

WARN -- #<Bunny::Session:0x4d287b0 guest@2001:0, vhost=/, addresses=[2001:db8:fd00:1000::10]>: Could not establish TCP connection to 2001:0: Invalid argument - connect(2) for 0.0.7.209

I assume it's because of this code https://github.com/ruby-amqp/bunny/blob/dcf5c480b379975b46230ece64bc22d4232b5f44/lib/bunny/session.rb#L800

It parses last :

@Ladas Ladas changed the title from IPV6 addresses doesn't work as host to IPV6 address doesn't work as host Mar 1, 2016
@michaelklishin michaelklishin changed the title from IPV6 address doesn't work as host to Host:port parsing breaks IPv6 addresses Mar 1, 2016
@Ladas Ladas referenced this issue in ManageIQ/manageiq Mar 1, 2016
Merged

Update Bunny gem #6857

@michaelklishin michaelklishin added a commit that closed this issue Mar 9, 2016
@michaelklishin michaelklishin Support IPv6 addresses in address lists (see below for limitations)
This requires IPv6 addresses to be enquoted in square brackets.
Fixes #383.

Credits: Jeremy Heiler.
6be10be
@michaelklishin michaelklishin added a commit that referenced this issue Apr 4, 2016
@michaelklishin michaelklishin Support IPv6 addresses in address lists (see below for limitations)
This requires IPv6 addresses to be enquoted in square brackets.
Fixes #383.

Credits: Jeremy Heiler.
d49348c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment