Commit Graph

14 Commits

Author SHA1 Message Date
Artem Glazychev d6b03fdeb8 Fix review comment
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
2022-01-18 11:05:37 -06:00
Zihong Zheng 5a3e901175 rule: add support for ipproto
This is similar to https://github.com/vishvananda/netlink/pull/511,
but this time for the ipproto option:
```
ip rule add ipproto xxx table main
```
2022-01-18 11:05:37 -06:00
Quentin McGaw 30ec08bc3d `Rule.String()` method returns `.Dst`
- Return `to <all | ipNetString>` in string
- Return `all` for `from` if `rule.Src == nil`
- Return `all` for `to` if `rule.Dst == nil`

Add unit test
2021-09-20 13:10:42 -07:00
Chris Tarazi 564132f787 Implement RuleListFiltered
This commit adds the ability to list rules in a filtered manner, similar
to RouteListFiltered.

Signed-off-by: Chris Tarazi <tarazichris@gmail.com>
2020-06-03 11:26:35 -07:00
chendotjs a2e8781202 rule: add support for dport/sport 2020-02-10 06:52:06 -08:00
Amit Nishry 7ed9c95980 rule, add TOS
Signed-off-by: Amit Nishry <amit.nishry@gmail.com>
2020-02-09 10:15:44 -08:00
Alessandro Boch f67b75edbf Properly tear down netns at the end of test
Signed-off-by: Alessandro Boch <aboch@tetrationanalytics.com>
2017-11-28 09:08:21 -08:00
Alessandro Boch 6174cd873f Support invert in ip rules
Signed-off-by: Alessandro Boch <aboch@tetrationanalytics.com>
2017-11-08 03:31:45 -08:00
Ian Bishop 0e3b74dbe2 replace syscall with golang.org/x/sys/unix 2017-10-26 09:45:08 -07:00
Aithal dedc638a06 Fix compilation errors for non linux platforms.
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.
2017-02-20 12:00:54 -08:00
Sebastien Boving dbc72376c8 Properly skip tests which require root.
All these tests currently fail with 'Operation not permitted' when run as
non-root.
2017-02-06 09:09:57 -08:00
Vishvananda Ishaya adb0f53af6 Cleanup from golint and go vet 2016-03-19 17:12:26 -07:00
Hubert Krauze 97758f316b Remove FlagMask from Rule 2015-12-09 14:07:11 +01:00
Marek Polewski 89945b09c0 Add support for rules 2015-11-26 11:50:07 +01:00