Files
visor/pkg/tcpip/testutil
Kevin KrakauerandgVisor bot e14c91efba netstack: use longest prefix match to choose IPs on a NIC
Once a NIC is chosen for a route, we currently just grab the first IP on the
NIC as the source address. We should choose the address with the longest
matching prefix instead.

This is a simple linear search of the route table. That's slow for large
tables, but large tables are exceedingly rare for use with gVisor and we can
always reimplement this with a trie if it becomes necessary.

PiperOrigin-RevId: 557941259
2023-08-17 14:45:53 -07:00
..