]> git.ipfire.org Git - thirdparty/systemd.git/commit
libsystemd-network: ipv4ll probe conflict counter (#5361)
authorJason Reeder <jasonreeder@gmail.com>
Thu, 16 Feb 2017 10:14:38 +0000 (04:14 -0600)
committerLennart Poettering <lennart@poettering.net>
Thu, 16 Feb 2017 10:14:38 +0000 (11:14 +0100)
commit0cbc024d591e1b1095d90494e0337dabd9ef2e19
tree57390c3c4240bd0f350a66d85606daf139cc04cc
parent11814bbbae6674a12cfc1d82db4b44653696a674
libsystemd-network: ipv4ll probe conflict counter (#5361)

A bug exists where the conflict counter is cleared
regardless of whether or not the next probe attempt leads to
a successful address acquisition. This causes 'bursts' of
MAX_CONFLICTS probes followed by a delay of
RATE_LIMIT_INTERVAL instead of a single probe each
RATE_LIMIT_INTERVAL when beyond MAX_CONFLICTS.

The conflict counter should only be cleared after an
address is successfully acquired. This commit achieves that
goal.

From RFC3927:
A host should maintain a counter of the number of address
conflicts it has experienced in the process of trying to
acquire an address, and if the number of conflicts exceeds
MAX_CONFLICTS then the host MUST limit the rate at which it
probes for new addresses to no more than one new address per
RATE_LIMIT_INTERVAL.  This is to prevent catastrophic ARP
storms in pathological failure cases, such as a rogue host
that answers all ARP probes, causing legitimate hosts to go
into an infinite loop attempting to select a usable address.

Signed-off-by: Jason Reeder <jasonreeder@gmail.com>
src/libsystemd-network/sd-ipv4acd.c