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

Networkd: LinkLocalAddressing=fallback with MaxAttempts=infinity #13316

Closed
ratagupt opened this issue Aug 13, 2019 · 36 comments · Fixed by #17692
Closed

Networkd: LinkLocalAddressing=fallback with MaxAttempts=infinity #13316

ratagupt opened this issue Aug 13, 2019 · 36 comments · Fixed by #17692
Labels
bug 🐛 Programming errors, that need preferential fixing network
Milestone

Comments

@ratagupt
Copy link

I came across a requirement why the link-local address exists with other IP addresses for IPv4.

Suppose if I enable the link-local address through systemd-networkd then as per the existing

behavior, link-local address(169.254..) will always exist on the interface irrespective of whether static/dynamic address exists or not.

The expectation is if either static/DHCP address exist then the zero-config address should not come even if the zeroconf functionality is enabled.

Is it correct expectation? is it aligned with other operating systems which is not using systemd-networkd as the network manager?

@ssahani
Copy link
Contributor

ssahani commented Aug 13, 2019

@ratagupt
Copy link
Author

ratagupt commented Aug 13, 2019

@ssahani Thanks for quick response

As per the documentation If "fallback" or "ipv4-fallback" is specified, then an IPv4 link-local address is configured only when DHCPv4 fails.

what about if the interface is having Static IP address and DHCP is not enabled, even in that case link-local address should not be seen.

@ssahani
Copy link
Contributor

ssahani commented Aug 13, 2019

what about if the interface is having Static IP address and DHCP is not enabled, even in that case link-local address should not be seen.

I do not follow . Please elaborate.

@yuwata
Copy link
Member

yuwata commented Aug 18, 2019

what about if the interface is having Static IP address and DHCP is not enabled, even in that case link-local address should not be seen.

In that case, why do not you simply set no or ipv6 to LinkLocalAddressing=?

@yuwata yuwata added needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer network labels Aug 18, 2019
@ratagupt
Copy link
Author

ratagupt commented Aug 19, 2019

@ssahani : Suppose my network file is as below.

[Match]
Name=eth0
[Link]
MACAddress=70:e2:84:14:33:65
[Network]
LinkLocalAddressing=ipv4-fallback
Address=9.3.185.83/23
Gateway=9.3.185.1

The above network file works fine for me. It doesn't create the zerconf address if the static address(9.3.185.83) is there.

@ratagupt
Copy link
Author

ratagupt commented Aug 21, 2019

@yuwata > In that case, why do not you simply set no or ipv6 to LinkLocalAddressing=?

               Agree that will also work if I put the LinkLocalAddressing=no/ipv6.

I was looking for generic value which I don't need to change depends on the static/DHCP address configuration on the interface.

fallback serves the purpose.

@ratagupt
Copy link
Author

ratagupt commented Oct 4, 2019

@yuwata @ssahani : with the latest systemd-networkd "fallback" or "ipv4-fallback" doesn't work.
With the below network file, I don't have DHCP server configured in my network so system will not get the DHCP IP and I thought the system will come with link local address but that didn't happen.

systemctl --version
systemd 243 (243+)
+PAM -AUDIT -SELINUX -IMA -APPARMOR -SMACK +SYSVINIT -UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS -ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid

My network file is as below.

[Match]
Name=eth0
[Link]
MACAddress=XX:XX:XX:XX:XX
[Network]
LinkLocalAddressing=fallback
IPv6AcceptRA=false
DHCP=true
[DHCP]
ClientIdentifier=mac
UseDNS=true
UseNTP=true
UseHostname=true
SendHostname=true

Did we make any change around this? Can you also verify this?

@ratagupt ratagupt reopened this Oct 4, 2019
@raviteja-b
Copy link

I too faced same issue, "fallback" option did not work.

@yuwata
Copy link
Member

yuwata commented Oct 9, 2019

Please try MaxAttempts= setting.

@raviteja-b
Copy link

I tried with MaxAttempts=1 setting, but did not work

@ssahani
Copy link
Contributor

ssahani commented Oct 9, 2019

I just tested it .

Pretty sure what @yuwata said works

