summaryrefslogtreecommitdiffstats
path: root/src/plugins/ping/ping.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-09-30 10:53:31 +0000
committerOle Trøan <otroan@employees.org>2019-12-17 10:56:20 +0000
commitcbe25aab3be72154f2c706c39eeba6a77f34450f (patch)
tree131fb53b5ec973be045ffb9e2eb797af01d112a0 /src/plugins/ping/ping.c
parent96453fd2417ebd1d69354a7fb692976129cea80e (diff)
ip: Protocol Independent IP Neighbors
Type: feature - ip-neighbour: generic neighbour handling; APIs, DBs, event handling, aging - arp: ARP protocol implementation - ip6-nd; IPv6 neighbor discovery implementation; separate ND, MLD, RA - ip6-link; manage link-local addresses - l2-arp-term; events separated from IP neighbours, since they are not the same. vnet retains just enough education to perform ND/ARP packet construction. arp and ip6-nd to be moved to plugins soon. Change-Id: I88dedd0006b299344f4c7024a0aa5baa6b9a8bbe Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/plugins/ping/ping.c')
-rwxr-xr-xsrc/plugins/ping/ping.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/plugins/ping/ping.c b/src/plugins/ping/ping.c
index eaf5d29d48b..7045648d872 100755
--- a/src/plugins/ping/ping.c
+++ b/src/plugins/ping/ping.c
@@ -19,6 +19,7 @@
#include <vnet/fib/ip6_fib.h>
#include <vnet/fib/ip4_fib.h>
#include <vnet/fib/fib_entry.h>
+#include <vnet/ip/ip6_link.h>
#include <vnet/plugin/plugin.h>
#include <vpp/app/version.h>
@@ -730,19 +731,16 @@ ip46_set_src_address (u32 sw_if_index, vlib_buffer_t * b0, int is_ip6)
int res;
if (is_ip6)
{
- ip6_main_t *im = &ip6_main;
ip6_header_t *ip6 = vlib_buffer_get_current (b0);
- res =
- ip6_src_address_for_packet (&im->lookup_main, sw_if_index,
- &ip6->dst_address, &ip6->src_address);
+ res = ip6_src_address_for_packet (sw_if_index,
+ &ip6->dst_address, &ip6->src_address);
}
else
{
ip4_main_t *im = &ip4_main;
ip4_header_t *ip4 = vlib_buffer_get_current (b0);
- res =
- ip4_src_address_for_packet (&im->lookup_main, sw_if_index,
- &ip4->src_address);
+ res = ip4_src_address_for_packet (&im->lookup_main,
+ sw_if_index, &ip4->src_address);
/* IP4 and IP6 paths have the inverse logic. Harmonize. */
res = !res;
}