]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ifconfig: fix incorrect wg allowed-ips netmask
authorMichael Chiu <nyan@myuji.xyz>
Mon, 15 Feb 2021 00:38:26 +0000 (00:38 +0000)
committerPhilip Paeps <philip@FreeBSD.org>
Tue, 16 Feb 2021 21:11:45 +0000 (05:11 +0800)
commitf28545524cb197a5df9ebd8d2019f200801d538a
treecdc8927a64df8c0e0469974c4291d70cd5e3fc49
parent4689ab1eab624d1a551a5a8f109383ea18eeba20
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
Approved by:    re (gjb)

(cherry picked from commit be2003ccfa1b12f372fa1329c38c29fe035f232f)
sbin/ifconfig/ifwg.c