eth0: Received remembered route: dst: n/a, src: n/a, gw: 192.168.94.2, prefsrc: 192.168.94.177, scope: global, table: main, proto: dhcp, type: unicast
eth0: State changed: configuring -> configured
NDISC: Sent Router Solicitation, next solicitation in 3s
NDISC: Sent Router Solicitation, next solicitation in 3s
DHCP CLIENT (0x9dd5a63c): DISCOVER
DHCP CLIENT (0x9dd5a63c): STOPPED
veth99: DHCP client is stopped. Acquiring IPv4 link-local address
IPV4LL: Picked new IP address 169.254.4.219.
IPV4ACD: Probing 169.254.4.219
NDISC: Sent Router Solicitation, next solicitation in 7s
NDISC: Sent Router Solicitation, next solicitation in 7s
IPV4ACD: Probing 169.254.4.219
IPV4ACD: Probing 169.254.4.219
IPV4ACD: ANNOUNCE
veth99: IPv4 link-loca
8: veth0@veth99: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether aa:bb:7a:85:bf:69 brd ff:ff:ff:ff:ff:ff
    inet 192.168.5.1/24 brd 192.168.5.255 scope global veth0
       valid_lft forever preferred_lft forever
    inet6 fe80::a8bb:7aff:fe85:bf69/64 scope link 
       valid_lft forever preferred_lft forever
19: veth99@veth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 9a:aa:6a:a2:16:c0 brd ff:ff:ff:ff:ff:ff
    inet 169.254.4.219/16 brd 169.254.255.255 scope link veth99
       valid_lft forever preferred_lft forever
    inet6 fe80::98aa:6aff:fea2:16c0/64 scope link 
       valid_lft forever preferred_lft forever
[Match]
Name=veth99

[Network]
DHCP=ipv4
LinkLocalAddressing=fallback
[DHCPv4]
MaxAttempts=1
[Match]
Name=veth0

[Network]
Address=192.168.5.1/24                   

@yuwata
Copy link
Member

yuwata commented Oct 9, 2019

Yeah, our CIs also test the functionality.

@raviteja-b Please provide your .network file.

@raviteja-b
Copy link

Ok. here is my .network file
[Match]
Name=eth0

[Network]
LinkLocalAddressing=fallback
DHCP=true

[DHCP]
MaxAttempts=1

@yuwata
Copy link
Member

yuwata commented Oct 9, 2019

MaxAttempts= should be in [DHCPv4] section, not [DHCP] section.

@ssahani
Copy link
Contributor

ssahani commented Oct 9, 2019

Yes because this is a new setting and we separated dhcp4 and dhcp6.

@raviteja-b
Copy link

yes it works if i keep 'MaxAttempts=' in [DHCPv4] section
what should be the optimum value for MaxAttempts if fallback is configured?
I observed it takes few secs to assign link local address based on MaxAttemts value

@raviteja-b
Copy link

raviteja-b commented Oct 18, 2019

I configured 'LinkLocalAddressing=fallback' and stop DHCP server configured in my network, i see link local address assigned, but i dont see DHCP address assigned after restarting DHCP server,
I think the system will get DHCP address once DHCP server starts running but that didn't happen.

[Network]
LinkLocalAddressing=fallback
DHCP=true

[DHCPv4]
MaxAttempts=2

@yuwata
Copy link
Member

yuwata commented Oct 18, 2019

I think the system will get DHCP address once DHCP server starts running but that didn't happen.

To support this, MaxAttempts= must be infinity. So, unfortunately, that functionality cannot be achieved with LinkLocalAddressing=fallback, at least currently.

@ssahani Maybe, we need to add AttemptsToAssignFallbackLinkLocalAddress= in [DHCPv4].

@yuwata yuwata added RFE 🎁 Request for Enhancement, i.e. a feature request and removed needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer labels Oct 18, 2019
@yuwata yuwata changed the title Networkd: ZeroConf Address Networkd: LinkLocalAddressing=fallback with MaxAttempts=infinity Oct 18, 2019
@ssahani
Copy link
Contributor

ssahani commented Oct 18, 2019

I think it's too complicated.

@yuwata
Copy link
Member

yuwata commented Oct 18, 2019

I think it's too complicated.

Yeah...

@raviteja-b
Copy link

raviteja-b commented Nov 5, 2019

I think we should support fallback with maxAttempts= infinity, otherwise we can't use linkLocalAddressing fallback mechanism.
do we have plan to support this?

@yuwata yuwata added this to the v246 milestone Feb 6, 2020
@nahuel
Copy link

nahuel commented Feb 6, 2020

@ssahani just a final thought, LinkLocalAddressing must be a boolean option, at least for ipv4.

LinkLocalAddressing=no => no LL at all.

LinkLocalAddressing=yes + Static Address => invalid configuration, warn and interpret as LinkLocalAddressing=no, no LL at all.

LinkLocalAddressing=yes + DHCP => LL process should be subordinated to the DHCP one, an LL address must be acquired at start or after a short N unsuccessful DHCP attemps, and must not stop DHCP to keeping trying. When a DHCP address is acquired, drop the LL address. If the DHCP address is lost, re-adquire a new LL address.

LinkLocalAddressing=fallback has no reason to exist, because LL address must always be allocated as a fallback option when using DHCP. Having both DHCP and LL address at the same time is an RFC violation, so LinkLocalAdressing=yes correctly implemented is already the "fallback" behavior. The fallback option must be deprecated and if present in older configs must be interpreted as LinkLocalAddressing=yes.

And for IPv6, the LinkLocalAddress option has any sense at all? IPv6-LL address aren't required to be always set for every IPv6 enabled interface (in this case, coexisting with static or dynamic address if any)? Shouldn't be always =yes?

@rasmuspeders1
Copy link

I just encountered this issue on our embedded Linux platform. In our case it is important that the system "recovers" automatically from using the fallback linklocal address to using an address assigned by DHCP when possible. Therefore I just wanted express my relief that a solution is now scheduled for v246.

@nahuel: I appreciate your effort to thoroughly describe the problem and propose a solution, nice work.

@poettering
Copy link
Member

@yuwata hmm, where are we with this?

@yuwata yuwata modified the milestones: v246, v247 Jun 23, 2020
@poldi871
Copy link

@ssahani just a final thought, LinkLocalAddressing must be a boolean option, at least for ipv4.

LinkLocalAddressing=no => no LL at all.

I deeply agree! I have that problem on an embedded system at the moment. As far as I see it was scheduled as milestone for 246 and hope it will be solved with 247.

@keszybz keszybz self-assigned this Oct 7, 2020
keszybz added a commit to keszybz/systemd that referenced this issue Oct 9, 2020
…lues

They are not really boolean, because we have both ipv4 and ipv6, but
for each protocol we have either unset, no, and yes.

From systemd#13316 (comment):
LinkLocalAddressing must be a boolean option, at least for ipv4:
- LinkLocalAddressing=no => no LL at all.

- LinkLocalAddressing=yes + Static Address => invalid configuration, warn and
  interpret as LinkLocalAddressing=no, no LL at all.

(we check that during parsing and reject)

- LinkLocalAddressing=yes + DHCP => LL process should be subordinated to the
  DHCP one, an LL address must be acquired at start or after a short N
  unsuccessful DHCP attemps, and must not stop DHCP to keeping trying. When a
  DHCP address is acquired, drop the LL address. If the DHCP address is lost,
  re-adquire a new LL address.

(next patch will move in this direction)

- LinkLocalAddressing=fallback has no reason to exist, because LL address must
  always be allocated as a fallback option when using DHCP. Having both DHCP
  and LL address at the same time is an RFC violation, so
  LinkLocalAdressing=yes correctly implemented is already the "fallback"
  behavior. The fallback option must be deprecated and if present in older
  configs must be interpreted as LinkLocalAddressing=yes.

(removed)

- And for IPv6, the LinkLocalAddress option has any sense at all? IPv6-LL
  address aren't required to be always set for every IPv6 enabled interface (in
  this case, coexisting with static or dynamic address if any)? Shouldn't be
  always =yes?

(good question)

This effectively reverts 29e8108. There is no
special "fallback" mode now, so the check doesn't make sense anymore.
keszybz added a commit to keszybz/systemd that referenced this issue Oct 9, 2020
@keszybz keszybz removed their assignment Nov 17, 2020
yuwata pushed a commit to yuwata/systemd that referenced this issue Nov 23, 2020
…lues

They are not really boolean, because we have both ipv4 and ipv6, but
for each protocol we have either unset, no, and yes.

From systemd#13316 (comment):
LinkLocalAddressing must be a boolean option, at least for ipv4:
- LinkLocalAddressing=no => no LL at all.

- LinkLocalAddressing=yes + Static Address => invalid configuration, warn and
  interpret as LinkLocalAddressing=no, no LL at all.

(we check that during parsing and reject)

- LinkLocalAddressing=yes + DHCP => LL process should be subordinated to the
  DHCP one, an LL address must be acquired at start or after a short N
  unsuccessful DHCP attemps, and must not stop DHCP to keeping trying. When a
  DHCP address is acquired, drop the LL address. If the DHCP address is lost,
  re-adquire a new LL address.

