ifconfig output: ipv4 netmask format
dieterbsd at engineer.com
dieterbsd at engineer.com
Sat Apr 9 16:51:26 UTC 2011
Paul Schenkeveld writes:
> Although non-contiguous netmasks are not legal anymore in IPv4, our
> ifconfig still allows to do something like:
>
> # ifconfig em0 inet 10.0.5.2 netmask 255.0.255.0
> # ifconfig em0
> em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0
mtu 1500
>
options=219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_M
AGIC>
> ether xx:xx:xx:xx:xx:xx
> inet 10.0.5.2 netmask 0xff00ff00 broadcast 10.255.5.255
> media: Ethernet autoselect (1000baseT <full-duplex>)
> status: active
If this is no longer legal, should ifconfig issue a warning?
J. Hellenthal writes:
> This is the year 2011 right ? when are we going to support new users
> rather than supporting old outdated washed up "scripts" ?
Change for the sake of change is not progress. Perhaps when you get
more experience you will understand the "joy" of spending massive
amounts
of time attempting to deal with gratuitious changes. Personally, I'd
prefer to be spending my time fixing things that are truly broken
rather than repainting the bikeshed in today's fashionable color.
And unfortunately there are things that are badly broken. Things that
cause data loss. Hardware that isn't supported properly. Some of
these are in the PR database if you need a list of useful things to
work on.
As far as ifconfig goes, I'm in the camp that says
1) Leave the default alone to avoid breaking scripts.
2) Add an option for those who want it. (Put some thought into
it, don't just do the first thing that springs to mind.)
3) Those that want a different default can use an alias.
More information about the freebsd-hackers
mailing list