HomeFreeBSD

Restore historical behavior of in_control, which, when no matching address

Description

Restore historical behavior of in_control, which, when no matching address
is found, the first usable address is returned for legacy ioctls like
SIOCGIFBRDADDR, SIOCGIFDSTADDR, SIOCGIFNETMASK and SIOCGIFADDR.

While there also fix a subtle issue that a caller from a jail asking for
INADDR_ANY may get the first IP of the host that do not belong to the jail.

Submitted by: glebius
Differential Revision: https://reviews.freebsd.org/D667

Event Timeline