Commit Graph

57 Commits

Author SHA1 Message Date
soyking
fafc1e7b60 support vlan protocol 2019-05-03 14:23:34 -07:00
Andrei Vagin
adb577d4a4 Add support for IFLA_GSO_*
IFLA_GSO_MAX_SIZE - maximum GSO segment size
IFLA_GSO_MAX_SEGS - maximum number of GSO segments

Signed-off-by: Andrei Vagin <avagin@google.com>
2019-03-17 17:31:49 -07:00
Matt Ellison
1e2e7ab670 Add Support for Virtual XFRM Interfaces
XFRM interfaces are available in Linux Kernel 4.19+

When an IF_ID is applied to a XFRM policy and state, the corresponding
traffic will be sent through the virtual interface with the same IF_ID.
2019-01-05 11:40:40 -08:00
Div Arora
0bbc55bea9 Initial support for vlan aware bridges. 2018-07-23 11:15:57 -07:00
Ralph Schmieder
d85e18ed5b Allow Tuntap non-persist, allow empty tuntap name
chg: addtl comment and made minor logic optimization as disscussed in PR #296
chg: flipped Persist to NonPersist
chg: comments, only unpersist tuntap if flag is set
chg: tuntap persist optional, allow empty intfc name
chg: added conditional build
Signed-off-by: Ralph Schmieder <ralph.schmieder@gmail.com>
2018-07-16 09:40:17 -07:00
semicomplete
ee06b1df73 add vti6 support
Signed-off-by: semicomplete <example@example.com>
2018-06-19 08:48:34 -07:00
Piotr Skamruk
5f662e0500 Add info about VFs on link 2018-05-10 08:45:05 -07:00
Alessandro Boch
5a988e882d Support IPv6 GRE Tun and Tap
Signed-off-by: Alessandro Boch <aboch@tetrationanalytics.com>
2018-01-19 09:48:20 -08:00
Luke Granger-Brown
016ba6f67a Add support for managing source MACVLANs 2017-11-27 22:19:10 -08:00
Manohar Castelino
c2a3de3b38 tuntap: Add multiqueue support
Add multi queue support to tuntap without breaking legacy users
of tuntap.

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2017-11-13 20:19:46 -08:00
Tomofumi Hayashi
e104583c52 Support num{tx,rx}queues and udp6zerocsum{tx,rx}
Add IFLA_NUM_TX_QUEUES and IFLA_NUM_RX_QUEUES in link attribute and
IFLA_VXLAN_UDP_ZERO_CSUM6_TX and IFLA_VXLAN_UDP_ZERO_CSUM6_RX in VXLAN
attribute.
2017-11-13 20:19:27 -08:00
Reinier Schoof
c29ba20204 added encapsulation attributes to Iptun
added encapsulation attributes to Gretun
implemented Sittun struct for supporting SIT tunnels
2017-10-26 09:48:08 -07:00
Sylvain Afchain
b2de5d10e3 Add netnsid to link attrs 2017-10-20 10:18:20 -07:00
Manohar Castelino
7d0c00f02e gre tunnel: Add support for gre tunnels
Add support for creating and managing gre tunnels.
This is equivalent to

Point to Point:
ip tunnel add tun4 mode gre local 192.0.2.1 remote 203.0.113.6 key 123

Point to Multipoint:
ip tunnel add tun8 mode gre local 192.0.2.1 key 1234

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2017-09-05 23:15:55 -07:00
Tobias Klauser
8c5a115d79 Add support for IFLA_XDP_PROG_ID
Allow to get IFLA_XDP_PROG_ID which will be part of Linux kernel 4.13+.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2017-07-09 20:04:06 -07:00
Thomas Graf
4e28683688 link: Add support for IFLA_*_COLLECT_METADATA
- Implemented for VXLAN and GRE via a flag `FlowBased`
- Added unit tests to verify ability

Signed-off-by: Thomas Graf <tgraf@tgraf.ch>
2017-06-13 11:05:35 -07:00
Stuart McLaren
7bd45e5974 Add extra bond parameters
Add bond parameters corresponding to:

* IFLA_BOND_AD_ACTOR_SYS_PRIO
* IFLA_BOND_AD_USER_PORT_KEY
* IFLA_BOND_AD_ACTOR_SYSTEM
* IFLA_BOND_TLB_DYNAMIC_LB

These are available in new(ish) kernels.
2017-05-31 12:03:01 -07:00
Anirudh Aithal
99091d8440 add a named error when links are not found
A new error type LinkNotFoundError is returned instead
of the default error type to facilitate better error
handling by downstream consumers of this package
2017-05-24 13:54:39 -07:00
Wataru Ishida
58c32ae2d7 Add support for GPRS Tunnelling Protocol(GTP)
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2017-05-06 23:07:19 -07:00
Tobias Klauser
90380e4b76 Add support for IFLA_XDP_FLAGS
Allow to get/set IFLA_XDP_FLAGS which is part of Linux kernel >= 4.10.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2017-05-06 23:05:39 -07:00
Craig Furman
2632e243fb Can set some bridge flags
* Multicast snooping and hello time are the only ones supported at the
  moment
* Only pass values to kernel when user sets them, otherwise let kernel
  decide default
* Can set multicast snooping on existing bridges
* Tests disabled on Travis CI as the kernel version is too old
* All bridge flags copied from Kernel code, but only the two mentioned
  above work
  (5a7ad1146c/include/uapi/linux/if_link.h (L232-L281))

