Commit Graph

9 Commits

Author SHA1 Message Date
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
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
6174cd873f Support invert in ip rules
Signed-off-by: Alessandro Boch <aboch@tetrationanalytics.com>
2017-11-08 03:31:45 -08:00
kishiguro
4fe6bd0383 Add Family to struct Rule so that user can specify address family. 2017-09-05 23:13:17 -07:00
Vish Ishaya
0bc457d244 fix darwin build by moving code (#138)
Fixes issue #135
2016-06-15 08:44:14 -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