HomeFreeBSD

netlink: fix ifaddr reporting.

Description

netlink: fix ifaddr reporting.

Output the proper attributes for IPv4/IPvv6 ifaddrs:

  • IFA_ADDRESS contains local address in every case except p2p, in that case it contains the peer address
  • IFA_LOCAL contains local address. It is always present in IPv4, or in IPv6/p2p.
  • IFA_BROADCAST contains the network broadcast address (if any)

Reported by: Adam Wood <aswood@gmail.com>
Tested by: Adam Wood <aswood@gmail.com>

(cherry picked from commit 13214c601a49d733bd17d42b927788bb9feea536)

Details

Provenance
melifaroAuthored on Jan 6 2023, 7:13 PM
Parents
rG176e0427b208: testing: add python test examples
Branches
Unknown
Tags
Unknown