ipn: pass through the prefix length from control.

Control sets this to /32 for IPv4 and /128 for IPv6.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson 2020-12-01 20:08:55 -08:00
parent 4c8ccd6dd6
commit dfbde3d3aa

View File

@ -1257,7 +1257,7 @@ func routerConfig(cfg *wgcfg.Config, prefs *Prefs) *router.Config {
for _, addr := range cfg.Addresses {
addrs = append(addrs, wgcfg.CIDR{
IP: addr.IP,
Mask: 32,
Mask: addr.Mask,
})
}