network: make address_get() work for null address
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 7 Jul 2023 02:24:03 +0000 (11:24 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 7 Jul 2023 10:11:37 +0000 (19:11 +0900)
commitd0009d929037e680cb26c59bc20f6d3b9d93b219
tree841e0deaacf35f9462a235eb8e2200dcfd82673d
parent9684a8ded083dd427f843b0c40aa0292e6c7ae06
network: make address_get() work for null address

When a static null address is requested, e.g. Address=0.0.0.0/24,
then the corresponding Address object owned by Network object has
null address, and previously it did not match any addresses already
assigne to the interface.

Let's search matching Address object when originally it is requested as
the null address.

Then, the address configured with requested as a null address will be
kept on reconfigure.

Fixes #26113.
src/network/networkd-address.c
src/network/networkd-address.h