device: fix nil pointer dereference in uapi read
Signed-off-by: David Anderson <danderson@tailscale.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
111e0566dc
commit
3cae233d69
@ -258,11 +258,11 @@ type ipcSetPeer struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (peer *ipcSetPeer) handlePostConfig() {
|
func (peer *ipcSetPeer) handlePostConfig() {
|
||||||
if peer.Peer == nil {
|
if peer.Peer == nil || peer.dummy {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
peer.disableRoaming = peer.device.net.brokenRoaming && peer.endpoint != nil
|
peer.disableRoaming = peer.device.net.brokenRoaming && peer.endpoint != nil
|
||||||
if !peer.dummy && peer.device.isUp() {
|
if peer.device.isUp() {
|
||||||
peer.Start()
|
peer.Start()
|
||||||
if peer.pkaOn {
|
if peer.pkaOn {
|
||||||
peer.SendKeepalive()
|
peer.SendKeepalive()
|
||||||
|
Loading…
Reference in New Issue
Block a user