sd-ipv4ll: Add reference counting for IPv4LL

System Internals / systemd - Patrik Flykt [linux.intel.com] - 11 April 2014 02:53 UTC

Similar to DHCP, the IPv4LL library user can decide to free the LL client any time the callback is called. Guard against freeing the LL client in the callback by introducing proper reference counting.

Also update code using the IPv4LL library to properly handle a returned NULL from the notify and stop functions if the IPv4LL client was freed.

56cd007 sd-ipv4ll: Add reference counting for IPv4LL
src/libsystemd-network/sd-ipv4ll.c | 84 +++++++++++++++++++++++++-----------
src/network/networkd-link.c | 2 +-
src/systemd/sd-ipv4ll.h | 5 ++-
3 files changed, 63 insertions(+), 28 deletions(-)

Upstream: github.com


  • Share