Skip to content

Commit e59626d

Browse files
Merge pull request #2806 from martinkennelly/420-garp
[release-4.20] OCPBUGS-62273: Fix EgressIP stale GARP post reboot + pod restart
2 parents 2229054 + 303f1e7 commit e59626d

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

bindata/network/ovn-kubernetes/common/008-script-lib.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,23 @@ data:
241241
--tls-cert-file=${clientcert}
242242
}
243243

244+
# Adds drop flows for GARPs coming from patch port to br-int for fn arg bridge name.
245+
# Remove when https://issues.redhat.com/browse/FDP-1537 lands in OVN core.
246+
add_garp_drop_flow() {
247+
local bridge="$1"
248+
local cookie="0x0305"
249+
local priority="499"
250+
# FIXME: can we generate the exact name. Its possible we add these flows to the incorrect port when selecting on substring
251+
for port_name in $(ovs-vsctl list-ports "$bridge"); do
252+
if [[ "$port_name" == *to-br-int ]]; then
253+
local of_port
254+
of_port=$(ovs-vsctl get interface "$port_name" ofport)
255+
ovs-ofctl add-flow "$bridge" "cookie=$cookie,table=0,priority=$priority,in_port=$of_port,arp,arp_op=1,actions=drop" > /dev/null
256+
break
257+
fi
258+
done
259+
}
260+
244261
# quit-nbdb() will cleanly shut down the northbound dbserver. It is intended
245262
# to be run from a bash 'trap' like so:
246263
#
@@ -498,6 +515,13 @@ data:
498515
exit 1
499516
fi
500517

518+
# start temp work around
519+
# remove when https://issues.redhat.com/browse/FDP-1537 is available
520+
if ovs-vsctl br-exists "br-ex"; then
521+
add_garp_drop_flow br-ex
522+
fi
523+
# end temp work around
524+
501525
# copy the right CNI shim for the host OS
502526
cni-bin-copy
503527

0 commit comments

Comments
 (0)