(next patch will move in this direction)

- LinkLocalAddressing=fallback has no reason to exist, because LL address must
  always be allocated as a fallback option when using DHCP. Having both DHCP
  and LL address at the same time is an RFC violation, so
  LinkLocalAdressing=yes correctly implemented is already the "fallback"
  behavior. The fallback option must be deprecated and if present in older
  configs must be interpreted as LinkLocalAddressing=yes.

(removed)

- And for IPv6, the LinkLocalAddress option has any sense at all? IPv6-LL
  address aren't required to be always set for every IPv6 enabled interface (in
  this case, coexisting with static or dynamic address if any)? Shouldn't be
  always =yes?

(good question)

This effectively reverts 29e8108. There is no
special "fallback" mode now, so the check doesn't make sense anymore.
yuwata pushed a commit to yuwata/systemd that referenced this issue Nov 23, 2020
yuwata pushed a commit to yuwata/systemd that referenced this issue Nov 23, 2020
…lues

They are not really boolean, because we have both ipv4 and ipv6, but
for each protocol we have either unset, no, and yes.

From systemd#13316 (comment):
LinkLocalAddressing must be a boolean option, at least for ipv4:
- LinkLocalAddressing=no => no LL at all.

- LinkLocalAddressing=yes + Static Address => invalid configuration, warn and
  interpret as LinkLocalAddressing=no, no LL at all.

(we check that during parsing and reject)

- LinkLocalAddressing=yes + DHCP => LL process should be subordinated to the
  DHCP one, an LL address must be acquired at start or after a short N
  unsuccessful DHCP attemps, and must not stop DHCP to keeping trying. When a
  DHCP address is acquired, drop the LL address. If the DHCP address is lost,
  re-adquire a new LL address.

(next patch will move in this direction)

- LinkLocalAddressing=fallback has no reason to exist, because LL address must
  always be allocated as a fallback option when using DHCP. Having both DHCP
  and LL address at the same time is an RFC violation, so
  LinkLocalAdressing=yes correctly implemented is already the "fallback"
  behavior. The fallback option must be deprecated and if present in older
  configs must be interpreted as LinkLocalAddressing=yes.

(removed)

- And for IPv6, the LinkLocalAddress option has any sense at all? IPv6-LL
  address aren't required to be always set for every IPv6 enabled interface (in
  this case, coexisting with static or dynamic address if any)? Shouldn't be
  always =yes?

(good question)

This effectively reverts 29e8108. There is no
special "fallback" mode now, so the check doesn't make sense anymore.
yuwata pushed a commit to yuwata/systemd that referenced this issue Nov 23, 2020
yuwata pushed a commit to yuwata/systemd that referenced this issue Nov 23, 2020
…lues

They are not really boolean, because we have both ipv4 and ipv6, but
for each protocol we have either unset, no, and yes.

From systemd#13316 (comment):
LinkLocalAddressing must be a boolean option, at least for ipv4:
- LinkLocalAddressing=no => no LL at all.

- LinkLocalAddressing=yes + Static Address => invalid configuration, warn and
  interpret as LinkLocalAddressing=no, no LL at all.

(we check that during parsing and reject)

- LinkLocalAddressing=yes + DHCP => LL process should be subordinated to the
  DHCP one, an LL address must be acquired at start or after a short N
  unsuccessful DHCP attemps, and must not stop DHCP to keeping trying. When a
  DHCP address is acquired, drop the LL address. If the DHCP address is lost,
  re-adquire a new LL address.

(next patch will move in this direction)

- LinkLocalAddressing=fallback has no reason to exist, because LL address must
  always be allocated as a fallback option when using DHCP. Having both DHCP
  and LL address at the same time is an RFC violation, so
  LinkLocalAdressing=yes correctly implemented is already the "fallback"
  behavior. The fallback option must be deprecated and if present in older
  configs must be interpreted as LinkLocalAddressing=yes.

(removed)

- And for IPv6, the LinkLocalAddress option has any sense at all? IPv6-LL
  address aren't required to be always set for every IPv6 enabled interface (in
  this case, coexisting with static or dynamic address if any)? Shouldn't be
  always =yes?

(good question)

This effectively reverts 29e8108. There is no
special "fallback" mode now, so the check doesn't make sense anymore.
yuwata pushed a commit to yuwata/systemd that referenced this issue Nov 23, 2020
@keszybz keszybz modified the milestones: v247, v248 Nov 26, 2020
yuwata pushed a commit to yuwata/systemd that referenced this issue Nov 27, 2020
…lues

