The maximum value for an `int` type on a 32-bit platform is 0x7FFFFFFF. Since 0xF0000000 exceeds this limit, we need to use `uint` instead of `int` to handle these values.
- Also refactored setUpNetlinkTestWithKModule function to reduce redundant NS's created and checks made.
- Add conntrack protoinfo TCP support + groundwork for other protocols.
- Tests to cover the above.
- Extend Htb struct in qdisc.go to include DirectQlen field
- Implement the DirectQlen option in qdisc_linux.go
- Modify TestHtbAddDel test to validate DirectQlen changes
Use a tagged version of the dependency. I picked the current version,
although older versions could probably work.
full diff: db3c7e526a...v0.0.4
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Linux added a new bond transmit hashing policy, VLAN_SRCMAC in [1],
available since Linux 5.12. Add this hashing policy into the respective
data structures.
[1] 7b8fc0103b
- `Rate64` field added to the `Netem` struct in `qdisc.go`
- Implemented serialization and deserialization methods for `Rate64`
- Modify `TestClassAddDel` test to validate Rate64 changes
Linux 5.6 and higher support IFLA_PERM_ADDRESS, which contains the
permanent hardware address of the interface if an interface has such an
address. This can be used to identify interfaces even when the normal
hardware address has been changed.
Signed-off-by: Lorenz Brun <lorenz@monogon.tech>
qdisc statistics is exposed in netlink response but not parsed, here we
parse it and expose it via struct QdiscStatistics.
Signed-off-by: Kangjie Xu <kanxu@ebay.com>
This commit add the support for alternative names.
* exposing the attributes in the link object.
* adding the add and delete functions
* allow LinkByName() to also find devices by altname like `ip link`
Signed-off-by: Sebastian Sch <sebassch@gmail.com>
Functions added:
DevlinkGetDeviceParams - get all parameters for device
DevlinkGetDeviceParamByName - get specific parameter for device
DevlinkSetDeviceParam - set parameter for device
Signed-off-by: Yury Kulazhenkov <ykulazhenkov@nvidia.com>
This commit added support to allow the operation of ip6tnl encapsulation.
It is equivalent to the iproute2 command, e.g., ip route add 192.168.99.0/24 encap ip6 dst 2001:db8:: dev ip6-tunnel
The limitation include that the options field defined in encap nl route attribute is not implenmented yet.
Testcase is included.
- Update nl package with new netlink attribute types and consts
- Define structs to model devlink device resources
- Add DevlinkGetDeviceResources method to return device resources
- Add basic test
Signed-off-by: adrianc <adrianc@nvidia.com>
certain implementations in kernel return NLMSG_DONE
with no data. If that is the case, assume no error occured.
Signed-off-by: adrianc <adrianc@nvidia.com>
The qdiscPayload() function was missing the TCA_FQ_PLIMIT attribute
for the Fq Qdisc. Therefore, it could not be changed via the library.
Fix this up, so that QdiscReplace() with different qdisc.PacketLimit
works now.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>