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', diff --git a/pyroute2/requests/neighbour.py b/pyroute2/requests/neighbour.py index af2dab37f..e0326a627 100644 --- a/pyroute2/requests/neighbour.py +++ b/pyroute2/requests/neighbour.py @@ -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):