Commit Graph

29 Commits

Author SHA1 Message Date
Vishvananda Ishaya
01bbbda86c set macvtap properly on parse 2015-08-15 10:16:04 -07:00
Vish Ishaya
4b5dce31de Merge pull request #43 from tgraf/master
Support for IFLA_VXLAN_GBP flag
2015-08-14 17:19:24 -07:00
Jana Radhakrishnan
5dd6b277e6 Do not set nlmsghdr data values in ifinfomsg fields
Currently the netlink link_linux.go sets all sorts of nlmsghdr
values like RTM_NETLINK/RTM_SETLINK, NLM_F_REQUEST and IFLA_*
values ifinfomsg.if_type, ifinfomsg.if_flags and ifinfomsg.if_change.
This is totally incorrect since they are meant to send through to
the kernel interface specific information and not generic netlink
data. Because of this the kernel is treating them for their
expected meaning and more than likely causing a lot of unintentional
consequences.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-08-14 16:07:03 -07:00
Thomas Graf
c24b290c8f Support for IFLA_VXLAN_GBP flag
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2015-07-31 13:48:03 +02:00
Alexander Morozov
607cdbafd6 Fix LinkSetDown comment
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-06-19 13:53:18 -07:00
Vish Ishaya
b1aa0245ac Merge pull request #37 from LK4D4/fix_golint
Fix some style issues as suggested by golint
2015-06-18 18:04:35 -07:00
Alexander Morozov
12f4097df1 Fix some style issues as suggested by golint
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-06-18 17:41:46 -07:00
Alexander Morozov
72a1f403a3 Add LinkAttrs constructor NewLinkAttrs
It looks little awkward, but should be enough for people who care about
defaults from kernel.

Fix #26

Also fixed bug with setting TxQLen for main device. It was never set
before.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-06-13 20:49:51 -07:00
Vish Ishaya
991a7a2fa7 Merge pull request #30 from marek-polewski/master
Stop discarding flags in RTM_SETLINK
2015-05-13 13:52:36 -07:00
Jonathan Boulle
231f3aa8aa Fix typo in docstring, LinkSetNsPid -> LinkSetNsFd 2015-05-01 15:26:43 -07:00
Marek Polewski
0207b6b633 Using Change = nl.DEFAULT_CHANGE = 0xffffff in RTM_SETLINK will discard some flags from the interface ( NOARP DYNAMIC etc) 2015-03-09 12:31:23 +01:00
Eugene Yakubovich
ae3e7dba57 added support for MACVLAN mode 2015-02-26 13:21:26 -08:00
Eugene Yakubovich
1fd3169564 Added ability to specify net ns at link creation
Creating a link in one namespace and then moving can
be problematic since there could be a iface name conflict.
However, it is not always possible to switch into the target
namespace either -- e.g. creating a macvlan interface must
be done in the namespace of the parent interface.
2015-02-24 15:06:07 -08:00
Alexander Morozov
2e9d285a71 Change logic of setting protinfo attrs
Now interface is supposing that you setting protinfo attrs for link one
by one. But you can get all protinfo attrs with one call.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-02-17 14:16:48 -08:00
Alexander Morozov
bf7b359ebd Fix comments mistakes
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-02-12 11:12:05 -08:00
Alexander Morozov
d710fe886a IPVlan support
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-02-11 14:18:57 -08:00
Eugene Yakubovich
a59b20a402 honor MTU in LinkAdd 2015-02-06 18:30:52 -08:00
Dave Tucker
f9a4246807 Add LinkSetHardwareAddr
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2015-01-31 22:44:21 +00:00
Dave Tucker
085dc47dcc Add LinkSetName
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2015-01-31 22:44:01 +00:00
Alexander Morozov
f7f54f4512 Add TxQLen support
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2014-12-04 18:25:10 -08:00
Eugene Yakubovich
ffab401087 gofmt: style violations have crept up 2014-10-28 17:22:52 -07:00
Eugene Yakubovich
0e908ca36d Fallback to LinkList on LinkByName when needed
Older kernels (e.g. one shipped with RHEL 6.5) don't
support RTM_GETLINK with IFLA_IFNAME. In these cases
fallback to dumping all interfaces and filtering
in userspace.
2014-10-28 14:15:07 -07:00
Eugene Yakubovich
dd2d5f17ae vxlan bug fix: check VtepDevIndex when setting IFLA_VXLAN_LINK 2014-10-19 12:23:14 -07:00
Vishvananda Ishaya
50bae0e9af Update docstrings and make linkDeserialize private 2014-10-13 19:01:36 -07:00
Eugene Yakubovich
cc912bac14 avoid dumping all interfaces to look up one 2014-10-13 18:07:39 -07:00
Eugene Yakubovich
33e8718673 arp and vxlan support added 2014-10-13 11:04:09 -07:00
Vishvananda Ishaya
f87c54f846 Make links have different types 2014-09-24 16:32:16 -07:00
Vishvananda Ishaya
1a26b9f251 Move all low level calls into nl subpackage 2014-09-18 19:04:48 -07:00
Vishvananda Ishaya
8dab8b7462 Initial commit of netlink package 2014-08-31 20:34:46 -07:00