Commit Graph

16 Commits

Author SHA1 Message Date
Milos Gajdos d90daa0cf7 Added VLAN and MAC VLAN device support to netlink
You can now create VLAN and MAC VLAN devices using netlink.
I've also added tests for both VLAN and MAC VLAN stuff.

Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com> (github: milosgajdos83)
2014-09-27 04:15:34 +01:00
Milos Gajdos 267ba8f753 Refactored SetNs funcs. Implemented ChangeName.
I've refactored NetworkSetNsPid and NetworkSetNsFd following
what we already have in place for Add/Del Ip and Add/Del Link.
I've reimplemented NetworkChangeName function which is now
using netlink for changing the interface name. I added tests too.
I've moved the original syscall implementation at the bottom
to keep it together with the other non-netlink functions.

Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com> (github: milosgajdos83)
2014-09-27 02:27:32 +01:00
Milos Gajdos 4fe2c7a4db Refactored and added more tests.Cleaned up netlink.
I've added more tests. We now have almost 55% coverage.
I've also reorganized netlink_linux codebase and moved
the non-RTNETLINK functions at the bottom. I've also
added some comments to some functions.

Docker-DCO-1.1-Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com> (github: milosgajdos83)
2014-09-20 03:11:26 +01:00
Lewis Marshall 80a574ab49 netlink: Add NetworkSetMacAddress
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2014-09-18 02:15:32 +01:00
Jonathan Rudenberg 9fb21a605a netlink: Add uint32Attr helper
Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
2014-09-16 09:59:15 -04:00
Jonathan Rudenberg 65842f749b netlink: Extract message checks into reusable method
Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
2014-09-15 14:18:17 -04:00
Jonathan Rudenberg 6e4334a68e netlink: Cache native endianness during init
Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
2014-09-14 20:40:41 -04:00
Milos Gajdos 356d006895 This is a modification of erikh/netlink-remove-address PR
This is a modification of original PR by @erikh (R118)
to keep the netlink codebase more consistent and my OCD
under control :-)

Docker-DCO-1.1-Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com> (github: milosgajdos83)
2014-08-08 02:55:02 +01:00
Milos Gajdos c5f4d90da5 Fixed rtnetlink attributes packaging into netlink message.
I've also added NetworkLinkDel() function which allows deleting
of the existing network links.

Docker-DCO-1.1-Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com> (github: milosgajdos83)
2014-08-06 01:08:21 +01:00
Dhammika Pathirana c391368000 Null-term ioctl ifr_name strings
Docker-DCO-1.1-Signed-off-by: Dhammika Pathirana <dhammika@gmail.com> (github: dhammika)
2014-07-23 22:26:58 -07:00
Michael Crosby 00c55b3966 Merge pull request #46 from dhammika/44-delete-bridge
Add netlink hooks to delete a bridge dev #44
2014-07-21 11:29:24 -07:00
Tianon Gravi 6fca833e4d Fix 386 and arm cross-compile
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-07-18 16:08:54 -06:00
Tianon Gravi 1cdf742a82 Update a few build tags to be more generic, add a couple more SETNS constants, and update Travis with a bunch of fixes/tweaks (including removing the nonfunctional cross-compile stuff for now)
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-07-17 02:24:49 -06:00
Dhammika Pathirana a3a4da3822 Add code review updates
Docker-DCO-1.1-Signed-off-by: Dhammika Pathirana <dhammika@gmail.com> (github: dhammika)
2014-07-10 23:26:27 -07:00
Dhammika Pathirana 2d69029a83 Add netlink hooks to delete a bridge dev
Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>

Docker-DCO-1.1-Signed-off-by: Dhammika Pathirana <dhammika@gmail.com> (github: dhammika)
2014-07-10 23:26:27 -07:00
Michael Crosby 3b1acc34fb Move libcontainer deps into libcontainer
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-06-09 15:52:12 -07:00