tap: allow change of carrier state on host 45/28645/4
authorMatthew Smith <mgsmith@netgate.com>
Fri, 24 Jul 2020 18:38:03 +0000 (13:38 -0500)
committerMatthew Smith <mgsmith@netgate.com>
Thu, 5 Nov 2020 17:41:01 +0000 (17:41 +0000)
commitbd50ed18de83493b119e67897a5fa9ba9c7e763e
tree6cce31f5795f25c34bf7badfbfec5152a3d67ca0
parentd4a547144ffc0f68538d5a89ce7d41cd739a33d2
tap: allow change of carrier state on host

Type: feature

Add a function to adjust the link state of the host side of a tap
interface. If an application (e.g. route protocol daemons) running on
the host uses netlink to monitor interface state, a plugin
could use this function to communicate a loss of connectivity
to the application by making the interface appear to go down.

Requires a somewhat recent kernel. E.g. it does not have any effect
on CentOS 7 but it works on CentOS 8.

Change-Id: I677ee7889d2eb142e2395bea98f0b4d7e7e7f810
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
src/vnet/devices/tap/tap.c
src/vnet/devices/tap/tap.h
src/vnet/devices/virtio/virtio.c
src/vnet/devices/virtio/virtio.h