Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipaddress - is_global method all multicast addresses and networks return true #81930

Open
bjames mannequin opened this issue Aug 3, 2019 · 1 comment
Open

ipaddress - is_global method all multicast addresses and networks return true #81930

bjames mannequin opened this issue Aug 3, 2019 · 1 comment
Labels
3.9 only security fixes stdlib Python modules in the Lib dir

Comments

@bjames
Copy link
Mannequin

bjames mannequin commented Aug 3, 2019

BPO 37749
Nosy @bjames
PRs
  • bpo-37749: modified is_global to handle multicast addresses #15088
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2019-08-03.05:16:46.580>
    labels = ['library', '3.9']
    title = 'ipaddress - is_global method all multicast addresses and networks return true'
    updated_at = <Date 2020-02-06.01:58:26.816>
    user = 'https://github.com/bjames'

    bugs.python.org fields:

    activity = <Date 2020-02-06.01:58:26.816>
    actor = 'cheryl.sabella'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2019-08-03.05:16:46.580>
    creator = 'bjames'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 37749
    keywords = ['patch']
    message_count = 1.0
    messages = ['348942']
    nosy_count = 2.0
    nosy_names = ['pmoody', 'bjames']
    pr_nums = ['15088']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue37749'
    versions = ['Python 3.9']

    @bjames
    Copy link
    Mannequin Author

    bjames mannequin commented Aug 3, 2019

    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.

    @bjames bjames mannequin added the stdlib Python modules in the Lib dir label Aug 3, 2019
    @csabella csabella added the 3.9 only security fixes label Feb 6, 2020
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant