HomeFreeBSD

ifconfig: fix incorrect wg allowed-ips netmask

Description

ifconfig: fix incorrect wg allowed-ips netmask

Currently when peer information is displayed with ifconfig wgN peer ..
or ifconfig wgN peer-list, the netmask of the first allowed-ips will
be used as the netmask of all CIDR in allowed-ips. For example, if
the list is 192.168.1.0/24, 172.16.0.0/16, it will display as
192.168.1.0/24, 172.16.0.0/24. While this does not affect the actual
functionality, it is very confusing.

Submitted by: Michael Chiu <nyan -at- myuji.xyz>
Reviewed by: grehan
Differential Revision: https://reviews.freebsd.org/D28655

(cherry picked from commit be2003ccfa1b12f372fa1329c38c29fe035f232f)

Details

Provenance
nyan_myuji.xyzAuthored on Feb 15 2021, 12:38 AM
philipCommitted on Feb 16 2021, 12:47 AM
Reviewer
grehan
Differential Revision
D28655: ifconfig-wg fix incorrect allowed-ips netmask info
Parents
rG6bb08afcf971: MFC 57785538c6e0d7e8ca0f161ab95bae10fd304047 and
Branches
Unknown
Tags
Unknown