HomeFreeBSD

ifconfig: improve error checking for carp peer6

Description

ifconfig: improve error checking for carp peer6

getaddrinfo() returns 0 if it succeeded, but it's not guaranteed to
return 1 on error. Check for success rather than for one specific error.

Without this fix commands such as `ifconfig bnxt1 inet6 add vhid 1 peer6
2001:db8::1/64` would segfault ifconfig.

Sponsored by: Rubicon Communications, LLC ("Netgate")

Details

Provenance
kpAuthored on May 17 2023, 7:39 PM
Parents
rG2e6756b752e0: ifconfig: improve trimming off interface number at end
Branches
Unknown
Tags
Unknown