summaryrefslogtreecommitdiffstats
path: root/tests/data_plane/vpp_lite_topo/test_driver/ndp.sh
blob: 5280c6796a57f6366ec8b55bbb1e38a409827db9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
source config.sh
source odl_utils.sh
source topologies/3_node_star.sh

if [ "$1" == "clean" ] ; then
  3_node_star_topo_clean no_odl
  exit 0
fi

if [[ $(id -u) != 0 ]]; then
  echo "Error: run this as root."
  exit 1
fi

function send_icmp_from_namespace
{
  ip netns exec "$1" "$2" -w 15 -c 1 "$3"
}


function test_neighbor_discovery
{
  3_node_star_topo_setup no_odl no_arp

  maybe_pause
  send_icmp_from_namespace vpp-ns5 "$1" "$2"
  rc=$?

  maybe_pause
  3_node_star_topo_clean no_odl
  print_status $rc "No ICMP response!"
  exit $test_result
}