diff options
author | Jakub Urbańczyk <xthaid@gmail.com> | 2020-08-06 13:36:22 +0200 |
---|---|---|
committer | Jakub Urbańczyk <xthaid@gmail.com> | 2020-08-12 23:20:52 +0200 |
commit | aa530b627de8d1d8c11e4455f3e97a8c2e045281 (patch) | |
tree | e9c6e733d5c23379647cfa93a136eaca5c24b2db /ospfd/ospf_packet.c | |
parent | sharpd: add a command to send ARP/NDP requests (diff) | |
download | frr-aa530b627de8d1d8c11e4455f3e97a8c2e045281.tar.xz frr-aa530b627de8d1d8c11e4455f3e97a8c2e045281.zip |
ospfd: send ARP requests using zebra
Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
Diffstat (limited to 'ospfd/ospf_packet.c')
-rw-r--r-- | ospfd/ospf_packet.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index b0dd5c6fc..49cd42d03 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -53,6 +53,7 @@ #include "ospfd/ospf_flood.h" #include "ospfd/ospf_dump.h" #include "ospfd/ospf_errors.h" +#include "ospfd/ospf_zebra.h" /* * OSPF Fragmentation / fragmented writes @@ -4319,21 +4320,10 @@ void ospf_ls_ack_send_delayed(struct ospf_interface *oi) * punt-to-CPU set on them. This may overload the CPU control path that * can be avoided if the MAC was known apriori. */ -#define OSPF_PING_NBR_STR_MAX (BUFSIZ) void ospf_proactively_arp(struct ospf_neighbor *nbr) { - char ping_nbr[OSPF_PING_NBR_STR_MAX]; - int ret; - if (!nbr) return; - snprintf(ping_nbr, sizeof(ping_nbr), - "ping -c 1 -I %s %s > /dev/null 2>&1 &", nbr->oi->ifp->name, - inet_ntoa(nbr->address.u.prefix4)); - - ret = system(ping_nbr); - if (IS_DEBUG_OSPF_EVENT) - zlog_debug("Executed %s %s", ping_nbr, - ((ret == 0) ? "successfully" : "but failed")); + ospf_zebra_send_arp(nbr->oi->ifp, &nbr->address); } |