File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -2038,10 +2038,16 @@ func (s *Stack) ReplaceConfig(st *Stack) {
20382038 // Update route table.
20392039 s .SetRouteTable (st .GetRouteTable ())
20402040
2041- // Update NICs.
20422041 nics := st .getNICs ()
2042+
20432043 s .mu .Lock ()
20442044 defer s .mu .Unlock ()
2045+
2046+ // Update iptables and nftables.
2047+ s .tables = st .IPTables ()
2048+ s .nftables = st .NFTables ()
2049+
2050+ // Update NICs.
20452051 s .nics = make (map [tcpip.NICID ]* nic )
20462052 s .loopbackNIC = nil
20472053 for id , nic := range nics {
@@ -2052,8 +2058,6 @@ func (s *Stack) ReplaceConfig(st *Stack) {
20522058 }
20532059 _ = s .NextNICID ()
20542060 }
2055- s .tables = st .tables
2056- s .nftables = st .nftables
20572061}
20582062
20592063// Restore restarts the stack after a restore. This must be called after the
You can’t perform that action at this time.
0 commit comments