rule: add support for dport/sport#511
Merged
aboch merged 1 commit intovishvananda:masterfrom Feb 10, 2020
Merged
Conversation
d284d7a to
2ebb088
Compare
aboch
reviewed
Jan 17, 2020
| } | ||
|
|
||
| // RulePortRange creates rule sport/dport range. | ||
| func NewRulePortRange(start, end uint16) *RulePortRange { |
Collaborator
There was a problem hiding this comment.
Why not making this a method of Rule structure ?
(r *Rule) AddPortRange(start, end uint16)
Contributor
Author
There was a problem hiding this comment.
Thanks for review @aboch
(r *Rule) AddPortRange(start, end uint16) may need another parameter to specify it's a Src or a Dst port range, which might add more complexity.
IMO, current fields of Rule structure is assigned by users manually, so NewRulePortRange is enough.
2ebb088 to
f83ba96
Compare
Collaborator
|
@chendotjs pls rebase |
f83ba96 to
0be5b22
Compare
Contributor
Author
|
@aboch done |
Collaborator
|
LGTM |
MrHohn
added a commit
to MrHohn/netlink
that referenced
this pull request
Aug 26, 2021
This is similar to vishvananda#511, but this time for the ipproto option: ``` ip rule add ipproto xxx table main ```
MrHohn
added a commit
to MrHohn/netlink
that referenced
this pull request
Aug 26, 2021
This is similar to vishvananda#511, but this time for the ipproto option: ``` ip rule add ipproto xxx table main ```
MrHohn
added a commit
to MrHohn/netlink
that referenced
this pull request
Sep 30, 2021
This is similar to vishvananda#511, but this time for the ipproto option: ``` ip rule add ipproto xxx table main ```
MrHohn
added a commit
to MrHohn/netlink
that referenced
this pull request
Jan 12, 2022
This is similar to vishvananda#511, but this time for the ipproto option: ``` ip rule add ipproto xxx table main ```
glazychev-art
pushed a commit
to glazychev-art/netlink
that referenced
this pull request
Jan 18, 2022
This is similar to vishvananda#511, but this time for the ipproto option: ``` ip rule add ipproto xxx table main ```
vishvananda
pushed a commit
that referenced
this pull request
Jan 18, 2022
This is similar to #511, but this time for the ipproto option: ``` ip rule add ipproto xxx table main ```
cyberys
pushed a commit
to cyberys/netlink
that referenced
this pull request
Apr 5, 2022
This is similar to vishvananda#511, but this time for the ipproto option: ``` ip rule add ipproto xxx table main ```
cjmakes
pushed a commit
to cjmakes/netlink
that referenced
this pull request
Jun 29, 2022
This is similar to vishvananda#511, but this time for the ipproto option: ``` ip rule add ipproto xxx table main ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds ability equivalent to
ip rule add dport xxx-xxx sport xxx table main