They are not really boolean, because we have both ipv4 and ipv6, but
for each protocol we have either unset, no, and yes.

From systemd#13316 (comment):
LinkLocalAddressing must be a boolean option, at least for ipv4:
- LinkLocalAddressing=no => no LL at all.

- LinkLocalAddressing=yes + Static Address => invalid configuration, warn and
  interpret as LinkLocalAddressing=no, no LL at all.

(we check that during parsing and reject)

- LinkLocalAddressing=yes + DHCP => LL process should be subordinated to the
  DHCP one, an LL address must be acquired at start or after a short N
  unsuccessful DHCP attemps, and must not stop DHCP to keeping trying. When a
  DHCP address is acquired, drop the LL address. If the DHCP address is lost,
  re-adquire a new LL address.

(next patch will move in this direction)

- LinkLocalAddressing=fallback has no reason to exist, because LL address must
  always be allocated as a fallback option when using DHCP. Having both DHCP
  and LL address at the same time is an RFC violation, so
  LinkLocalAdressing=yes correctly implemented is already the "fallback"
  behavior. The fallback option must be deprecated and if present in older
  configs must be interpreted as LinkLocalAddressing=yes.

(removed)

- And for IPv6, the LinkLocalAddress option has any sense at all? IPv6-LL
  address aren't required to be always set for every IPv6 enabled interface (in
  this case, coexisting with static or dynamic address if any)? Shouldn't be
  always =yes?

(good question)

This effectively reverts 29e8108. There is no
special "fallback" mode now, so the check doesn't make sense anymore.
yuwata pushed a commit to yuwata/systemd that referenced this issue Nov 27, 2020
yuwata pushed a commit to yuwata/systemd that referenced this issue Nov 30, 2020
…lues

They are not really boolean, because we have both ipv4 and ipv6, but
for each protocol we have either unset, no, and yes.

From systemd#13316 (comment):
LinkLocalAddressing must be a boolean option, at least for ipv4:
- LinkLocalAddressing=no => no LL at all.

- LinkLocalAddressing=yes + Static Address => invalid configuration, warn and
  interpret as LinkLocalAddressing=no, no LL at all.

(we check that during parsing and reject)

- LinkLocalAddressing=yes + DHCP => LL process should be subordinated to the
  DHCP one, an LL address must be acquired at start or after a short N
  unsuccessful DHCP attemps, and must not stop DHCP to keeping trying. When a
  DHCP address is acquired, drop the LL address. If the DHCP address is lost,
  re-adquire a new LL address.

(next patch will move in this direction)

- LinkLocalAddressing=fallback has no reason to exist, because LL address must
  always be allocated as a fallback option when using DHCP. Having both DHCP
  and LL address at the same time is an RFC violation, so
  LinkLocalAdressing=yes correctly implemented is already the "fallback"
  behavior. The fallback option must be deprecated and if present in older
  configs must be interpreted as LinkLocalAddressing=yes.

(removed)

- And for IPv6, the LinkLocalAddress option has any sense at all? IPv6-LL
  address aren't required to be always set for every IPv6 enabled interface (in
  this case, coexisting with static or dynamic address if any)? Shouldn't be
  always =yes?

(good question)

This effectively reverts 29e8108. There is no
special "fallback" mode now, so the check doesn't make sense anymore.
yuwata pushed a commit to yuwata/systemd that referenced this issue Nov 30, 2020
pdmorrow pushed a commit to pdmorrow/systemd that referenced this issue Dec 3, 2020
…lues

They are not really boolean, because we have both ipv4 and ipv6, but
for each protocol we have either unset, no, and yes.

From systemd#13316 (comment):
LinkLocalAddressing must be a boolean option, at least for ipv4:
- LinkLocalAddressing=no => no LL at all.

- LinkLocalAddressing=yes + Static Address => invalid configuration, warn and
  interpret as LinkLocalAddressing=no, no LL at all.

(we check that during parsing and reject)

- LinkLocalAddressing=yes + DHCP => LL process should be subordinated to the
  DHCP one, an LL address must be acquired at start or after a short N
  unsuccessful DHCP attemps, and must not stop DHCP to keeping trying. When a
  DHCP address is acquired, drop the LL address. If the DHCP address is lost,
  re-adquire a new LL address.

(next patch will move in this direction)

