summaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/table
diff options
context:
space:
mode:
authoroc <oc@yunify.com>2018-11-29 00:43:45 +0800
committeroc <oc@yunify.com>2018-11-29 00:45:21 +0800
commit7ebcb44a51ff220a80ad0615cc181ae32561927f (patch)
treedb4d7c83736c9aeebdf2329213411bf490aa603b /internal/pkg/table
parent9d9061497330afc1f0cbc612cd52a7358a8c76ac (diff)
server: fix nil pointer error when apply policy
this error can be reproduced by: gobgp p statement s1 add action as-prepend 65001 1 gobgp p add p1 s1 gobgp n 192.168.0.5 p import add p1 gobgp n 192.168.0.5 softresetin then: panic: runtime error: invalid memory address or nil pointer dereference
Diffstat (limited to 'internal/pkg/table')
-rw-r--r--internal/pkg/table/policy.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/pkg/table/policy.go b/internal/pkg/table/policy.go
index 73bfac75..6c4ca0b0 100644
--- a/internal/pkg/table/policy.go
+++ b/internal/pkg/table/policy.go
@@ -2542,7 +2542,7 @@ func (a *AsPathPrependAction) Apply(path *Path, option *PolicyOptions) *Path {
asn = a.asn
}
- confed := option != nil && option.Info.Confederation
+ confed := option != nil && option.Info != nil && option.Info.Confederation
path.PrependAsn(asn, a.repeat, confed)
return path