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
Vishvananda Ishaya
329b40d4e3
fix formatting
2015-07-27 23:58:44 -07:00
Vishvananda Ishaya
27f66da7b4
allow RouteDel to work on kernel routes
2015-07-27 09:32:07 -07:00
Vish Ishaya
ea0402b9db
Merge pull request #41 from brahmaroutu/big_endian_error
...
fixing issue with setting big endian
2015-07-15 20:07:42 -07:00
root
9cff812148
fixing issue with setting big endian
...
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-07-10 18:48:26 +00:00
Vish Ishaya
20397a1388
Merge pull request #39 from LK4D4/minor_docs_change
...
Fix LinkSetDown comment
2015-06-19 15:56:06 -07: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
Vish Ishaya
a4c08863d8
Merge pull request #35 from LK4D4/linkattrs_constructor
...
Add LinkAttrs constructor NewLinkAttrs
2015-06-15 16:23:30 -07:00
Alexander Morozov
a174c585ec
Add info about NewLinkAttrs to readme
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-06-13 21:01:03 -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
Vish Ishaya
38ead3b2a3
Merge pull request #34 from eyakubovich/local-addr
...
prefer IFA_LOCAL address when dumping addresses
2015-05-13 13:51:56 -07:00
Vish Ishaya
1d89ce496a
Merge pull request #33 from jonboulle/master
...
Fix typo in docstring, LinkSetNsPid -> LinkSetNsFd
2015-05-13 13:51:30 -07:00
Vish Ishaya
715e692d14
Merge pull request #32 from mattthias/master_fix_spelling
...
Fix minor spelling error: Rename function Recieve to Receive.
2015-05-13 13:51:00 -07:00
Eugene Yakubovich
efb2ec546f
prefer IFA_LOCAL address when dumping addresses
...
IFA_LOCAL and IFA_ADDRESS are the same for bcast interfaces,
however for point-to-point links, IFA_ADDRESS is the remote
address while IFA_LOCAL is the interface address.
2015-05-09 18:37:25 -07:00
Jonathan Boulle
231f3aa8aa
Fix typo in docstring, LinkSetNsPid -> LinkSetNsFd
2015-05-01 15:26:43 -07:00
Matthias Schmitz
fbbbc69580
Fix minor spelling error: Rename function Recieve to Receive.
2015-04-18 23:34:45 +02: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
Arnaud Porterie
8eb6423887
Fix panic when adding an incomplete route
...
RouteAdd expects at least Dst.IP, Src, or Gw to be set, but accesses the
destination IP without testing for Dst being nil in the first place.
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-02-24 11:13:56 -08:00
Vishvananda Ishaya
889b85d2e6
Move the linux specific code into protinfo_linux.go
2015-02-06 18:58:24 -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
8bde0c8190
Use more accustomed way to define enums
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-02-12 11:16:19 -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
e29807a4d5
Fix go vet errors
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-02-12 11:00:59 -08:00
Alexander Morozov
d710fe886a
IPVlan support
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-02-11 14:18:57 -08:00
Alexander Morozov
31e1715aea
Add support for setting Protinfo fields
...
Added new `Protinfo` datastructure, which contains fields from
`IFLA_PROTINFO | NLA_F_NESTED`. It is not embedded to `LinkAttrs`
because we need to use `NLM_F_DUMP` requests to get that info.
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-02-10 13:55:35 -08:00
Alexander Morozov
8ec30991b3
Add constansts for bridge configuration
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-02-09 12:41:31 -08:00
Eugene Yakubovich
a59b20a402
honor MTU in LinkAdd
2015-02-06 18:30:52 -08:00
Dave Tucker
10b7e3a40a
Add link to godoc in the README
...
As the documentation in this library is in pretty good shape, it's
worthwhile adding a link here to GoDoc.
Signed-off-by: Dave Tucker <dave@socketplane.io>
2015-02-02 13:35:08 -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
Vishvananda Ishaya
7663a3b4b6
Dst may be nil, so don't force it to String()
...
Fixes #14
2015-01-14 07:59:00 -08:00
Dave Tucker
80a80badbd
Implement basic route get
functionality
...
This provides the basic functionality of the iproute2 `route get`
command. It allows you to query netlink for the route to a destination
IP.Net
While implementing I noticed that the `s.Receive()` function was hanging
after the netlink response was recieved, so I added an additional clause
to break from the loop and return the decoded message if the NLM_F_MULTI
flag is not set.
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2015-01-11 18:15:59 +00:00
Vishvananda Ishaya
7f10b9c2b8
only fmt on make all
2014-12-11 13:48:16 -08:00
Vishvananda Ishaya
3e09ca6940
Use sudo for testing
2014-12-11 11:58:33 -08:00
Alexander Morozov
7bedf70b9b
Test for TxQLen
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2014-12-04 18:25:38 -08:00
Alexander Morozov
f7f54f4512
Add TxQLen support
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2014-12-04 18:25:10 -08:00
xuzhaokui
c3cc0540f8
fix addradd docs
2014-12-01 11:31:00 +08:00
Ruben Kerkhof
178d3a43f5
Fix path to git repo
2014-11-25 18:04:52 +01:00
Vishvananda Ishaya
2187ba67a2
update readme for new syntax
2014-10-31 12:37:48 -07:00
Vishvananda Ishaya
9c1aab3e9f
add dependency and travis status
2014-10-31 12:33:12 -07:00
Vishvananda Ishaya
f622e51d99
updates for fmt testing
2014-10-31 12:21:50 -07:00
Vishvananda Ishaya
dfb90f83f1
skips for root priveleges
2014-10-31 12:21:39 -07:00
Vishvananda Ishaya
a383c76b6d
Modified travis.yml for test
2014-10-31 11:57:26 -07:00
Vishvananda Ishaya
12d489e7d0
add .travis.yml
2014-10-31 11:48:25 -07:00
Vishvananda Ishaya
1d0a6a3ac1
add Makefile for testing
2014-10-31 11:45:51 -07:00