Skip to content

Commit

Permalink
policy: Always returns a valid L4 policy construct on lookup
Browse files Browse the repository at this point in the history
Fixes panic on endpoint unregister

Signed-off-by: Thomas Graf <thomas@cilium.io>
  • Loading branch information
tgraf committed Mar 18, 2017
1 parent dd317dc commit 592376e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/policy/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,11 @@ func (t *Tree) ResolveL4Policy(ctx *SearchContext) *L4Policy {

policyTrace(ctx, "Resolving L4 policy for context %+v\n", ctx)

if t.Root == nil {
return nil
if t.Root != nil {
t.Root.ResolveL4Policy(ctx, result)
}

t.Root.ResolveL4Policy(ctx, result)
policyTrace(ctx, "Final tree L4 policy: %+v\n", result)

return result
}

Expand Down

0 comments on commit 592376e

Please sign in to comment.