google / gvisor

Application Kernel for Containers
https://gvisor.dev
Apache License 2.0
15.82k stars 1.3k forks source link

Support NIC lifecycle management #1491

Open ghananigans opened 4 years ago

ghananigans commented 4 years ago

Currently, NICs are assumed to be "UP" from when it is first enabled to program termination.

This is not an accurate way to represent NICs which may be brought down administratively for some valid reason.

The stack should handle such lifecycle events properly (i.e. deleting/initializing any relevant dynamic state)

ghananigans commented 4 years ago

Note, this is different from #837 as that issue refers to tearing down the whole netstack. This issue refers to changing administrative link states (up/down) during normal netstack operations.

ghananigans commented 4 years ago

resolved as of https://github.com/google/gvisor/commit/530a31f3c08b10fbd2f8135c5b76380cf5e7f4e8

github-actions[bot] commented 4 years ago

There are TODOs still referencing this issue:

  1. pkg/tcpip/stack/nic.go:196: Should Routes that are currently bound to n be
  2. pkg/tcpip/stack/stack_test.go:871: Should we instead completely

Search TODO