Commit Graph

40 Commits

Author SHA1 Message Date
Michael Crosby b02b0b037b Merge pull request #278 from milosgajdos83/macvtap
Introducing macvtap device to netlink package
2014-12-02 15:16:51 -08:00
Milos Gajdos 7075dd2cc2 Introducing macvtap device to netlink package
Small refactoring of MacVlan calls. Adds tests, too.

Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com> (github: milosgajdos83)
2014-11-21 15:44:15 +00:00
unclejack 209b1c1f99 netlink: add NetworkSetTxQueueLen to set qlen
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2014-11-21 01:24:15 +02:00
Mrunal Patel 6f7adc79c8 Fix the return code check for ParseIP.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
2014-11-10 13:33:29 -05:00
Mrunal Patel e4563c9bd3 Merge pull request #250 from zhgwenming/master
Make AddRoute() works with a provided source ip address.
2014-11-06 10:06:19 -08:00
Albert Zhang 58b336a059 Test update for routing Source Address Selection
Docker-DCO-1.1-Signed-off-by: Albert Zhang <zhgwenming@gmail.com> (github: zhgwenming)
2014-11-06 15:58:07 +08:00
Michael Crosby fd6df76562 Merge pull request #62 from phemmer/docker/4442-hairpin-nat
enable hairpin mode on virtual interface bridge port
2014-11-05 17:08:35 -08:00
Alexandr Morozov 7da5ab8130 Fix vet errors
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-11-05 15:38:58 -08:00
Patrick Hemmer 2d4a713602 enable hairpin mode on virtual interface bridge port
This is to support being able to DNAT/MASQ traffic from a container back into itself (dotcloud/docker#4442)

Docker-DCO-1.1-Signed-off-by: Patrick Hemmer <patrick.hemmer@gmail.com> (github: phemmer)
2014-11-03 23:11:37 -05:00
Albert Zhang 7caee2a772 Use RTA_PREFSRC instead of RTA_SRC to make AddRoute() works with a provided source ip address.
Docker-DCO-1.1-Signed-off-by: Albert Zhang <zhgwenming@gmail.com> (github: zhgwenming)
2014-11-01 19:47:09 +08:00
Ye Yin 4ca4048d98 Adds a tx_queuelen setting for veth in the network configuration and defaults it to 0.
Signed-off-by: Ye Yin <hustcat@gmail.com>
2014-10-10 13:29:46 -04:00
Michael Crosby 255989b835 Introduce more entropy in veth name generation
The current 4 chars are not enough, bumped to 7

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-10-02 21:56:48 +00:00
Victor Marmol 0a5fde25c5 Merge pull request #208 from MalteJ/master
Expose parameter to set interface MAC address
2014-09-30 08:27:47 -07:00
Malte Janduda d804790e8d MACAddress -> MacAddress
Docker-DCO-1.1-Signed-off-by: Malte Janduda <mail@janduda.net> (github: MalteJ)
2014-09-30 00:33:12 +02:00
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 63cfaa86b3 Fixing Travis builds by allowing short tests.
Docker-DCO-1.1-Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com> (github: milosgajdos83)
2014-09-20 03:36:08 +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 f5b7ee170f netlink: Cleanup veth pair created during tests
Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
2014-09-15 14:18:17 -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
Alexandr Morozov 665613ccd4
Fix warnings from go vet
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-08-13 14:38:20 +04:00
Milos Gajdos b9ad475f6a Fixed typo ipAssingned -> ipAssigned
Docker-DCO-1.1-Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com> (github: milosgajdos83)
2014-08-08 12:24:18 +01:00
Milos Gajdos f9ae794564 Added NetworkLinkDelIp() into netlink_unsupported.go
Docker-DCO-1.1-Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com> (github: milosgajdos83)
2014-08-08 03:04:36 +01: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 3ff181bb20 Replacing t.Fatal() with t.Fatalf()
Docker-DCO-1.1-Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com> (github: milosgajdos83)
2014-08-06 01:29:37 +01:00
Milos Gajdos e8abb5ca89 Replaced log.Fatalf() with t.Fatalf()
No need to import log package.

Docker-DCO-1.1-Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com> (github: milosgajdos83)
2014-08-06 01:08:40 +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 feb1d28456 Use short flag for identifying integration tests
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-23 13:45:05 -07:00
Michael Crosby 00047d5339 Update travis to test specific packages
Add another netlink test and remove the -v from the dockerfile test
output
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-23 11:34:07 -07:00
Michael Crosby 4404b1521c Add start of netlink unit tests
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-23 10:41:10 -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