Summary: | [patch] A little change to ifconfig(8) to display CIDR prefixes instead of hex masks | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Vitaliy Turovets <corebug> | ||||
Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | CC: | allanjude | ||||
Priority: | Normal | ||||||
Version: | Unspecified | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Vitaliy Turovets
2012-06-14 16:50:01 UTC
A commit references this bug: Author: allanjude Date: Tue May 31 17:30:08 UTC 2016 New revision: 301059 URL: https://svnweb.freebsd.org/changeset/base/301059 Log: ifconfig(8) now supports some output formatting options specified by the -f flag or IFCONFIG_FORMAT environment variable, the user can request that inet4 subnet masks be printed in CIDR or dotted-quad notation, in addition to the traditional hex output. inet6 prefixes can be printed in CIDR as well. For more documentation see the ifconfig(8) man page. PR: 169072 Requested by: seanc, marcel, brd, many others Reviewed by: gnn, jhb (earlier version) Relnotes: yes Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D2856 Changes: head/sbin/ifconfig/af_inet.c head/sbin/ifconfig/af_inet6.c head/sbin/ifconfig/af_link.c head/sbin/ifconfig/ifconfig.8 head/sbin/ifconfig/ifconfig.c You can now select between hex, dotted (255.255.255.0), and CIDR (/24) like so: ifconfig -f inet:dotted or set IFCONFIG_FORMAT=inet:cidr |