* 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).
The mode on macvtap interfaces was not being set correctly.
Due to this the mode on macvtap is always set to default.
Set the mode correctly and add unit tests to check the same
This fixes issue https://github.com/vishvananda/netlink/issues/136
Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
- It is part of the ID and it is needed when you
program policies for different SAs which share
same src and dst
Signed-off-by: Alessandro Boch <aboch@docker.com>
An issue happens when netlink.LinkSubscribe is called back to back, even
when there is a Close() of the netlink socket (via the done chan
parameter). The issue seems to stem from the fact that after the
close/open happen together, the same fd is allocated. This lets the
s.Receive() calls succeed in more than one goroutine, which causes the
updates to issue randomly since the same fd has multiple readers and the
original Subscribe never finishes.
After a Close(), mark the Socket as invalid (-1) so that calls to
Send()/Receive() will fail going forward.
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
- Currently they are not and GET methods are passing
the wrong structure. Also they are setting the incorrect
XFRM_F_DUMP flag. Because of this, current get methods
do not return expected error when query target is not found.
Signed-off-by: Alessandro Boch <aboch@docker.com>
- Package methods only need an empty handle.
Not a regular Handle with a couple of
sockets creation/delete.
Signed-off-by: Alessandro Boch <aboch@docker.com>
- Ties to a netlink socket. All client requests
will re-use same socket. Socket released at
handle deletion.
- Also network namespace can be specified during
handle creation. Socket will be opened on the
specified network namespace.
Signed-off-by: Alessandro Boch <aboch@docker.com>
* Add Mark to xrfm state
Signed-off-by: Alessandro Boch <aboch@docker.com>
* Add Mark to xfrm policies
Signed-off-by: Alessandro Boch <aboch@docker.com>