Date: Thu, 07 Dec 2023 04:16:26 +0000 From: bugzilla-noreply@freebsd.org To: standards@FreeBSD.org Subject: [Bug 275586] Undocumented feature of ifconfig UP Message-ID: <bug-275586-99@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D275586 Bug ID: 275586 Summary: Undocumented feature of ifconfig UP Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: standards Assignee: standards@FreeBSD.org Reporter: on@cs.ait.ac.th I am not sure whether it is an undocumented feature or a bug but "ifconfig = UP" behaves differently from "ifconfig up". I cannot say for how long this behaviour has been going on, I only recently discovered it, but it is affec= ting any 13.2-p5 RELEASE system I have tested. To reproduce the problem: "ifconfig up" is working as documented/expected: $ ifconfig tap0 create $ ifconfig tap0 up $ ifconfig tap0 tap0: flags=3D8803<UP,BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=3D80000<LINKSTATE> ether 58:9c:fc:10:a4:65 groups: tap media: Ethernet autoselect status: no carrier nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> $ arp -a | grep 192.41.170.42 While "ifconfig UP" is acting up: Reboot the system, then... $ ifconfig tap0 create $ ifconfig tap0 UP ifconfig: WARNING: setting interface address without mask is deprecated, default mask may not be correct. $ ifconfig tap0 tap0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=3D80000<LINKSTATE> ether 58:9c:fc:10:a4:65 inet 192.41.170.42 netmask 0xffffff00 broadcast 192.41.170.255 groups: tap media: Ethernet autoselect status: no carrier nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> $ arp -a | grep 192.41.170.42 www.cs.ait.ac.th (192.41.170.42) at 58:9c:fc:10:a4:65 on tap0 permanent [ethernet] An IP address has been assigned to the tap0 interface (it happens to be the= IP of my web server, why?) even though the tap0 interface is not yet connected= to anything. As a corollary, the machine may respond to ARP requests, giving a bogus MAC address for the IP 192.41.170.42 and causing problems on my network. Solution: Always use "ifconfig up". But if it gives weird results and if not document= ed, why keeping "ifconfig UP". I have not tested it, but it seems there is also a problem with "ifconfig D= OWN" vs. "ifconfig down". --=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-275586-99>