Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netstat(1): increase width of Netif column #1223

Merged
merged 2 commits into from
May 16, 2024

Conversation

llfw
Copy link
Contributor

@llfw llfw commented May 8, 2024

The previous width of Netif (10 or 8) was too short for modern interface names; make it 12, which is long enough to display "epair0a.1000".

This came up in practice with genet(4) interfaces, since the base interface name is long enough that with the previous limit, VLAN identifiers would be truncated at 1 character in the IPv6 output: "genet0.100" becomes "genet0.1".

The width is now fixed, and doesn't depend on the address family, because there's no reason that length of the interface name would vary based on the AF.

@llfw llfw changed the title netstat(8): increase width of Netif column netstat(1): increase width of Netif column May 8, 2024
@llfw
Copy link
Contributor Author

llfw commented May 14, 2024

updated to use IFNAMSIZ if -W is specified, per @gmshake.

Copy link
Member

@bsdimp bsdimp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to my eye and seems to address review comments.

@gmshake
Copy link
Contributor

gmshake commented May 16, 2024

updated to use IFNAMSIZ if -W is specified, per @gmshake.

Please give me some time to have a test ...

llfw added 2 commits May 16, 2024 11:07
The previous width of Netif (10 or 8) was too short for modern interface
names; make it 12, which is long enough to display "epair0a.1000".

This came up in practice with genet(4) interfaces, since the base
interface name is long enough that with the previous limit, VLAN
identifiers would be truncated at 1 character in the IPv6 output:
"genet0.100" becomes "genet0.1".

The width is now fixed, and doesn't depend on the address family,
because there's no reason that length of the interface name would vary
based on the AF.

Reviewed by: imp,zlei,Mina Galić
Pull Request: freebsd#1223
If -W is specified, use IFNAMSIZ as the width of the Netif column,
instead of the default 12.

Reviewed by: imp,zlei,Mina Galić
Pull Request: freebsd#1223
@freebsd-git freebsd-git merged commit ae9c0ba into freebsd:main May 16, 2024
7 of 9 checks passed
@gmshake
Copy link
Contributor

gmshake commented May 17, 2024

Looks good to me. And @bsdimp has landed the commits .

bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request Aug 28, 2024
The previous width of Netif (10 or 8) was too short for modern interface
names; make it 12, which is long enough to display "epair0a.1000".

This came up in practice with genet(4) interfaces, since the base
interface name is long enough that with the previous limit, VLAN
identifiers would be truncated at 1 character in the IPv6 output:
"genet0.100" becomes "genet0.1".

The width is now fixed, and doesn't depend on the address family,
because there's no reason that length of the interface name would vary
based on the AF.

Reviewed by: imp,zlei,Mina Galić
Pull Request: freebsd/freebsd-src#1223
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request Aug 28, 2024
If -W is specified, use IFNAMSIZ as the width of the Netif column,
instead of the default 12.

Reviewed by: imp,zlei,Mina Galić
Pull Request: freebsd/freebsd-src#1223
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request Aug 29, 2024
The previous width of Netif (10 or 8) was too short for modern interface
names; make it 12, which is long enough to display "epair0a.1000".

This came up in practice with genet(4) interfaces, since the base
interface name is long enough that with the previous limit, VLAN
identifiers would be truncated at 1 character in the IPv6 output:
"genet0.100" becomes "genet0.1".

The width is now fixed, and doesn't depend on the address family,
because there's no reason that length of the interface name would vary
based on the AF.

Reviewed by: imp,zlei,Mina Galić
Pull Request: freebsd/freebsd-src#1223
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request Aug 29, 2024
If -W is specified, use IFNAMSIZ as the width of the Netif column,
instead of the default 12.

Reviewed by: imp,zlei,Mina Galić
Pull Request: freebsd/freebsd-src#1223
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants