Skip to content

Commit

Permalink
ndb: make non-unique FDB index more unique
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pkulev committed Dec 24, 2023
1 parent 1573e6b commit 79b8280
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyroute2/ndb/objects/neighbour.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 79b8280

Please sign in to comment.