Refactor network and veth creation

Remove veth interfaces on the host if an error occurs.
Provide the host interface name, temporary peer interface name and the
name of the peer once it is inside the container's namespace in the
Network config.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2015-02-10 11:51:45 -08:00
parent 2ec6b585ea
commit fde0b7aa0d
10 changed files with 76 additions and 51 deletions

View File

@@ -35,7 +35,7 @@ func (l *linuxStandardInit) Init() error {
return err
}
}
if err := setupNetwork(l.config.Config); err != nil {
if err := setupNetwork(l.config); err != nil {
return err
}
if err := setupRoute(l.config.Config); err != nil {