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

nlpacket: use IFA_LOCAL if exist #161

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aderumier
Copy link
Contributor

we should use IFA_LOCAL first if it's exist.
Currently, when a peer is defined (with pointopoint option for example)
the IFA_ADDRESS is replaced by the peer address

ipv6 don't have IFA_LOCAL by default, only when a peer exist

ipv6 with peer

auto eno4
iface eno4
address 2a0a:1580:2000:100::e/64
pointopoint 2a0a:1580:2000:100::1

{   'attrs': [   ('IFA_LOCAL', '2a0a:1580:2000:100::e'),
                 ('IFA_ADDRESS', '2a0a:1580:2000:100::1'),

ipv6 without peer

auto eno4
iface eno4
address 2a0a:1580:2000:100::e/64

{   'attrs': [   ('IFA_ADDRESS', '2a0a:1580:2000:100::e'),

ipv4 with peer
iface eno3
address 192.168.0.2/32
pointopoint 192.168.0.254

{   'attrs': [   ('IFA_ADDRESS', '192.168.0.254'),
                 ('IFA_LOCAL', '192.168.0.2'),

ipv4 without peer

iface eno3
address 192.168.0.2/32

{   'attrs': [   ('IFA_ADDRESS', '192.168.0.2'),
                 ('IFA_LOCAL', '192.168.0.2'),

we should use IFA_LOCAL first if it's exist.
Currently, when a peer is defined (with pointopoint option for example)
the IFA_ADDRESS is replaced by the peer address

ipv6 don't have IFA_LOCAL by default, only when a peer exist

ipv6 with peer

auto eno4
iface eno4
        address  2a0a:1580:2000:100::e/64
        pointopoint 2a0a:1580:2000:100::1

    {   'attrs': [   ('IFA_LOCAL', '2a0a:1580:2000:100::e'),
                     ('IFA_ADDRESS', '2a0a:1580:2000:100::1'),
ipv6 without peer

auto eno4
iface eno4
        address  2a0a:1580:2000:100::e/64

    {   'attrs': [   ('IFA_ADDRESS', '2a0a:1580:2000:100::e'),

ipv4 with peer
iface eno3
        address  192.168.0.2/32
       pointopoint 192.168.0.254

    {   'attrs': [   ('IFA_ADDRESS', '192.168.0.254'),
                     ('IFA_LOCAL', '192.168.0.2'),
ipv4 without peer

iface eno3
        address  192.168.0.2/32

    {   'attrs': [   ('IFA_ADDRESS', '192.168.0.2'),
                     ('IFA_LOCAL', '192.168.0.2'),
@svenauhagen
Copy link
Contributor

@aderumier I just saw your PR.
I stumbled upon that as well on a PPPoE connection, IFA_LOCAL should always be used first and IFA_ADDRESS second if not set as a general rule.
@julienfortin any way you can have a look at the PR?

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

Successfully merging this pull request may close these issues.

2 participants