af=ip_addr.vapi_af)
for n in nbrs:
- if ip_addr == n.neighbor.ip_address and \
+ if sw_if_index == n.neighbor.sw_if_index and \
+ ip_addr == n.neighbor.ip_address and \
is_static == (n.neighbor.flags & e.IP_API_NEIGHBOR_FLAG_STATIC):
if mac:
if mac == str(n.neighbor.mac_address):
return ("%d:%s" % (self.sw_if_index, self.nbr_addr))
def get_stats(self):
- c = self._test.statistics.get_counter("/net/adjacency")
+ c = self._test.statistics["/net/adjacency"]
return c[0][self.stats_index]