Skip to content

Commit

Permalink
northd: Decrease arp_proxy priority to 30
Browse files Browse the repository at this point in the history
On cases where the configuration of arp_proxy collide with the default
ARP/NDP responder, the default responder should kick in instead of
arp_proxy to acomplish that this change decrease the priority from 50 to
30.

Fixes: 77846b2 ("northd, lsp: Add additional arp proxy features")
Signed-off-by: Enrique Llorente <ellorent@redhat.com>
Acked-by: Mark Michelson <mmichels@redhat.com>
Acked-by: Ales Musil <amusil@redhat.com>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
  • Loading branch information
qinqon authored and dceara committed May 2, 2023
1 parent e538927 commit 9e34292
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions northd/northd.c
Original file line number Diff line number Diff line change
Expand Up @@ -8799,7 +8799,7 @@ build_lswitch_arp_nd_responder_known_ips(struct ovn_port *op,
ea_s);

ovn_lflow_add_with_hint(lflows, op->od, S_SWITCH_IN_ARP_ND_RSP,
50, ds_cstr(match), ds_cstr(actions), &op->nbsp->header_);
30, ds_cstr(match), ds_cstr(actions), &op->nbsp->header_);
}

/* Add IPv6 NDP responses.
Expand Down Expand Up @@ -8843,7 +8843,7 @@ build_lswitch_arp_nd_responder_known_ips(struct ovn_port *op,
ea_s,
ea_s);
ovn_lflow_add_with_hint__(lflows, op->od,
S_SWITCH_IN_ARP_ND_RSP, 50,
S_SWITCH_IN_ARP_ND_RSP, 30,
ds_cstr(match),
ds_cstr(actions),
NULL,
Expand Down
10 changes: 5 additions & 5 deletions tests/ovn.at
Original file line number Diff line number Diff line change
Expand Up @@ -32089,7 +32089,7 @@ AT_CHECK([ovn-sbctl dump-flows |
grep ls_in_arp_rsp |
grep "${arp_proxy_ls1[[1]]}" |
sed 's/table=../table=??/'], [0], [dnl
table=??(ls_in_arp_rsp ), priority=50 , match=(arp.op == 1 && dnl
table=??(ls_in_arp_rsp ), priority=30 , match=(arp.op == 1 && dnl
arp.tpa == {169.254.238.0/24,169.254.239.2/32}), dnl
action=(eth.dst = eth.src; eth.src = 00:00:00:01:02:f1; arp.op = 2; dnl
/* ARP reply */ arp.tha = arp.sha; arp.sha = 00:00:00:01:02:f1; dnl
Expand All @@ -32101,7 +32101,7 @@ AT_CHECK([ovn-sbctl dump-flows |
grep ls_in_arp_rsp |
grep "${arp_proxy_ls1[[3]]}" |
sed 's/table=../table=??/'], [0], [dnl
table=??(ls_in_arp_rsp ), priority=50 , dnl
table=??(ls_in_arp_rsp ), priority=30 , dnl
match=(nd_ns && ip6.dst == { fd7b:6b4d:7b25:d22d::/64, ff02::1:ff00:0/64, dnl
fd7b:6b4d:7b25:d22f::1/128, ff02::1:ff00:1/128 } && dnl
nd.target == { fd7b:6b4d:7b25:d22d::/64, fd7b:6b4d:7b25:d22f::1/128 }), dnl
Expand All @@ -32115,7 +32115,7 @@ AT_CHECK([ovn-sbctl dump-flows |
grep ls_in_arp_rsp |
grep "${arp_proxy_ls2[[2]]}" |
sed 's/table=../table=??/'], [0], [dnl
table=??(ls_in_arp_rsp ), priority=50 , dnl
table=??(ls_in_arp_rsp ), priority=30 , dnl
match=(arp.op == 1 && arp.tpa == {169.254.236.0/24,169.254.237.2/32}), dnl
action=(eth.dst = eth.src; eth.src = 00:00:00:02:02:f1; arp.op = 2; dnl
/* ARP reply */ arp.tha = arp.sha; arp.sha = 00:00:00:02:02:f1; dnl
Expand All @@ -32127,7 +32127,7 @@ AT_CHECK([ovn-sbctl dump-flows |
grep ls_in_arp_rsp |
grep "${arp_proxy_ls2[[4]]}" |
sed 's/table=../table=??/'], [0], [dnl
table=??(ls_in_arp_rsp ), priority=50 , dnl
table=??(ls_in_arp_rsp ), priority=30 , dnl
match=(nd_ns && ip6.dst == { fd7b:6b4d:7b25:d22b::/64, ff02::1:ff00:0/64, dnl
fd7b:6b4d:7b25:d22c::1/128, ff02::1:ff00:1/128 } && dnl
nd.target == { fd7b:6b4d:7b25:d22b::/64, fd7b:6b4d:7b25:d22c::1/128 }), dnl
Expand Down Expand Up @@ -32194,7 +32194,7 @@ AT_CAPTURE_FILE([debug1])
# Check if packet hit the ARP reply ovs flow
AT_CHECK([ovs-ofctl dump-flows br-int | \
grep "${arp_proxy_ls1[[1]]}" | \
grep "priority=50" | \
grep "priority=30" | \
grep "arp_op=1" | \
grep "n_packets=1" | wc -l], [0], [dnl
1
Expand Down

0 comments on commit 9e34292

Please sign in to comment.