From 4bb182c8827fcb54fdf8a1cf4ff8c18cb79ecddd Mon Sep 17 00:00:00 2001 From: Nikita Kryuchkov Date: Thu, 27 Feb 2020 15:57:35 +0100 Subject: [PATCH] Fix intfwd rule panic --- pkg/routing/rule.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/routing/rule.go b/pkg/routing/rule.go index 8f0283a38..e5d1f04f1 100644 --- a/pkg/routing/rule.go +++ b/pkg/routing/rule.go @@ -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(), @@ -343,6 +343,8 @@ func (r Rule) Summary() *RuleSummary { }, } case RuleForward: + rd := r.RouteDescriptor() + summary.ForwardFields = &RuleForwardFields{ RouteDescriptor: RouteDescriptorFields{ DstPK: rd.DstPK(),