Overview -------- `ifconfig -f addr:host` does not properly truncate the fully qualify host name. Steps to Reproduce ------------------ ifconfig vmx0 172.16.129.101/24 up echo '172.16.129.101 dut.example.com' >> /etc/hosts ifconfig -f addr:host vmx0 Actual Results -------------- inet dut.example.com netmask 0xffffff00 broadcast 172.16.129.255 Exepcted Results ---------------- inet dut netmask 0xffffff00 broadcast 172.16.129.255 Additional Information ---------------------- In getnameinfo_inet(), it seems that NI_NOFQDN flag is deliberately ignored because it's messy to determine whether or not the host is local. #if 0 /* * commented out, since "for local host" is not * implemented here - see RFC2553 p30 */ if (flags & NI_NOFQDN) { char *p; p = strchr(hp->h_name, '.'); if (p) *p = '\0'; } #endif If no change is made to getnameinfo_inet(), at the very least ifconfig should perform the truncation.