Signed-off-by: Petar Petrov <pppepito86@gmail.com>
Signed-off-by: Ed King <eking@pivotal.io>
Signed-off-by: Konstantinos Karampogias <konstantinos.karampogias@swisscom.com>
Signed-off-by: Will Martin <wmartin@pivotal.io>
2017-04-25 08:25:47 -07:00
Alessandro Boch
ebdfb74020 Return 64 bits link statistics
Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-01-17 08:21:17 -08:00
kishiguro
ade05d5c8f Add support for VRF. With this change we can create VRF interface.
$ sudo ip link add vrf1 type vrf table 1
2017-01-05 13:05:17 -08:00
Shaun Crampton
7a823e360e Parse the IFLA_OPERSTATE flag and recort in the link attributes. (#180)
The operstate gives the best picture of whether the interface is really up.
2016-12-09 14:08:27 -08:00
Martynas Pumputis
266f02d3a8 Parse IFLA_PROTINFO in LinkDeserialize
Extract and parse IFLA_PROTINFO fields from RTM_NEWLINK AF_BRIDGE
netlink messages.
2016-12-02 16:05:43 -08:00
Vish Ishaya
a4f22d8ad2 Change to kernel ordering of BOND_MODE (#178)
Fixes Issue #177
2016-11-22 17:07:05 -08:00
JC Martin
9438c6ff27 Add support for VTI and IPIP 2016-11-22 17:06:50 -08:00
Lincoln Stoll
a1f8555521 Add ipvlan l3s mode
Commit 4fbae7d83c98c30efcf0a2a2ac55fbb75ef5a1a5 added l3s mode
support to the kernel, add the value here.
2016-11-03 19:53:15 -07:00
Nicolas PLANEL
8b4e34d697 [link] add Link Encapsulation Type in LinkAttr
Retreive the link type from Netlink GetLink information.
Aim to return the same value as nl-link-list for example :

gre0 gre <noarp,up,running,lowerup> slave-of NONE group 0 ipgre : gre0
gretap0 ether <broadcast,multicast> slave-of NONE group 0 ipgre : gretap0
dummy0 ether 36:d5:87:cf:eb:35 <broadcast,noarp> group 0
tun0 none <pointopoint,multicast,noarp> group 0
tap0 ether 4e:ce:43:4a:82:c2 <broadcast,multicast> group 0

Signed-off-by: Nicolas PLANEL <nplanel@redhat.com>
2016-11-03 19:52:05 -07:00
Alessandro Boch
da7420cab5 Expose link's raw flags (#165)
- This is needed so that caller can check link's
  operational states.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-09-20 16:53:49 -07:00
Brenden Blanco
fadc1088f6 Add support for xdp set/get of a bpf program (#156)
* Add netlink definitions for extra IFLAs
  The relevant IFLA_* are defined in the kernel but not in the syscall
  package.
* Parameterize the return value of loadSimpleBpf
  Allow the return value of the bpf program created by loadSimpleBpf to
  be specified by the caller. Before this, the value was hardcoded to 1.
* Add support for a new IFLA that enables using a bpf program as a
  filter early in the driver path of some NICs.
* Add a test for set/get of an xdp program. Since currently, the XDP
  IFLA is optional, check that the hardware supports it before trying to
  set the field.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
2016-08-25 11:08:23 -07:00
Dmitry Shulyak
49a7353739 Add functions to turn on/off promiscuous mode for interface (#157)
Analogs for:
  ip l set dev eth0 promisc off
  ip l set dev eth0 promisc on
2016-08-13 01:45:45 -07:00
Lukas Redynk
4e67e44a40 Tuntap: support for non-default flags (#154)
* Tuntap: support for non-default flags

* Tuntap: tap device with default flags if no flags are provided
2016-07-29 08:59:01 -07:00
Vish Ishaya
0bc457d244 fix darwin build by moving code (#138)
Fixes issue #135
2016-06-15 08:44:14 -07:00
Alessandro Boch
339261d114 Parse link statistics (#118)
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-05-12 10:53:32 -07:00
Vishvananda Ishaya
adb0f53af6 Cleanup from golint and go vet 2016-03-19 17:12:26 -07:00
Takashi Okamoto
06ac83f14a Support VXLAN udpcsum to enable UDP checksum in outer UDP header. 2016-01-09 11:11:08 +09:00
Manohar Castelino
3e9cd37dc3 Added support for setting all gretap parameters 2015-12-10 10:57:59 -08:00
Manohar Castelino
40ccc37ce5 Resolved upstream merge conflicts 2015-12-10 09:36:26 -08:00
marek-polewski
656c395788 add bond interface support 2015-12-09 13:33:45 +01:00
Manohar Castelino
f8776950ce Added support for creating gretap.
Equivalent to ip link add <name> type gretap local <localIP> remote <remoteIP> key <key>
2015-12-08 16:37:03 -08:00
Manohar Castelino
4c5782b0e9 Add support for alias set and retrieve interface by alias 2015-11-30 11:57:00 -08:00
Dimitri John Ledkov
de4cc349a5 Add basic support for TUN/TAP link type and creation. 2015-09-25 10:28:19 +01:00
Vishvananda Ishaya
687e6f0b07 add link ifb and fix macvtap 2015-08-18 14:06:35 -07:00
Vishvananda Ishaya
6d78150380 rename Generic to GenericLink and add missing macvtap 2015-08-18 03:16:06 -07:00
Vish Ishaya
cee28b0a8d Merge pull request #42 from ppalucki/master
macvtap support
2015-08-15 10:13:37 -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
Pawel Palucki
828e2240d3 macvtap support 2015-07-27 17:48:59 +02: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
Eugene Yakubovich
ae3e7dba57 added support for MACVLAN mode 2015-02-26 13:21:26 -08:00