From 715bcc4aa1c98094e258ad1498a1664473b6babf Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Fri, 7 Feb 2025 14:25:18 +0700 Subject: [PATCH] internal/clientinfo: make SetSelfIP to update new data So after network changes, the new data will be used instead of the stale old one. --- internal/clientinfo/client_info.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/clientinfo/client_info.go b/internal/clientinfo/client_info.go index e6bda79..35d5dbb 100644 --- a/internal/clientinfo/client_info.go +++ b/internal/clientinfo/client_info.go @@ -173,6 +173,8 @@ func (t *Table) SetSelfIP(ip string) { t.selfIPLock.Lock() defer t.selfIPLock.Unlock() t.selfIP = ip + t.dhcp.selfIP = t.selfIP + t.dhcp.addSelf() } func (t *Table) init() {