diff options
| -rw-r--r-- | vswitchd/bridge.c | 11 | ||||
| -rw-r--r-- | vswitchd/bridge.h | 7 | ||||
| -rw-r--r-- | vswitchd/ovs-vswitchd.c | 2 |
3 files changed, 15 insertions, 5 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 18e4ef240..f739505e3 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -317,6 +317,17 @@ bridge_init(const char *remote) bond_init(); } +void +bridge_exit(void) +{ + struct bridge *br, *next_br; + + LIST_FOR_EACH_SAFE (br, next_br, node, &all_bridges) { + bridge_destroy(br); + } + ovsdb_idl_destroy(idl); +} + /* Performs configuration that is only necessary once at ovs-vswitchd startup, * but for which the ovs-vswitchd configuration 'cfg' is required. */ static void diff --git a/vswitchd/bridge.h b/vswitchd/bridge.h index 42ba4e5cc..32b581e2d 100644 --- a/vswitchd/bridge.h +++ b/vswitchd/bridge.h @@ -16,12 +16,9 @@ #ifndef VSWITCHD_BRIDGE_H #define VSWITCHD_BRIDGE_H 1 -#include <stdbool.h> -#include <stdint.h> - -struct svec; - void bridge_init(const char *remote); +void bridge_exit(void); + void bridge_run(void); void bridge_wait(void); diff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c index 93f0371c6..cd30c96d3 100644 --- a/vswitchd/ovs-vswitchd.c +++ b/vswitchd/ovs-vswitchd.c @@ -107,6 +107,8 @@ main(int argc, char *argv[]) } poll_block(); } + bridge_exit(); + unixctl_server_destroy(unixctl); return 0; } |