- LinkLocalAddressing=fallback has no reason to exist, because LL address must
  always be allocated as a fallback option when using DHCP. Having both DHCP
  and LL address at the same time is an RFC violation, so
  LinkLocalAdressing=yes correctly implemented is already the "fallback"
  behavior. The fallback option must be deprecated and if present in older
  configs must be interpreted as LinkLocalAddressing=yes.

(removed)

- And for IPv6, the LinkLocalAddress option has any sense at all? IPv6-LL
  address aren't required to be always set for every IPv6 enabled interface (in
  this case, coexisting with static or dynamic address if any)? Shouldn't be
  always =yes?

(good question)

This effectively reverts 29e8108. There is no
special "fallback" mode now, so the check doesn't make sense anymore.
pdmorrow pushed a commit to pdmorrow/systemd that referenced this issue Dec 3, 2020
aj-bagwell pushed a commit to aj-bagwell/systemd that referenced this issue Jan 7, 2021
…lues

They are not really boolean, because we have both ipv4 and ipv6, but
for each protocol we have either unset, no, and yes.

From systemd#13316 (comment):
LinkLocalAddressing must be a boolean option, at least for ipv4:
- LinkLocalAddressing=no => no LL at all.

- LinkLocalAddressing=yes + Static Address => invalid configuration, warn and
  interpret as LinkLocalAddressing=no, no LL at all.

(we check that during parsing and reject)

- LinkLocalAddressing=yes + DHCP => LL process should be subordinated to the
  DHCP one, an LL address must be acquired at start or after a short N
  unsuccessful DHCP attemps, and must not stop DHCP to keeping trying. When a
  DHCP address is acquired, drop the LL address. If the DHCP address is lost,
  re-adquire a new LL address.

(next patch will move in this direction)

- LinkLocalAddressing=fallback has no reason to exist, because LL address must
  always be allocated as a fallback option when using DHCP. Having both DHCP
  and LL address at the same time is an RFC violation, so
  LinkLocalAdressing=yes correctly implemented is already the "fallback"
  behavior. The fallback option must be deprecated and if present in older
  configs must be interpreted as LinkLocalAddressing=yes.

(removed)

- And for IPv6, the LinkLocalAddress option has any sense at all? IPv6-LL
  address aren't required to be always set for every IPv6 enabled interface (in
  this case, coexisting with static or dynamic address if any)? Shouldn't be
  always =yes?

(good question)

This effectively reverts 29e8108. There is no
special "fallback" mode now, so the check doesn't make sense anymore.
aj-bagwell pushed a commit to aj-bagwell/systemd that referenced this issue Jan 7, 2021
Yamakuzure pushed a commit to elogind/elogind that referenced this issue Aug 25, 2021
…lues

They are not really boolean, because we have both ipv4 and ipv6, but
for each protocol we have either unset, no, and yes.

From systemd/systemd#13316 (comment):
LinkLocalAddressing must be a boolean option, at least for ipv4:
- LinkLocalAddressing=no => no LL at all.

- LinkLocalAddressing=yes + Static Address => invalid configuration, warn and
  interpret as LinkLocalAddressing=no, no LL at all.

(we check that during parsing and reject)

- LinkLocalAddressing=yes + DHCP => LL process should be subordinated to the
  DHCP one, an LL address must be acquired at start or after a short N
  unsuccessful DHCP attemps, and must not stop DHCP to keeping trying. When a
  DHCP address is acquired, drop the LL address. If the DHCP address is lost,
  re-adquire a new LL address.

(next patch will move in this direction)

- LinkLocalAddressing=fallback has no reason to exist, because LL address must
  always be allocated as a fallback option when using DHCP. Having both DHCP
  and LL address at the same time is an RFC violation, so
  LinkLocalAdressing=yes correctly implemented is already the "fallback"
  behavior. The fallback option must be deprecated and if present in older
  configs must be interpreted as LinkLocalAddressing=yes.

(removed)

- And for IPv6, the LinkLocalAddress option has any sense at all? IPv6-LL
  address aren't required to be always set for every IPv6 enabled interface (in
  this case, coexisting with static or dynamic address if any)? Shouldn't be
  always =yes?

(good question)

This effectively reverts 29e81083bd2fcb2dbf83f67ef358c7d25adf7e9d. There is no
special "fallback" mode now, so the check doesn't make sense anymore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Programming errors, that need preferential fixing network
Development

Successfully merging a pull request may close this issue.

9 participants