diff --git a/northd/northd.c b/northd/northd.c index f35e4ecb00..b416b6d6ab 100644 --- a/northd/northd.c +++ b/northd/northd.c @@ -11155,9 +11155,9 @@ build_neigh_learning_flows_for_lrouter( * address, the all-nodes multicast address. */ ds_clear(actions); ds_put_format(actions, REGBIT_LOOKUP_NEIGHBOR_RESULT - " = lookup_nd(inport, ip6.src, nd.tll); " + " = lookup_nd(inport, nd.target, nd.tll); " REGBIT_LOOKUP_NEIGHBOR_IP_RESULT - " = lookup_nd_ip(inport, ip6.src); next;"); + " = lookup_nd_ip(inport, nd.target); next;"); ovn_lflow_add(lflows, od, S_ROUTER_IN_LOOKUP_NEIGHBOR, 110, "nd_na && ip6.src == fe80::/10 " "&& ip6.dst == ff00::/8", diff --git a/tests/ovn.at b/tests/ovn.at index b986fcc356..02d358acc8 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -4937,10 +4937,11 @@ test_arp() { } test_na() { - local inport=$1 sha=$2 spa=$3 + local inport=$1 sha=$2 spa=$3 src=${4-$3} local request=$(fmt_pkt "Ether(dst='ff:ff:ff:ff:ff:ff', src='${sha}')/ \ - IPv6(dst='ff01::1', src='${spa}')/ \ - ICMPv6ND_NA(tgt='${spa}')") + IPv6(dst='ff01::1', src='${src}')/ \ + ICMPv6ND_NA(tgt='${spa}')/ \ + ICMPv6NDOptDstLLAddr(lladdr='${sha}')") hv=hv`vif_to_hv $inport` as $hv ovs-appctl netdev-dummy/receive vif$inport $request @@ -5016,6 +5017,24 @@ for i in 1 2; do done done +# Make sure that we can update existing entry with +# "always_learn_from_arp_request=false" even when the source of NA src is LLA. +check ovn-sbctl --all destroy mac_binding +check ovn-nbctl --wait=hv set logical_router lr0 options:always_learn_from_arp_request=false + +sha="f0:00:00:00:00:11" +spa6="fd00::abcd:1" + +test_na 11 $sha $spa6 +wait_row_count MAC_Binding 1 ip=\"$spa6\" mac=\"$sha\" + +sha="f0:00:00:00:00:12" +lla6="fe80::abcd:1" + +test_na 11 $sha $spa6 $lla6 +wait_row_count MAC_Binding 1 ip=\"$spa6\" mac=\"$sha\" +check_row_count MAC_Binding 0 ip=\"$lla6\" + # Gracefully terminate daemons OVN_CLEANUP([hv1], [hv2])