mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix copylocks error about copying IPTables.
IPTables.connections contains a sync.RWMutex. Copying it will trigger copylocks analysis. Tested by manually enabling nogo tests. sync.RWMutex is added to IPTables for the additional race condition discovered. PiperOrigin-RevId: 314817019
This commit is contained in:
committed by
Nicolas Lacasse
parent
f766366091
commit
41da7a568b
@@ -362,14 +362,13 @@ func (s *Stack) RouteTable() []inet.Route {
|
||||
}
|
||||
|
||||
// IPTables returns the stack's iptables.
|
||||
func (s *Stack) IPTables() (stack.IPTables, error) {
|
||||
func (s *Stack) IPTables() (*stack.IPTables, error) {
|
||||
return s.Stack.IPTables(), nil
|
||||
}
|
||||
|
||||
// FillDefaultIPTables sets the stack's iptables to the default tables, which
|
||||
// allow and do not modify all traffic.
|
||||
func (s *Stack) FillDefaultIPTables() {
|
||||
netfilter.FillDefaultIPTables(s.Stack)
|
||||
// FillIPTablesMetadata populates stack's IPTables with metadata.
|
||||
func (s *Stack) FillIPTablesMetadata() {
|
||||
netfilter.FillIPTablesMetadata(s.Stack)
|
||||
}
|
||||
|
||||
// Resume implements inet.Stack.Resume.
|
||||
|
||||
Reference in New Issue
Block a user