[roll] Roll fuchsia [netdevice] Remove ports if only salt matches
There is a race condition during a netdevice port flap:
- The old port is destroyed by the device.
- Netdevice go client finds out and deregisters the port from its ports
map.
- The new port is ready and found by netcfg.
- Netcfg tries to create a new interface but netstack hasn't removed the
old one because it's blocking on some goroutines of the old interface.
- Netstack creates the new interface under a new name and registers its
port into the netdevice client's port map (it has the same base port id
as the old one).
- Now all the goroutines of the old interface has stopped and it went
forward to remove the interface which will again, try to deregister
itself again from ports map (ports#Close). Because it only compares the
base id, it causes the newly registered port to be removed.
- We see an excess amount of "unknown port" error logs.
Calling port#Close multiple times isn't the issue because the method is
carefully written to be idempotent. This change fixes the issue by
consulting the salt before removing the port entry.
Test: fx test netstack-link-netdevice-gotests \
--test-filter "TestPortRemovalRespectsSalt"
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/719842
Original-Revision: 9bff586c214b48e7671d45c8d766fdfcce8ccb0e
GitOrigin-RevId: dc726a7152010e770d098fba623f5091f27d2d63
Change-Id: I23cff285ab7bb473bf19a52033b9975bba26dd07
This repository contains Fuchsia's Global Integration manifest files.
All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.
Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.
First install Jiri.
Next run:
$ jiri init $ jiri import minimal https://fuchsia.googlesource.com/integration $ jiri update
Third party projects should have their own subdirectory in ./third_party.