bridge: Do not add bridges with '/' in name.
authorDaniele Di Proietto <diproiettod@vmware.com>
Tue, 2 Feb 2016 21:28:11 +0000 (13:28 -0800)
committerDaniele Di Proietto <diproiettod@vmware.com>
Thu, 4 Feb 2016 02:56:53 +0000 (18:56 -0800)
commite6448d2f348d4ec6da8091bf877f73f6f3032d77
treef45fb584bb6a540de9b0ec0d59ced4a0d193183d
parent5f2ccb1c0d3b01b775ba03c89a486cae7b720275
bridge: Do not add bridges with '/' in name.

This effectively stops vswitchd from creating bridges with '/' in the
name. OVS used to print a warning but the bridge was created anyway.

This restriction is implemented because the bridge name is part of a
filesystem path.

This check is no substitute for Mandatory Access Control, but it
certainly helps to catch the error early.

Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
[blp@ovn.org added a test]
Acked-by: Ben Pfaff <blp@ovn.org>
tests/ovs-vswitchd.at
vswitchd/bridge.c