$ ip -M route add 100 dev eth0
$ ip -M route add 100 as to 200/300 dev eth0
$ ip -M route add 100 nexthop dev eth0 as to 200 \
nexthop dev eth1 as to 300
$ ip route add 10.10.0.0/24 encap mpls 200/300 dev eth0
$ ip route add 10.0.0.0/24 nexthop encap mpls 200 dev eth0 \
nexthop encap mpls 300 dev eth1
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
The go get command and make both fail when executed on
non-linux platforms. Modified it so that there are no
compilation errors when developing in such an
environment.
The non-Linux stub implementation found in netlink_unspecified.go was
missing quite a few Link related functions. Also, some of the
functions that were there took a `*Link` instead of a `Link`.
When developing for Linux on a non-Linux platform, it's useful to have
mock method implementations so the code can easily build locally.
This patch adds such mock implementations for the handle struct, as is
already done in netlink_unspecified.go and route_unspecified.go.
The issue was noticed when building coreos/flannel on Mac. By default
the build would fail with:
pkg/ip/iface.go:32: cannot use link (type *netlink.Device) as type
*netlink.Link in argument to netlink.AddrList:
*netlink.Link is pointer to interface, not interface
Resolved by making interfaces of AddList() implementations the same,
although the reason for having `netlink_unspecified.go` is not fully
clear to me and given that there's only one implementation available.
Perhaps a better idea would be to remove the "interface" altoghether.
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>
* 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>
- Don't require a MAC address for a neighbor proxy
- Include proxies in the list of neighbors
Signed-off-by: Zvi "CtrlZvi" Effron <viz+GitHub@flippedperspective.com>
Key length used in DeserializeSerialise XfrmAlgo tests is
endianess dependant. Correction needed to have
TestXfrmAlgoDeserializeSerialize and
TestXfrmAlgoAuthDeserializeSerialize
pass ok on ppc64 arch (big endian).