tcpip: destroy both ends of one veth pair together

PiperOrigin-RevId: 645562424
This commit is contained in:
Andrei Vagin
2024-06-21 18:50:54 -07:00
committed by gVisor bot
parent 14c6ef6d52
commit 646a033213
21 changed files with 176 additions and 10 deletions
+1 -1
View File
@@ -262,7 +262,7 @@ func (s *Stack) newVeth(ctx context.Context, linkAttrs map[uint16]nlmsg.BytesVie
peerEP.Close()
return syserr.TranslateNetstackError(err)
}
peerEP.SetStack(peerStack.Stack, id)
peerEP.SetStack(peerStack.Stack, peerID)
if peerLinkAttrs != nil {
if err := s.setLink(peerID, peerLinkAttrs); err != nil {
peerStack.Stack.RemoveNIC(peerID)