Skip to content

Commit

Permalink
Fix intfwd rule panic
Browse files Browse the repository at this point in the history
  • Loading branch information
nkryuchkov committed Feb 27, 2020
1 parent 2427496 commit 4bb182c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/routing/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,10 @@ func (r Rule) Summary() *RuleSummary {
KeyRouteID: r.KeyRouteID(),
}

rd := r.RouteDescriptor()

switch t := summary.Type; t {
case RuleConsume:
rd := r.RouteDescriptor()

summary.ConsumeFields = &RuleConsumeFields{
RouteDescriptor: RouteDescriptorFields{
DstPK: rd.DstPK(),
Expand All @@ -343,6 +343,8 @@ func (r Rule) Summary() *RuleSummary {
},
}
case RuleForward:
rd := r.RouteDescriptor()

summary.ForwardFields = &RuleForwardFields{
RouteDescriptor: RouteDescriptorFields{
DstPK: rd.DstPK(),
Expand Down

0 comments on commit 4bb182c

Please sign in to comment.