ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:55209] [ruby-trunk - Bug #8464][Open] IPAddr cannot parse link-local IPv6 address.
@ 2013-05-30 16:32 aselder (Andrew Selder)
  2013-06-27 19:26 ` [ruby-core:55674] [ruby-trunk - Bug #8464] " cedric.brancourt (Cedric Brancourt)
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: aselder (Andrew Selder) @ 2013-05-30 16:32 UTC (permalink / raw
  To: ruby-core


Issue #8464 has been reported by aselder (Andrew Selder).

----------------------------------------
Bug #8464: IPAddr cannot parse link-local IPv6 address.
https://bugs.ruby-lang.org/issues/8464

Author: aselder (Andrew Selder)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.3.0]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


1.9.3p374 :001 > require 'ipaddr'
 => true
1.9.3p374 :002 > IPAddr.new("0:0:0:0:0:0:0:1%0")
ArgumentError: invalid address
	from /Users/andrew/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/ipaddr.rb:559:in `in6_addr'
	from /Users/andrew/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/ipaddr.rb:496:in `initialize'
	from (irb):2:in `new'
	from (irb):2
	from /Users/andrew/.rvm/rubies/ruby-2.0.0-p195/bin/irb:16:in `<main>'


Same behavior in Ruby 1.9.3 all patch levels


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:55674] [ruby-trunk - Bug #8464] IPAddr cannot parse link-local IPv6 address.
  2013-05-30 16:32 [ruby-core:55209] [ruby-trunk - Bug #8464][Open] IPAddr cannot parse link-local IPv6 address aselder (Andrew Selder)
@ 2013-06-27 19:26 ` cedric.brancourt (Cedric Brancourt)
  2013-07-03  3:00 ` [ruby-core:55766] [ruby-trunk - Bug #8464][Feedback] " knu (Akinori MUSHA)
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: cedric.brancourt (Cedric Brancourt) @ 2013-06-27 19:26 UTC (permalink / raw
  To: ruby-core


Issue #8464 has been updated by cedric.brancourt (Cedric Brancourt).


Not sure this need a fix.
The @%0@ part of the example is the scope ( zone ) and should not be part of the address.

It is appended by operating system in the textual representation of the endpoint ( for interface identification ), and format depend on the operating system.

But it is not part of the address , see http://www.ietf.org/rfc/rfc4007.txt 

This is the way I understand it. If I am right , this is not a bug.
----------------------------------------
Bug #8464: IPAddr cannot parse link-local IPv6 address.
https://bugs.ruby-lang.org/issues/8464#change-40179

Author: aselder (Andrew Selder)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.3.0]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


1.9.3p374 :001 > require 'ipaddr'
 => true
1.9.3p374 :002 > IPAddr.new("0:0:0:0:0:0:0:1%0")
ArgumentError: invalid address
	from /Users/andrew/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/ipaddr.rb:559:in `in6_addr'
	from /Users/andrew/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/ipaddr.rb:496:in `initialize'
	from (irb):2:in `new'
	from (irb):2
	from /Users/andrew/.rvm/rubies/ruby-2.0.0-p195/bin/irb:16:in `<main>'


Same behavior in Ruby 1.9.3 all patch levels


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:55766] [ruby-trunk - Bug #8464][Feedback] IPAddr cannot parse link-local IPv6 address.
  2013-05-30 16:32 [ruby-core:55209] [ruby-trunk - Bug #8464][Open] IPAddr cannot parse link-local IPv6 address aselder (Andrew Selder)
  2013-06-27 19:26 ` [ruby-core:55674] [ruby-trunk - Bug #8464] " cedric.brancourt (Cedric Brancourt)
@ 2013-07-03  3:00 ` knu (Akinori MUSHA)
  2013-07-03  5:24 ` [ruby-core:55770] [ruby-trunk - Bug #8464] " drbrain (Eric Hodel)
  2017-10-22  5:13 ` [ruby-core:83492] [Ruby trunk Bug#8464][Rejected] " knu
  3 siblings, 0 replies; 5+ messages in thread
From: knu (Akinori MUSHA) @ 2013-07-03  3:00 UTC (permalink / raw
  To: ruby-core


Issue #8464 has been updated by knu (Akinori MUSHA).

Category set to lib
Status changed from Open to Feedback
Assignee set to knu (Akinori MUSHA)

IPAddr currently does not support scope ID's.

Making IPAddr deal with scope ID's would mean a lot more than just ignoring it (starting with adding #scope_id).
If you are going to request such a feature, you'll have to investigate, for example, in what contexts (libraries/methods/commands) an IPv6 address with a scope ID is valid and accepted, if #to_s should include it or another method should be added for that, how it would affect the backward compatibility, etc. 

On the other hand, you can use str.sub(/%.*/m, '') or str[/[^%]*/m] if you just want to drop the scope ID part.
----------------------------------------
Bug #8464: IPAddr cannot parse link-local IPv6 address.
https://bugs.ruby-lang.org/issues/8464#change-40260

Author: aselder (Andrew Selder)
Status: Feedback
Priority: Normal
Assignee: knu (Akinori MUSHA)
Category: lib
Target version: 
ruby -v: ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.3.0]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


1.9.3p374 :001 > require 'ipaddr'
 => true
1.9.3p374 :002 > IPAddr.new("0:0:0:0:0:0:0:1%0")
ArgumentError: invalid address
	from /Users/andrew/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/ipaddr.rb:559:in `in6_addr'
	from /Users/andrew/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/ipaddr.rb:496:in `initialize'
	from (irb):2:in `new'
	from (irb):2
	from /Users/andrew/.rvm/rubies/ruby-2.0.0-p195/bin/irb:16:in `<main>'


Same behavior in Ruby 1.9.3 all patch levels


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:55770] [ruby-trunk - Bug #8464] IPAddr cannot parse link-local IPv6 address.
  2013-05-30 16:32 [ruby-core:55209] [ruby-trunk - Bug #8464][Open] IPAddr cannot parse link-local IPv6 address aselder (Andrew Selder)
  2013-06-27 19:26 ` [ruby-core:55674] [ruby-trunk - Bug #8464] " cedric.brancourt (Cedric Brancourt)
  2013-07-03  3:00 ` [ruby-core:55766] [ruby-trunk - Bug #8464][Feedback] " knu (Akinori MUSHA)
@ 2013-07-03  5:24 ` drbrain (Eric Hodel)
  2017-10-22  5:13 ` [ruby-core:83492] [Ruby trunk Bug#8464][Rejected] " knu
  3 siblings, 0 replies; 5+ messages in thread
From: drbrain (Eric Hodel) @ 2013-07-03  5:24 UTC (permalink / raw
  To: ruby-core


Issue #8464 has been updated by drbrain (Eric Hodel).


Thanks to the recently added Socket.getifaddrs we now have the ability to map scope names to interface ids for use in IPv6 multicast, for example.
----------------------------------------
Bug #8464: IPAddr cannot parse link-local IPv6 address.
https://bugs.ruby-lang.org/issues/8464#change-40265

Author: aselder (Andrew Selder)
Status: Feedback
Priority: Normal
Assignee: knu (Akinori MUSHA)
Category: lib
Target version: 
ruby -v: ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.3.0]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


1.9.3p374 :001 > require 'ipaddr'
 => true
1.9.3p374 :002 > IPAddr.new("0:0:0:0:0:0:0:1%0")
ArgumentError: invalid address
	from /Users/andrew/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/ipaddr.rb:559:in `in6_addr'
	from /Users/andrew/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/ipaddr.rb:496:in `initialize'
	from (irb):2:in `new'
	from (irb):2
	from /Users/andrew/.rvm/rubies/ruby-2.0.0-p195/bin/irb:16:in `<main>'


Same behavior in Ruby 1.9.3 all patch levels


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:83492] [Ruby trunk Bug#8464][Rejected] IPAddr cannot parse link-local IPv6 address.
  2013-05-30 16:32 [ruby-core:55209] [ruby-trunk - Bug #8464][Open] IPAddr cannot parse link-local IPv6 address aselder (Andrew Selder)
                   ` (2 preceding siblings ...)
  2013-07-03  5:24 ` [ruby-core:55770] [ruby-trunk - Bug #8464] " drbrain (Eric Hodel)
@ 2017-10-22  5:13 ` knu
  3 siblings, 0 replies; 5+ messages in thread
From: knu @ 2017-10-22  5:13 UTC (permalink / raw
  To: ruby-core

Issue #8464 has been updated by knu (Akinori MUSHA).

Status changed from Feedback to Rejected
Backport deleted (1.9.3: UNKNOWN, 2.0.0: UNKNOWN)

Closing due to feedback timeout.

----------------------------------------
Bug #8464: IPAddr cannot parse link-local IPv6 address.
https://bugs.ruby-lang.org/issues/8464#change-67502

* Author: aselder (Andrew Selder)
* Status: Rejected
* Priority: Normal
* Assignee: knu (Akinori MUSHA)
* Target version: 
* ruby -v: ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.3.0]
* Backport: 
----------------------------------------
1.9.3p374 :001 > require 'ipaddr'
 => true
1.9.3p374 :002 > IPAddr.new("0:0:0:0:0:0:0:1%0")
ArgumentError: invalid address
	from /Users/andrew/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/ipaddr.rb:559:in `in6_addr'
	from /Users/andrew/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/ipaddr.rb:496:in `initialize'
	from (irb):2:in `new'
	from (irb):2
	from /Users/andrew/.rvm/rubies/ruby-2.0.0-p195/bin/irb:16:in `<main>'


Same behavior in Ruby 1.9.3 all patch levels



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-10-22  5:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-30 16:32 [ruby-core:55209] [ruby-trunk - Bug #8464][Open] IPAddr cannot parse link-local IPv6 address aselder (Andrew Selder)
2013-06-27 19:26 ` [ruby-core:55674] [ruby-trunk - Bug #8464] " cedric.brancourt (Cedric Brancourt)
2013-07-03  3:00 ` [ruby-core:55766] [ruby-trunk - Bug #8464][Feedback] " knu (Akinori MUSHA)
2013-07-03  5:24 ` [ruby-core:55770] [ruby-trunk - Bug #8464] " drbrain (Eric Hodel)
2017-10-22  5:13 ` [ruby-core:83492] [Ruby trunk Bug#8464][Rejected] " knu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).