]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-82836: fix private network check (GH-97733)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 29 Nov 2022 22:12:57 +0000 (14:12 -0800)
committerGitHub <noreply@github.com>
Tue, 29 Nov 2022 22:12:57 +0000 (14:12 -0800)
commit8dafefcace5d30aa6bb319bf3f0723864d94201c
tree91f4fb982f22b03178571bbc20180c6a518772ba
parentd7c2e0a537f5e01564ebb06aa5db61e701ef7176
gh-82836: fix private network check (GH-97733)

Fixes private checks for network objects. The previous method would incorrectly return True for a private check in cases such as "0.0.0.0/0".
(cherry picked from commit ed391090cc8332406e6225d40877db6ff44a7104)

Co-authored-by: Pete Wicken <2273100+JamoBox@users.noreply.github.com>
Lib/ipaddress.py
Lib/test/test_ipaddress.py
Misc/NEWS.d/next/Library/2022-10-02-12-38-22.gh-issue-82836.OvYLmC.rst [new file with mode: 0644]