Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cilium bpf policy list to print l4 ports #2271

Merged
merged 6 commits into from
Dec 7, 2017

Conversation

joestringer
Copy link
Member

@joestringer joestringer commented Dec 6, 2017

Fixes: #1941

Tasks:

  • Also add support for dumping --json
  • Print protocol
  • Fix bpf policy add/delete to support l4port/proto

@joestringer joestringer added pending-review release-note/bug This PR fixes an issue in a previous release of Cilium. labels Dec 6, 2017
@joestringer joestringer requested a review from a team as a code owner December 6, 2017 02:39
@joestringer joestringer requested review from a team as code owners December 6, 2017 23:36
@@ -27,7 +27,7 @@ var protoNames = map[int]string{
58: "ICMPv6",
}

var protoIDs = map[string]U8proto{
var ProtoIDs = map[string]U8proto{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported var ProtoIDs should have comment or be unexported

@joestringer joestringer force-pushed the submit/policy-list-l4 branch 4 times, most recently from 4c80c25 to 50e1958 Compare December 7, 2017 00:06
I keep on trying to "get" a policy for a specific endpoint, then get
told it's not a command. Alias "get" to "list" so it's harder to trip
over.

Signed-off-by: Joe Stringer <[email protected]>
Previously there was no way to add/delete policy map entries with l4
ports/protocols specified. This commit adds support, using the standard
"port/proto" format, eg "80/TCP".

Signed-off-by: Joe Stringer <[email protected]>
@joestringer joestringer added ready-to-merge This PR has passed all tests and received consensus from code owners to merge. and removed pending-review labels Dec 7, 2017
In the API, it's often allowed to add/delete policy for multiple
protocols by omitting the protocol and just specifying the port. Rather
than adding an entry for protocol 0, attempt to add/delete entries for
all common known protocols.

Signed-off-by: Joe Stringer <[email protected]>
@joestringer joestringer merged commit b2f9223 into cilium:master Dec 7, 2017
@joestringer joestringer deleted the submit/policy-list-l4 branch December 7, 2017 21:33
@joestringer joestringer mentioned this pull request Dec 8, 2017
@joestringer joestringer added stable/backport-done and removed ready-to-merge This PR has passed all tests and received consensus from code owners to merge. stable/needs-backport labels Dec 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/bug This PR fixes an issue in a previous release of Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants