Date: Mon, 12 Apr 2021 20:55:20 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 255019] ifconfig -f addr:host and ifconfig -f addr:fqdn return the same value Message-ID: <bug-255019-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255019 Bug ID: 255019 Summary: ifconfig -f addr:host and ifconfig -f addr:fqdn return the same value Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: jcaplan@blackberry.com Overview -------- `ifconfig -f addr:host` does not properly truncate the fully qualify host n= ame. 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=20 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 =3D strchr(hp->h_name, '.'); if (p) *p =3D '\0'; } #endif If no change is made to getnameinfo_inet(), at the very least ifconfig shou= ld perform the truncation. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-255019-227>