diff options
author | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2020-11-01 22:46:29 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2020-11-09 12:35:07 +0900 |
commit | c297c0b222445df27e8e0642cbddf91be9ca8eb4 (patch) | |
tree | 7a7180eded11e28daf3c666b69d83b8ba34061e6 /internal | |
parent | 46b15a7512c655683218ae867b2d42b99a73985e (diff) |
server: handle bogus addpath argument
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Diffstat (limited to 'internal')
-rw-r--r-- | internal/pkg/apiutil/attribute.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/pkg/apiutil/attribute.go b/internal/pkg/apiutil/attribute.go index 8422f3f3..9b73786a 100644 --- a/internal/pkg/apiutil/attribute.go +++ b/internal/pkg/apiutil/attribute.go @@ -1506,6 +1506,9 @@ func unmarshalAttribute(an *any.Any) (bgp.PathAttributeInterface, error) { } return bgp.NewPathAttributeClusterList(a.Ids), nil case *api.MpReachNLRIAttribute: + if a.Family == nil { + return nil, fmt.Errorf("empty family") + } rf := ToRouteFamily(a.Family) nlris, err := UnmarshalNLRIs(rf, a.Nlris) if err != nil { |