[New-bugs-announce] [issue37749] ipaddress - is_global method all multicast addresses and networks return true

Brandon James report at bugs.python.org
Sat Aug 3 01:16:46 EDT 2019


New submission from Brandon James <brandon at brandonsjames.com>:

When using the ipaddress library, all multicast addresses and networks return True when using the is_global method for their respective classes. I believe their are two possible fixes for this. 

1) In practice no multicast addresses are globally routable. If our definition of is_global means the address is globally routable, then I propose adding not is_multicast to each class's is_global logic. 

2) RFC 5771 (IPv4) and RFCs 4291 and 7346 (IPv6) both have guidelines for what MAY be routed on the public internet (as mentioned above multicast is not routed globally in practice). Logic following those guidelines should be added.

IPv4: 224.0.1.0/24, AD-HOC I, II and III addresses 224.0.2.0 - 224.0.255.255, 224.3.0.0 - 224.4.255.255, and 233.252.0.0 - 233.255.255.255

IPv6: Multicast addresses with 0xE in the SCOPE field

The current logic is inaccurate when looking at the relevant RFCs and worse when looking at how routing is actually implemented. 

Github PR submitted for option 1 above. I've also submitted a thread to NANOG's mailing list (currently pending moderator approval) posing a few questions regarding the RFCs above. I think it's unlikely that multicast will ever be publicly routed on the internet, so really we just need to define global here. My definition would be addresses that are routed on the public internet.

----------
components: Library (Lib)
messages: 348942
nosy: bjames
priority: normal
severity: normal
status: open
title: ipaddress - is_global method all multicast addresses and networks return true

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37749>
_______________________________________


More information about the New-bugs-announce mailing list