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

sync: don't use ipv6 for rsync when it's disabled #1309

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

0x501D
Copy link

@0x501D 0x501D commented Mar 18, 2024

socket.has_ipv6 gives a false result:

$ sysctl net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.all.disable_ipv6 = 1
$ python
Python 3.11.8 (main, Feb 24 2024, 17:10:38) [GCC 13.2.1 20240210] on linux Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.has_ipv6
True

This patch uses the built-in _has_ipv6() function, which returns the correct result.

Bug: https://bugs.gentoo.org/927241

@0x501D 0x501D force-pushed the rsync_fix_ipv6_problems branch 4 times, most recently from eb986f9 to 67c9dee Compare March 18, 2024 12:18
@zmedico
Copy link
Member

zmedico commented Mar 18, 2024

Thanks @0x501D this looks great! Can you add a sign off to comply with our Certificate of Origin?

@0x501D
Copy link
Author

0x501D commented Mar 18, 2024

Thanks @0x501D this looks great! Can you add a sign off to comply with our Certificate of Origin?

Sign off added.

@0x501D
Copy link
Author

0x501D commented Mar 18, 2024

Linter errors was fixed.

@floppym
Copy link
Contributor

floppym commented Mar 18, 2024

This patch uses the built-in _has_ipv6() function, which returns the correct result.

Nit: there is no "built-in" _has_ipv6() function. I would refer to portage.process._has_ipv6() instead.

@0x501D
Copy link
Author

0x501D commented Mar 18, 2024

This patch uses the built-in _has_ipv6() function, which returns the correct result.

Nit: there is no "built-in" _has_ipv6() function. I would refer to portage.process._has_ipv6() instead.

Thanks. Commit message was fixed.

@floppym
Copy link
Contributor

floppym commented Mar 20, 2024

I suppose we should remove the underscore from the front of the function name if we are going to call it from another module. It's no longer a "private" function.

@0x501D
Copy link
Author

0x501D commented Mar 20, 2024

I suppose we should remove the underscore from the front of the function name if we are going to call it from another module. It's no longer a "private" function.

Done. Added in a separate commit.

Signed-off-by: Pavel Balaev <mail@void.so>
socket.has_ipv6 gives a false result:

$ sysctl net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.all.disable_ipv6 = 1
$ python
Python 3.11.8 (main, Feb 24 2024, 17:10:38) [GCC 13.2.1 20240210] on linux
>>> import socket
>>> socket.has_ipv6
True

This patch uses the portage.process.has_ipv6() function,
which returns the correct result.

Bug: https://bugs.gentoo.org/927241
Signed-off-by: Pavel Balaev <mail@void.so>
@floppym
Copy link
Contributor

floppym commented Mar 20, 2024

Perfect, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants