7 Commits

Author SHA1 Message Date
Tom Denham
13824487c6
plugins/*: Don't error if the device doesn't exist
I wasn't able to test or update the dhcp plugin but from a code read it
should be fine. All the other plugins are tested and fixed
2017-03-22 08:52:29 -07:00
Gabe Rosenhouse
e4a0583d7a pkg/ip: SetupVeth returns net.Interface 2017-03-10 09:49:46 -08:00
Jay Dunkelberger
58c834c4f3 pkg/ip: do not leak types from vendored netlink package
The exported function SetupVeth now returns a package-defined type.

Signed-off-by: Gabe Rosenhouse <grosenhouse@pivotal.io>
2017-03-09 13:55:15 -08:00
Tom Denham
726c6b4578 pkg/ip: Ensure that SetupVeth returns correct hostVeth
The veth is moved from the container NS to the host NS.
This is handled by the code that sets the link to UP but the wrong
hostVeth is returned to the calling code.
2016-08-31 14:17:25 -07:00
Prateek Gogia
ad8a052dd3 pkg/ip: Return correct error if container name provided exists, and test cases
If interface name for a container provided by a user is already present,
Veth creation fails with incorrect error.
If os.IsExist error is returned by makeVethPair:
* Check for peer name, if exists generate another random peer name,
* else, IsExist error is due to container interface present, return error.

Fixes #155
2016-08-11 18:51:03 +00:00
Stefan Junker
f68cea27bc pkg/ip link_test: ensure SetHWAddrByIP has an effect 2016-07-22 15:34:54 -07:00
Stefan Junker
8e1c215116 pkg/ip tests: cover SetupVeth and DelLinkByName* 2016-07-22 15:34:53 -07:00