Skip to content

Commit

Permalink
ndb: merge branch 'C2Devel-bugfix/fdb-missing-records'
Browse files Browse the repository at this point in the history
Bug-Url: #1158
Bug-Url: #1091
  • Loading branch information
svinota committed Jan 10, 2024
2 parents 020b793 + 0763609 commit 7fc0cb0
Show file tree
Hide file tree
Showing 2 changed files with 8 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
6 changes: 6 additions & 0 deletions pyroute2/requests/neighbour.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ def set_nud(self, context, value):
def set_state(self, context, value):
return self._state(value)

def set_dst(self, context, value):
if value:
return {'dst': value}
else:
return {}


class NeighbourIPRouteFilter(IPRouteFilter):
def set_dst(self, context, value):
Expand Down

0 comments on commit 7fc0cb0

Please sign in to comment.