Hello list!

Since the early days ifconfig(8) has the following functionality:

..
     address
For the DARPA-Internet family, the address is either a host name present in the host name data base, hosts(5), or a DARPA Internet
             address expressed in the Internet standard “dot notation”.

E.g. one can write `ifconfig em0 some_possibly_unqualified_fqdn` and get
inet address assigned to the card with classful mask.

Now this can lead to "fun" things if you have misprinted some keyword and this keyword exists in the local DNS zone (or wildcard is configured).

The most favorite one (we have wilcard configured in one of our search zones):
18:45 [0] dhcp170-36-red# ifconfig vlan123 desroy
18:45 [0] dhcp170-36-red# echo $?
0
18:45 [0] dhcp170-36-red# ifconfig vlan123
vlan123: flags=8003<UP,BROADCAST,MULTICAST> metric 0 mtu 1500
        ether 00:00:00:00:00:00
        inet 213.180.204.242 netmask 0xffffff00 broadcast 213.180.204.255
        inet6 fe80::222:4dff:fe50:cd2f%vlan123 prefixlen 64 scopeid 0xd
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        vlan: 0 parent interface: <none>

This is also one of the reasons why ifconfig sometimes "hangs" on invalid input. Moreover, ifconfig em0 some_valid_fqdn/MASK silently ignores it, so you can't set valid CIDR address using this notation.

Classful era has ended more than 10 years ago, do we still want to keep this behavior?


--
WBR, Alexander
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

Reply via email to