From 799a5fbcf09462d7bf3cf6d599649fa6bc9b830a Mon Sep 17 00:00:00 2001 From: Pavel Kulyov Date: Sun, 24 Dec 2023 20:07:55 +0300 Subject: [PATCH] ndb: make non-unique FDB index more unique There can be multicast FDBs with single ifindex and no NDA_VLAN at all (that means NDA_VLAN = 0), but NDA_DST will be different. --- pyroute2/ndb/objects/neighbour.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyroute2/ndb/objects/neighbour.py b/pyroute2/ndb/objects/neighbour.py index 2144102aa..f8f55390b 100644 --- a/pyroute2/ndb/objects/neighbour.py +++ b/pyroute2/ndb/objects/neighbour.py @@ -48,8 +48,9 @@ def load_ndmsg(schema, target, event): brmsg_schema = ( ndmsg.sql_schema() - .unique_index('ifindex', 'NDA_LLADDR', 'NDA_VLAN') + .unique_index('ifindex', 'NDA_LLADDR', 'NDA_DST', 'NDA_VLAN') .constraint('NDA_LLADDR', "NOT NULL DEFAULT ''") + .constraint('NDA_DST', "NOT NULL DEFAULT ''") .constraint('NDA_VLAN', "NOT NULL DEFAULT 0") .foreign_key( 'interfaces',