On 14.7.2022. 11:37, Mikolaj Kucharski wrote:
> Hi,
> 
> Per other thread, Theo expressed dissatisfaction with long ifconfig(8)
> for wg(4) interface. Stuart Henderson pointed me at direction, which
> below diff makes it work.
> 
> I guess to questions are:
> 
> - Does the behaviour of ifconfig(8) make sense?
> - Does the code which makes above, make sense?
> 
> This is minimal diff, I would appreciate feedback, I did least
> resistance approach. Looking at diff -wu shows even less changes
> as wg_status() is mainly identation with if-statement.
> 
> 
> Short output by default, only 6 lines, no wgpeers section:
> 
> pce-0067# ifconfig.ifaliases -a | tail -n6
> wg0: flags=80c3<UP,BROADCAST,RUNNING,NOARP,MULTICAST> mtu 1420
>         index 8 priority 0 llprio 3
>         wgport 51820
>         wgpubkey qcb...
>         groups: wg
>         inet6 fde4:f456:48c2:13c0::cc67 prefixlen 64
> 
> 
> Long output with <if> as an argument, wgpeers section present:
> 
> pce-0067# ifconfig.ifaliases wg0
> wg0: flags=80c3<UP,BROADCAST,RUNNING,NOARP,MULTICAST> mtu 1420
>         index 8 priority 0 llprio 3
>         wgport 51820
>         wgpubkey qcb...
>         wgpeer klM...
>                 wgpsk (present)
>                 wgpka 25 (sec)
>                 wgendpoint xxx.xxx.xxx.xxx 51820
>                 tx: 178764, rx: 65100
>                 last handshake: 7 seconds ago
>                 wgaip fde4:f456:48c2:13c0::/64
>         groups: wg
>         inet6 fde4:f456:48c2:13c0::cc67 prefixlen 64
> 
> 
> Above long output works with group as an argument (ifconfig wg) and with
> option -A (ifconfig -A), so I think from user experience perspective,
> works as expected.
> 
> Manual page changes not provided, as I'm not sure are they needed with
> this diff.
> 
> Comments?



Hi,

from my user perspective this is wonderful.
I have 16 wgpeers, 5 vlans, 5 carps, 4 physical interfaces and mostly if
doing ifconfig I want to know if physical interfaces are up and what is
status of carp. I don't need 100 lines of wg stuff in plain ifconifg.

Reply via email to