Repository: antrea-io/antrea
Pull request #4421 (2022-11-29 22:23:22)

Bump github.com/onsi/gomega from 1.22.1 to 1.24.1
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.22.1 to 1.24.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/onsi/gomega/releases">github.com/onsi/gomega's releases</a>.</em></p>
<blockquote>
<h2>v1.24.1</h2>
<p>No release notes provided.</p>
<h2>v1.24.0</h2>
<h2>1.24.0</h2>
<h3>Features</h3>
<p>Introducting <a href="https://onsi.github.io/gomega/#gcustom-a-convenient-mechanism-for-buildling-custom-matchers">gcustom</a> - a convenient mechanism for building custom matchers.</p>
<p>This is an RC release for <code>gcustom</code>.  The external API may be tweaked in response to feedback however it is expected to remain mostly stable.</p>
<h3>Maintenance</h3>
<ul>
<li>Update BeComparableTo documentation [756eaa0]</li>
</ul>
<h2>v1.23.0</h2>
<h2>1.23.0</h2>
<h3>Features</h3>
<ul>
<li>
<p>Custom formatting on a per-type basis can be provided using <code>format.RegisterCustomFormatter()</code> -- see the docs <a href="https://onsi.github.io/gomega/#adjusting-output">here</a></p>
</li>
<li>
<p>Substantial improvement have been made to <code>StopTrying()</code>:</p>
<ul>
<li>Users can now use <code>StopTrying().Wrap(err)</code> to wrap errors and <code>StopTrying().Attach(description, object)</code> to attach arbitrary objects to the <code>StopTrying()</code> error</li>
<li><code>StopTrying()</code> is now always interpreted as a failure.  If you are an early adopter of <code>StopTrying()</code> you may need to change your code as the prior version would match against the returned value even if <code>StopTrying()</code> was returned.  Going forward the <code>StopTrying()</code> api should remain stable.</li>
<li><code>StopTrying()</code> and <code>StopTrying().Now()</code> can both be used in matchers - not just polled functions.</li>
</ul>
</li>
<li>
<p><code>TryAgainAfter(duration)</code> is used like <code>StopTrying()</code> but instructs <code>Eventually</code> and <code>Consistently</code> that the poll should be tried again after the specified duration.  This allows you to dynamically adjust the polling duration.</p>
</li>
<li>
<p><code>ctx</code> can now be passed-in as the first argument to <code>Eventually</code> and <code>Consistently</code>.</p>
</li>
</ul>
<h2>Maintenance</h2>
<ul>
<li>Bump github.com/onsi/ginkgo/v2 from 2.3.0 to 2.3.1 (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/597">#597</a>) [afed901]</li>
<li>Bump nokogiri from 1.13.8 to 1.13.9 in /docs (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/599">#599</a>) [7c691b3]</li>
<li>Bump github.com/google/go-cmp from 0.5.8 to 0.5.9 (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/587">#587</a>) [ff22665]</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/onsi/gomega/blob/master/CHANGELOG.md">github.com/onsi/gomega's changelog</a>.</em></p>
<blockquote>
<h2>1.24.1</h2>
<h3>Fixes</h3>
<ul>
<li>maintain backward compatibility for Eventually and Consisntetly's signatures [4c7df5e]</li>
<li>fix small typo (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/601">#601</a>) [ea0ebe6]</li>
</ul>
<h3>Maintenance</h3>
<ul>
<li>Bump golang.org/x/net from 0.1.0 to 0.2.0 (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/603">#603</a>) [1ba8372]</li>
<li>Bump github.com/onsi/ginkgo/v2 from 2.4.0 to 2.5.0 (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/602">#602</a>) [f9426cb]</li>
<li>fix label-filter in test.yml [d795db6]</li>
<li>stop running flakey tests and rely on external network dependencies in CI [7133290]</li>
</ul>
<h2>1.24.0</h2>
<h3>Features</h3>
<p>Introducting <a href="https://onsi.github.io/gomega/#gcustom-a-convenient-mechanism-for-buildling-custom-matchers">gcustom</a> - a convenient mechanism for building custom matchers.</p>
<p>This is an RC release for <code>gcustom</code>.  The external API may be tweaked in response to feedback however it is expected to remain mostly stable.</p>
<h3>Maintenance</h3>
<ul>
<li>Update BeComparableTo documentation [756eaa0]</li>
</ul>
<h2>1.23.0</h2>
<h3>Features</h3>
<ul>
<li>
<p>Custom formatting on a per-type basis can be provided using <code>format.RegisterCustomFormatter()</code> -- see the docs <a href="https://onsi.github.io/gomega/#adjusting-output">here</a></p>
</li>
<li>
<p>Substantial improvement have been made to <code>StopTrying()</code>:</p>
<ul>
<li>Users can now use <code>StopTrying().Wrap(err)</code> to wrap errors and <code>StopTrying().Attach(description, object)</code> to attach arbitrary objects to the <code>StopTrying()</code> error</li>
<li><code>StopTrying()</code> is now always interpreted as a failure.  If you are an early adopter of <code>StopTrying()</code> you may need to change your code as the prior version would match against the returned value even if <code>StopTrying()</code> was returned.  Going forward the <code>StopTrying()</code> api should remain stable.</li>
<li><code>StopTrying()</code> and <code>StopTrying().Now()</code> can both be used in matchers - not just polled functions.</li>
</ul>
</li>
<li>
<p><code>TryAgainAfter(duration)</code> is used like <code>StopTrying()</code> but instructs <code>Eventually</code> and <code>Consistently</code> that the poll should be tried again after the specified duration.  This allows you to dynamically adjust the polling duration.</p>
</li>
<li>
<p><code>ctx</code> can now be passed-in as the first argument to <code>Eventually</code> and <code>Consistently</code>.</p>
</li>
</ul>
<h2>Maintenance</h2>
<ul>
<li>Bump github.com/onsi/ginkgo/v2 from 2.3.0 to 2.3.1 (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/597">#597</a>) [afed901]</li>
<li>Bump nokogiri from 1.13.8 to 1.13.9 in /docs (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/599">#599</a>) [7c691b3]</li>
<li>Bump github.com/google/go-cmp from 0.5.8 to 0.5.9 (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/587">#587</a>) [ff22665]</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/onsi/gomega/commit/3eef0d7813628f9e4bcfb93e6dd3e8cd12342cd6"><code>3eef0d7</code></a> v1.24.1</li>
<li><a href="https://github.com/onsi/gomega/commit/4c7df5e4410ca8808b0c7d783a67276c7d66bd1d"><code>4c7df5e</code></a> maintain backward compatibility for Eventually and Consisntetly's signatures</li>
<li><a href="https://github.com/onsi/gomega/commit/1ba837273b0a831eb63517e7b420b6dbb77ba9a7"><code>1ba8372</code></a> Bump golang.org/x/net from 0.1.0 to 0.2.0 (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/603">#603</a>)</li>
<li><a href="https://github.com/onsi/gomega/commit/f9426cb65c62d6aba984200a75552119dca077c8"><code>f9426cb</code></a> Bump github.com/onsi/ginkgo/v2 from 2.4.0 to 2.5.0 (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/602">#602</a>)</li>
<li><a href="https://github.com/onsi/gomega/commit/ea0ebe63c4f7ebba21cbb115e3653427b34750f8"><code>ea0ebe6</code></a> fix small typo (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/601">#601</a>)</li>
<li><a href="https://github.com/onsi/gomega/commit/d795db6ca6927dacbd7f46d20ee54023b46542c1"><code>d795db6</code></a> fix label-filter in test.yml</li>
<li><a href="https://github.com/onsi/gomega/commit/7133290814e1dd9bc139f8cf189f8c0f8a55f457"><code>7133290</code></a> stop running flakey tests and rely on external network dependencies in CI</li>
<li><a href="https://github.com/onsi/gomega/commit/ed1156b0d67f9a0bda9d5474004ed2c5d250b95a"><code>ed1156b</code></a> v1.24.0</li>
<li><a href="https://github.com/onsi/gomega/commit/756eaa0f413f23763237bbd0f57e9e8552e97427"><code>756eaa0</code></a> Update BeComparableTo documentation</li>
<li><a href="https://github.com/onsi/gomega/commit/6015576546329c35c450f4ccbda1981c709c4d4c"><code>6015576</code></a> finish documenting gcustom</li>
<li>Additional commits viewable in <a href="https://github.com/onsi/gomega/compare/v1.22.1...v1.24.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/onsi/gomega&package-manager=go_modules&previous-version=1.22.1&new-version=1.24.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

codecov[bot]: # [Codecov](https://codecov.io/gh/antrea-io/antrea/pull/4421?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=antrea-io) Report
> Merging [#4421](https://codecov.io/gh/antrea-io/antrea/pull/4421?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=antrea-io) (9d91c14) into [main](https://codecov.io/gh/antrea-io/antrea/commit/f1b30b15de4e9dd1c34761dfaf95f90dac843835?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=antrea-io) (f1b30b1) will **increase** coverage by `1.77%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/antrea-io/antrea/pull/4421/graphs/tree.svg?width=650&height=150&src=pr&token=TjWaLL2GoC&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=antrea-io)](https://codecov.io/gh/antrea-io/antrea/pull/4421?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=antrea-io)

```diff
@@            Coverage Diff             @@
##             main    #4421      +/-   ##
==========================================
+ Coverage   60.59%   62.37%   +1.77%     
==========================================
  Files         400      376      -24     
  Lines       56854    54603    -2251     
==========================================
- Hits        34453    34058     -395     
+ Misses      19881    18049    -1832     
+ Partials     2520     2496      -24     
```

| Flag | Coverage Δ | | *Carryforward flag |
|---|---|---|---|
| integration-tests | `34.62% <ø> (-0.05%)` | :arrow_down: | |
| kind-e2e-tests | `29.40% <ø> (ø)` | | Carriedforward from [f1b30b1](https://codecov.io/gh/antrea-io/antrea/commit/f1b30b15de4e9dd1c34761dfaf95f90dac843835?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=antrea-io) |
| unit-tests | `51.20% <ø> (+1.32%)` | :arrow_up: | |

*This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=antrea-io) to find out more.

| [Impacted Files](https://codecov.io/gh/antrea-io/antrea/pull/4421?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=antrea-io) | Coverage Δ | |
|---|---|---|
| [pkg/features/antrea\_features.go](https://codecov.io/gh/antrea-io/antrea/pull/4421/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=antrea-io#diff-cGtnL2ZlYXR1cmVzL2FudHJlYV9mZWF0dXJlcy5nbw==) | `64.00% <0.00%> (-36.00%)` | :arrow_down: |
| [cmd/antrea-agent/options.go](https://codecov.io/gh/antrea-io/antrea/pull/4421/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=antrea-io#diff-Y21kL2FudHJlYS1hZ2VudC9vcHRpb25zLmdv) | `3.55% <0.00%> (-20.31%)` | :arrow_down: |
| [pkg/apiserver/handlers/endpoint/handler.go](https://codecov.io/gh/antrea-io/antrea/pull/4421/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=antrea-io#diff-cGtnL2FwaXNlcnZlci9oYW5kbGVycy9lbmRwb2ludC9oYW5kbGVyLmdv) | `56.52% <0.00%> (-13.05%)` | :arrow_down: |
| [pkg/apiserver/certificate/certificate.go](https://codecov.io/gh/antrea-io/antrea/pull/4421/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=antrea-io#diff-cGtnL2FwaXNlcnZlci9jZXJ0aWZpY2F0ZS9jZXJ0aWZpY2F0ZS5nbw==) | `70.37% <0.00%> (-6.49%)` | :arrow_down: |
| [pkg/util/env/env.go](https://codecov.io/gh/antrea-io/antrea/pull/4421/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=antrea-io#diff-cGtnL3V0aWwvZW52L2Vudi5nbw==) | `58.73% <0.00%> (-4.77%)` | :arrow_down: |
| [pkg/antctl/runtime/runtime.go](https://codecov.io/gh/antrea-io/antrea/pull/4421/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=antrea-io#diff-cGtnL2FudGN0bC9ydW50aW1lL3J1bnRpbWUuZ28=) | `33.33% <0.00%> (-3.34%)` | :arrow_down: |
| [pkg/controller/ipam/antrea\_ipam\_controller.go](https://codecov.io/gh/antrea-io/antrea/pull/4421/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=antrea-io#diff-cGtnL2NvbnRyb2xsZXIvaXBhbS9hbnRyZWFfaXBhbV9jb250cm9sbGVyLmdv) | `75.25% <0.00%> (-3.02%)` | :arrow_down: |
| [pkg/apiserver/storage/ram/watch.go](https://codecov.io/gh/antrea-io/antrea/pull/4421/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=antrea-io#diff-cGtnL2FwaXNlcnZlci9zdG9yYWdlL3JhbS93YXRjaC5nbw==) | `86.66% <0.00%> (-2.67%)` | :arrow_down: |
| [...catesigningrequest/ipsec\_csr\_signing\_controller.go](https://codecov.io/gh/antrea-io/antrea/pull/4421/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=antrea-io#diff-cGtnL2NvbnRyb2xsZXIvY2VydGlmaWNhdGVzaWduaW5ncmVxdWVzdC9pcHNlY19jc3Jfc2lnbmluZ19jb250cm9sbGVyLmdv) | `61.65% <0.00%> (-2.46%)` | :arrow_down: |
| [pkg/ipam/poolallocator/allocator.go](https://codecov.io/gh/antrea-io/antrea/pull/4421/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=antrea-io#diff-cGtnL2lwYW0vcG9vbGFsbG9jYXRvci9hbGxvY2F0b3IuZ28=) | `71.42% <0.00%> (-2.39%)` | :arrow_down: |
| ... and [32 more](https://codecov.io/gh/antrea-io/antrea/pull/4421/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=antrea-io) | |

antoninbas: /test-all

Patch:
diff --git a/.gitignore b/.gitignore
index 8d667890c..a8f97280f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@ bin
 .cache
 .golangci-bin
 .coverage/
+.trivy-bin
 
 .DS_Store
 
diff --git a/Makefile b/Makefile
index 57e8a1074..2a5467477 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,7 @@ NANOSERVER_VERSION := $(shell head -n 1 build/images/deps/nanoserver-version)
 WIN_BUILD_TAG      := $(shell echo $(GO_VERSION) $(CNI_BINARIES_VERSION) $(NANOSERVER_VERSION)|md5sum|head -c 10)
 GIT_HOOKS := $(shell find hack/git_client_side_hooks -type f -print)
 DOCKER_NETWORK     ?= default
+TRIVY_TARGET_IMAGE ?=
 
 DOCKER_BUILD_ARGS = --build-arg OVS_VERSION=$(OVS_VERSION)
 DOCKER_BUILD_ARGS += --build-arg GO_VERSION=$(GO_VERSION)
@@ -50,6 +51,16 @@ bin:
 	@mkdir -p $(BINDIR)
 	GOOS=linux $(GO) build -o $(BINDIR) $(GOFLAGS) -ldflags '$(LDFLAGS)' antrea.io/antrea/cmd/...
 
+.trivy-bin:
+	curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b $@ v0.34.0
+
+check-%:
+	@: $(if $(value $*),,$(error $* is undefined))
+
+.PHONY: trivy-scan
+trivy-scan: .trivy-bin check-TRIVY_TARGET_IMAGE
+	$(CURDIR)/.trivy-bin/trivy image --exit-code 1 --severity CRITICAL,HIGH --ignore-unfixed $(TRIVY_TARGET_IMAGE)
+
 .PHONY: antrea-agent
 antrea-agent:
 	@mkdir -p $(BINDIR)
@@ -301,6 +312,7 @@ clean:
 	@rm -rf $(DOCKER_CACHE)
 	@rm -rf .golangci-bin
 	@rm -rf .coverage
+	@rm -rf .trivy-bin
 
 .PHONY: codegen
 codegen:
diff --git a/go.mod b/go.mod
index d66740900..507a22803 100644
--- a/go.mod
+++ b/go.mod
@@ -42,7 +42,7 @@ require (
 	github.com/miekg/dns v1.1.50
 	github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
 	github.com/onsi/ginkgo v1.16.5
-	github.com/onsi/gomega v1.22.1
+	github.com/onsi/gomega v1.24.1
 	github.com/pkg/errors v0.9.1
 	github.com/prometheus/client_golang v1.13.1
 	github.com/prometheus/common v0.37.0
@@ -57,9 +57,9 @@ require (
 	golang.org/x/crypto v0.1.0
 	golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6
 	golang.org/x/mod v0.7.0
-	golang.org/x/net v0.1.0
+	golang.org/x/net v0.2.0
 	golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
-	golang.org/x/sys v0.1.0
+	golang.org/x/sys v0.2.0
 	golang.org/x/time v0.0.0-20220210224613-90d013bbcef8
 	golang.org/x/tools v0.2.0
 	golang.zx2c4.com/wireguard/wgctrl v0.0.0-20210506160403-92e472f520a5
@@ -135,7 +135,7 @@ require (
 	github.com/go-openapi/swag v0.19.14 // indirect
 	github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
 	github.com/google/gnostic v0.5.7-v3refs // indirect
-	github.com/google/go-cmp v0.5.8 // indirect
+	github.com/google/go-cmp v0.5.9 // indirect
 	github.com/google/gofuzz v1.1.0 // indirect
 	github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
 	github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
@@ -196,7 +196,7 @@ require (
 	go.uber.org/multierr v1.6.0 // indirect
 	go.uber.org/zap v1.19.1 // indirect
 	golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
-	golang.org/x/term v0.1.0 // indirect
+	golang.org/x/term v0.2.0 // indirect
 	golang.org/x/text v0.4.0 // indirect
 	golang.zx2c4.com/wireguard v0.0.0-20210427022245-097af6e1351b // indirect
 	gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
diff --git a/go.sum b/go.sum
index 59ee682db..41a3a6261 100644
--- a/go.sum
+++ b/go.sum
@@ -478,8 +478,9 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
 github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
 github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
+github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
 github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
 github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=
 github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
@@ -743,15 +744,15 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108
 github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
 github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
 github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
-github.com/onsi/ginkgo/v2 v2.3.0 h1:kUMoxMoQG3ogk/QWyKh3zibV7BKZ+xBpWil1cTylVqc=
+github.com/onsi/ginkgo/v2 v2.5.0 h1:TRtrvv2vdQqzkwrQ1ke6vtXf7IK34RBUJafIy1wMwls=
 github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
 github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
 github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
 github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
 github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA=
 github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
-github.com/onsi/gomega v1.22.1 h1:pY8O4lBfsHKZHM/6nrxkhVPUznOlIu3quZcKP/M20KI=
-github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ1tuM=
+github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E=
+github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM=
 github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
 github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
@@ -1156,8 +1157,8 @@ golang.org/x/net v0.0.0-20211201190559-0a0e4e1bb54c/go.mod h1:9nx3DQGgdP8bBQD5qx
 golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
 golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
 golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
-golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0=
-golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
+golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU=
+golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
 golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
 golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
 golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -1291,14 +1292,14 @@ golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBc
 golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
-golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=
+golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
-golang.org/x/term v0.1.0 h1:g6Z6vPFA9dYBAF7DWcH6sCcOntplXsDKcliusYijMlw=
-golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/term v0.2.0 h1:z85xZCsEl7bi/KwbNADeBYoOP0++7W1ipu+aGnpwzRM=
+golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
 golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
diff --git a/pkg/agent/multicast/mcast_controller.go b/pkg/agent/multicast/mcast_controller.go
index e04b5dd64..a1df1200e 100644
--- a/pkg/agent/multicast/mcast_controller.go
+++ b/pkg/agent/multicast/mcast_controller.go
@@ -340,16 +340,6 @@ func (c *Controller) Initialize() error {
 	if err != nil {
 		return err
 	}
-	// Install flows on OVS for IGMP packets and multicast traffic forwarding:
-	// 1) send the IGMP report messages to Antrea Agent,
-	// 2) forward the IGMP query messages to all local Pods,
-	// 3) forward the multicast traffic to antrea-gw0 if no local Pods have joined in the group, and this is to ensure
-	//    local Pods can access the external multicast receivers.
-	err = c.ofClient.InstallMulticastInitialFlows(uint8(openflow.PacketInReasonMC))
-	if err != nil {
-		klog.ErrorS(err, "Failed to install multicast initial flows")
-		return err
-	}
 	err = c.initQueryGroup()
 	if err != nil {
 		return err
diff --git a/pkg/agent/openflow/client.go b/pkg/agent/openflow/client.go
index 6634bce61..84aa5081c 100644
--- a/pkg/agent/openflow/client.go
+++ b/pkg/agent/openflow/client.go
@@ -278,9 +278,6 @@ type Client interface {
 	AddAddressToDNSConjunction(id uint32, addrs []types.Address) error
 	// DeleteAddressFromDNSConjunction removes addresses from the toAddresses of the dns packetIn conjunction.
 	DeleteAddressFromDNSConjunction(id uint32, addrs []types.Address) error
-	// InstallMulticastInitialFlows installs OpenFlow to packetIn the IGMP messages and output the Multicast traffic to
-	// antrea-gw0 so that local Pods could access external Multicast servers.
-	InstallMulticastInitialFlows(pktInReason uint8) error
 
 	// InstallMulticastFlows installs the flow to forward Multicast traffic normally, and output it to antrea-gw0
 	// to ensure it can be forwarded to the external addresses.
@@ -1217,19 +1214,6 @@ func (c *client) SendUDPPacketOut(
 	return c.bridge.SendPacketOut(packetOutObj)
 }
 
-func (c *client) InstallMulticastInitialFlows(pktInReason uint8) error {
-	flows := c.featureMulticast.igmpPktInFlows(pktInReason)
-	flows = append(flows, c.featureMulticast.externalMulticastReceiverFlow())
-	flows = append(flows, c.featureMulticast.multicastSkipIGMPMetricFlows()...)
-	if c.enableAntreaPolicy {
-		flows = append(flows, c.featureMulticast.igmpEgressFlow())
-	}
-	cacheKey := "multicast"
-	c.replayMutex.RLock()
-	defer c.replayMutex.RUnlock()
-	return c.addFlows(c.featureMulticast.cachedFlows, cacheKey, flows)
-}
-
 func (c *client) InstallMulticastFlows(multicastIP net.IP, groupID binding.GroupIDType) error {
 	flows := c.featureMulticast.localMulticastForwardFlows(multicastIP, groupID)
 	cacheKey := fmt.Sprintf("multicast_%s", multicastIP.String())
diff --git a/pkg/agent/openflow/multicast.go b/pkg/agent/openflow/multicast.go
index 143a711e8..1d2bfed5a 100644
--- a/pkg/agent/openflow/multicast.go
+++ b/pkg/agent/openflow/multicast.go
@@ -73,8 +73,19 @@ func multicastPipelineClassifyFlow(cookieID uint64, pipeline binding.Pipeline) b
 }
 
 func (f *featureMulticast) initFlows() []binding.Flow {
-	cookieID := f.cookieAllocator.Request(f.category).Raw()
-	return f.multicastOutputFlows(cookieID)
+	// Install flows to send the IGMP report messages to Antrea Agent.
+	flows := f.igmpPktInFlows(uint8(PacketInReasonMC))
+	// Install flow to forward the IGMP query messages to all local Pods.
+	flows = append(flows, f.externalMulticastReceiverFlow())
+	// Install flows to forward the multicast traffic to antrea-gw0 if no local Pods have joined in the group, and this
+	// is to ensure local Pods can access the external multicast receivers.
+	flows = append(flows, f.multicastSkipIGMPMetricFlows()...)
+	if f.enableAntreaPolicy {
+		flows = append(flows, f.igmpEgressFlow())
+	}
+	// Install flows to output multicast packets.
+	flows = append(flows, f.multicastOutputFlows()...)
+	return flows
 }
 
 func (f *featureMulticast) replayFlows() []binding.Flow {
@@ -114,7 +125,8 @@ func (f *featureMulticast) multicastReceiversGroup(groupID binding.GroupIDType,
 	return nil
 }
 
-func (f *featureMulticast) multicastOutputFlows(cookieID uint64) []binding.Flow {
+func (f *featureMulticast) multicastOutputFlows() []binding.Flow {
+	cookieID := f.cookieAllocator.Request(f.category).Raw()
 	flows := []binding.Flow{
 		MulticastOutputTable.ofTable.BuildFlow(priorityNormal).
 			Cookie(cookieID).
diff --git a/plugins/octant/go.mod b/plugins/octant/go.mod
index ae97b4256..a3c963762 100644
--- a/plugins/octant/go.mod
+++ b/plugins/octant/go.mod
@@ -43,7 +43,7 @@ require (
 	github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
 	github.com/golang/protobuf v1.5.2 // indirect
 	github.com/golang/snappy v0.0.3 // indirect
-	github.com/google/go-cmp v0.5.8 // indirect
+	github.com/google/go-cmp v0.5.9 // indirect
 	github.com/google/go-intervals v0.0.2 // indirect
 	github.com/google/gofuzz v1.2.0 // indirect
 	github.com/google/uuid v1.3.0 // indirect
@@ -103,11 +103,11 @@ require (
 	go.uber.org/goleak v1.1.12 // indirect
 	go.uber.org/multierr v1.6.0 // indirect
 	go.uber.org/zap v1.19.1 // indirect
-	golang.org/x/net v0.1.0 // indirect
+	golang.org/x/net v0.2.0 // indirect
 	golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
 	golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
-	golang.org/x/sys v0.1.0 // indirect
-	golang.org/x/term v0.1.0 // indirect
+	golang.org/x/sys v0.2.0 // indirect
+	golang.org/x/term v0.2.0 // indirect
 	golang.org/x/text v0.4.0 // indirect
 	golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
 	google.golang.org/appengine v1.6.7 // indirect
diff --git a/plugins/octant/go.sum b/plugins/octant/go.sum
index 2277d491b..ea3793108 100644
--- a/plugins/octant/go.sum
+++ b/plugins/octant/go.sum
@@ -427,8 +427,8 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
 github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
-github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
+github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
 github.com/google/go-intervals v0.0.2 h1:FGrVEiUnTRKR8yE04qzXYaJMtnIYqobR5QbblK3ixcM=
 github.com/google/go-intervals v0.0.2/go.mod h1:MkaR3LNRfeKLPmqgJYs4E66z5InYjmCjbbr4TQlcT6Y=
 github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
@@ -666,7 +666,7 @@ github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa
 github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
 github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
 github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc=
-github.com/onsi/gomega v1.22.1 h1:pY8O4lBfsHKZHM/6nrxkhVPUznOlIu3quZcKP/M20KI=
+github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E=
 github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
 github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
 github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
@@ -1021,8 +1021,8 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b
 golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
 golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
 golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
-golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0=
-golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
+golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU=
+golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
 golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
 golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
 golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -1148,14 +1148,14 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc
 golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
-golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=
+golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
-golang.org/x/term v0.1.0 h1:g6Z6vPFA9dYBAF7DWcH6sCcOntplXsDKcliusYijMlw=
-golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/term v0.2.0 h1:z85xZCsEl7bi/KwbNADeBYoOP0++7W1ipu+aGnpwzRM=
+golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
 golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=


Test patch:
diff --git a/pkg/agent/multicast/mcast_controller_test.go b/pkg/agent/multicast/mcast_controller_test.go
index 06fedf573..90e336bac 100644
--- a/pkg/agent/multicast/mcast_controller_test.go
+++ b/pkg/agent/multicast/mcast_controller_test.go
@@ -775,7 +775,6 @@ func newMockMulticastController(t *testing.T, isEncap bool) *Controller {
 }
 
 func (c *Controller) initialize(t *testing.T) error {
-	mockOFClient.EXPECT().InstallMulticastInitialFlows(uint8(0)).Times(1)
 	mockOFClient.EXPECT().InstallMulticastGroup(c.queryGroupId, gomock.Any(), gomock.Any()).Times(1)
 	mockOFClient.EXPECT().InstallMulticastFlows(gomock.Any(), gomock.Any())
 	mockIfaceStore.EXPECT().GetInterfacesByType(interfacestore.InterfaceType(0)).Times(1).Return([]*interfacestore.InterfaceConfig{})
diff --git a/pkg/agent/openflow/multicast_test.go b/pkg/agent/openflow/multicast_test.go
deleted file mode 100644
index 2a6eec7f7..000000000
--- a/pkg/agent/openflow/multicast_test.go
+++ /dev/null
@@ -1,185 +0,0 @@
-// Copyright 2022 Antrea Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package openflow
-
-import (
-	"sync"
-	"testing"
-
-	"github.com/golang/mock/gomock"
-	"github.com/stretchr/testify/require"
-
-	"antrea.io/antrea/pkg/agent/config"
-	"antrea.io/antrea/pkg/agent/openflow/cookie"
-	oftest "antrea.io/antrea/pkg/agent/openflow/testing"
-	binding "antrea.io/antrea/pkg/ovs/openflow"
-	mocks "antrea.io/antrea/pkg/ovs/openflow/testing"
-)
-
-var (
-	bakMulticastEgressRuleTable       binding.Table
-	bakMulticastEgressPodMetricTable  binding.Table
-	bakMulticastRoutingTable          binding.Table
-	bakMulticastOutputTable           binding.Table
-	bakMulticastIngressPodMetricTable binding.Table
-
-	mockMulticastEgressRuleTable       *mocks.MockTable
-	mockMulticastEgressPodMetricTable  *mocks.MockTable
-	mockMulticastRoutingTable          *mocks.MockTable
-	mockMulticastOutputTable           *mocks.MockTable
-	mockMulticastIngressPodMetricTable *mocks.MockTable
-
-	mockFeatureMulticast = featureMulticast{
-		enableAntreaPolicy: true,
-		cookieAllocator:    cookie.NewAllocator(0),
-		category:           cookie.Multicast,
-		cachedFlows:        newFlowCategoryCache(),
-		groupCache:         sync.Map{},
-	}
-)
-
-func newMockPktInFlowBuilder(ctrl *gomock.Controller) *mocks.MockFlowBuilder {
-	pktInFlowBuilder := mocks.NewMockFlowBuilder(ctrl)
-	pktInFlowBuilder.EXPECT().Cookie(gomock.Any()).Return(pktInFlowBuilder).AnyTimes()
-	pktInFlowBuilder.EXPECT().MatchProtocol(gomock.Any()).Return(pktInFlowBuilder).AnyTimes()
-	pktInFlowBuilder.EXPECT().MatchRegMark(gomock.Any()).Return(pktInFlowBuilder).AnyTimes()
-	action := mocks.NewMockAction(ctrl)
-	action.EXPECT().LoadRegMark(gomock.Any()).Return(pktInFlowBuilder).AnyTimes()
-	pktInFlowBuilder.EXPECT().Action().Return(action).Times(1)
-	action.EXPECT().SendToController(gomock.Any()).Return(pktInFlowBuilder).AnyTimes()
-	pktInFlowBuilder.EXPECT().Action().Return(action).Times(1)
-
-	pktInFlow := mocks.NewMockFlow(ctrl)
-	pktInFlowBuilder.EXPECT().Done().Return(pktInFlow).Times(1)
-	pktInFlow.EXPECT().MatchString().Return("").AnyTimes()
-
-	return pktInFlowBuilder
-}
-
-func newMockExternalMulticastReceiver(ctrl *gomock.Controller) *mocks.MockFlowBuilder {
-	externalMcastReceiverFlowBuilder := mocks.NewMockFlowBuilder(ctrl)
-
-	externalMcastReceiverFlowBuilder.EXPECT().Cookie(gomock.Any()).Return(externalMcastReceiverFlowBuilder).AnyTimes()
-	externalMcastReceiverFlowBuilder.EXPECT().MatchProtocol(gomock.Any()).Return(externalMcastReceiverFlowBuilder).AnyTimes()
-
-	action := mocks.NewMockAction(ctrl)
-	action.EXPECT().LoadRegMark(gomock.Any()).Return(externalMcastReceiverFlowBuilder).AnyTimes()
-	externalMcastReceiverFlowBuilder.EXPECT().Action().Return(action).Times(1)
-	action.EXPECT().LoadToRegField(gomock.Any(), gomock.Any()).Return(externalMcastReceiverFlowBuilder).AnyTimes()
-	externalMcastReceiverFlowBuilder.EXPECT().Action().Return(action).Times(1)
-	action.EXPECT().GotoStage(gomock.Any()).Return(externalMcastReceiverFlowBuilder).AnyTimes()
-	externalMcastReceiverFlowBuilder.EXPECT().Action().Return(action).Times(1)
-
-	externalMcastReceiverFlow := mocks.NewMockFlow(ctrl)
-	externalMcastReceiverFlowBuilder.EXPECT().Done().Return(externalMcastReceiverFlow).Times(1)
-	externalMcastReceiverFlow.EXPECT().MatchString().Return("").AnyTimes()
-
-	return externalMcastReceiverFlowBuilder
-}
-
-func newMockMulticastSkipIGMPMetricFlows(ctrl *gomock.Controller) *mocks.MockFlowBuilder {
-	mockFlowBuilder := mocks.NewMockFlowBuilder(ctrl)
-	mockFlowBuilder.EXPECT().Cookie(gomock.Any()).Return(mockFlowBuilder).AnyTimes()
-	mockFlowBuilder.EXPECT().MatchProtocol(gomock.Any()).Return(mockFlowBuilder).AnyTimes()
-	action := mocks.NewMockAction(ctrl)
-	action.EXPECT().NextTable().Return(mockFlowBuilder).AnyTimes()
-	mockFlowBuilder.EXPECT().Action().Return(action).Times(1)
-	mockFlow := mocks.NewMockFlow(ctrl)
-	mockFlowBuilder.EXPECT().Done().Return(mockFlow).Times(1)
-	mockFlow.EXPECT().MatchString().Return("").AnyTimes()
-	return mockFlowBuilder
-}
-
-func newMockIGMPFlowBuilder(ctrl *gomock.Controller) *mocks.MockFlowBuilder {
-	igmpFlowBuilder := mocks.NewMockFlowBuilder(ctrl)
-	igmpFlowBuilder.EXPECT().Cookie(gomock.Any()).Return(igmpFlowBuilder).Times(1)
-	igmpFlowBuilder.EXPECT().MatchProtocol(gomock.Any()).Return(igmpFlowBuilder).Times(1)
-	igmpFlowBuilder.EXPECT().MatchRegMark(gomock.Any()).Return(igmpFlowBuilder).Times(1)
-	action := mocks.NewMockAction(ctrl)
-	action.EXPECT().GotoStage(gomock.Any()).Return(igmpFlowBuilder).Times(1)
-	igmpFlowBuilder.EXPECT().Action().Return(action).Times(1)
-	igmpFlow := mocks.NewMockFlow(ctrl)
-	igmpFlowBuilder.EXPECT().Done().Return(igmpFlow).Times(1)
-	igmpFlow.EXPECT().MatchString().Return("").AnyTimes()
-	return igmpFlowBuilder
-}
-
-func initMockTables(ctrl *gomock.Controller) {
-	mockMulticastEgressRuleTable = mocks.NewMockTable(ctrl)
-	mockMulticastEgressPodMetricTable = mocks.NewMockTable(ctrl)
-	mockMulticastRoutingTable = mocks.NewMockTable(ctrl)
-	mockMulticastOutputTable = mocks.NewMockTable(ctrl)
-	mockMulticastIngressPodMetricTable = mocks.NewMockTable(ctrl)
-
-	bakMulticastEgressRuleTable = MulticastEgressRuleTable.ofTable
-	bakMulticastEgressPodMetricTable = MulticastEgressPodMetricTable.ofTable
-	bakMulticastRoutingTable = MulticastRoutingTable.ofTable
-	bakMulticastOutputTable = MulticastOutputTable.ofTable
-	bakMulticastIngressPodMetricTable = MulticastIngressPodMetricTable.ofTable
-
-	MulticastEgressRuleTable.ofTable = mockMulticastEgressRuleTable
-	MulticastEgressPodMetricTable.ofTable = mockMulticastEgressPodMetricTable
-	MulticastRoutingTable.ofTable = mockMulticastRoutingTable
-	MulticastOutputTable.ofTable = mockMulticastOutputTable
-	MulticastIngressPodMetricTable.ofTable = mockMulticastIngressPodMetricTable
-}
-
-func resetMulticastTables() {
-	MulticastEgressRuleTable.ofTable = bakMulticastEgressRuleTable
-	MulticastEgressPodMetricTable.ofTable = bakMulticastEgressPodMetricTable
-	MulticastRoutingTable.ofTable = bakMulticastRoutingTable
-	MulticastOutputTable.ofTable = bakMulticastOutputTable
-	MulticastIngressPodMetricTable.ofTable = bakMulticastIngressPodMetricTable
-}
-
-func newMcastClient(ctrl *gomock.Controller) *client {
-	bridge := mocks.NewMockBridge(ctrl)
-	bridge.EXPECT().AddFlowsInBundle(gomock.Any(), gomock.Any(), gomock.Any()).Return(nil).AnyTimes()
-	m := oftest.NewMockOFEntryOperations(ctrl)
-	m.EXPECT().AddAll(gomock.Any()).Return(nil).AnyTimes()
-	return &client{
-		bridge:             bridge,
-		ipProtocols:        []binding.Protocol{binding.ProtocolIP},
-		cookieAllocator:    cookie.NewAllocator(0),
-		ofEntryOperations:  m,
-		featureMulticast:   &mockFeatureMulticast,
-		enableMulticast:    true,
-		enableAntreaPolicy: true,
-	}
-}
-
-func TestInstallMulticastInitialFlows(t *testing.T) {
-	ctrl := gomock.NewController(t)
-	defer ctrl.Finish()
-
-	c = newMcastClient(ctrl)
-	initMockTables(ctrl)
-	defer resetMulticastTables()
-
-	c.enableMulticast = true
-	c.enableAntreaPolicy = true
-	c.featureMulticast = &mockFeatureMulticast
-	mockMulticastRoutingTable.EXPECT().BuildFlow(gomock.Any()).Return(newMockPktInFlowBuilder(ctrl)).Times(1)
-	mockMulticastRoutingTable.EXPECT().BuildFlow(gomock.Any()).Return(newMockExternalMulticastReceiver(ctrl)).Times(1)
-	mockMulticastEgressPodMetricTable.EXPECT().BuildFlow(gomock.Any()).Return(newMockMulticastSkipIGMPMetricFlows(ctrl)).Times(1)
-	mockMulticastIngressPodMetricTable.EXPECT().BuildFlow(gomock.Any()).Return(newMockMulticastSkipIGMPMetricFlows(ctrl)).Times(1)
-	mockMulticastEgressRuleTable.EXPECT().BuildFlow(priorityTopAntreaPolicy).Return(newMockIGMPFlowBuilder(ctrl)).Times(1)
-	c.nodeConfig = &config.NodeConfig{PodIPv4CIDR: podIPv4CIDR, PodIPv6CIDR: nil}
-	c.networkConfig = &config.NetworkConfig{}
-	c.pipelines = pipelineMap
-
-	err := c.InstallMulticastInitialFlows(uint8(PacketInReasonMC))
-	require.NoErrorf(t, err, "Failed to install multicast initial flows")
-}
diff --git a/pkg/agent/openflow/testing/mock_openflow.go b/pkg/agent/openflow/testing/mock_openflow.go
index 393728772..31a2293ef 100644
--- a/pkg/agent/openflow/testing/mock_openflow.go
+++ b/pkg/agent/openflow/testing/mock_openflow.go
@@ -311,20 +311,6 @@ func (mr *MockClientMockRecorder) InstallMulticastGroup(arg0, arg1, arg2 interfa
 	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstallMulticastGroup", reflect.TypeOf((*MockClient)(nil).InstallMulticastGroup), arg0, arg1, arg2)
 }
 
-// InstallMulticastInitialFlows mocks base method
-func (m *MockClient) InstallMulticastInitialFlows(arg0 byte) error {
-	m.ctrl.T.Helper()
-	ret := m.ctrl.Call(m, "InstallMulticastInitialFlows", arg0)
-	ret0, _ := ret[0].(error)
-	return ret0
-}
-
-// InstallMulticastInitialFlows indicates an expected call of InstallMulticastInitialFlows
-func (mr *MockClientMockRecorder) InstallMulticastInitialFlows(arg0 interface{}) *gomock.Call {
-	mr.mock.ctrl.T.Helper()
-	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstallMulticastInitialFlows", reflect.TypeOf((*MockClient)(nil).InstallMulticastInitialFlows), arg0)
-}
-
 // InstallMulticastRemoteReportFlows mocks base method
 func (m *MockClient) InstallMulticastRemoteReportFlows(arg0 openflow.GroupIDType) error {
 	m.ctrl.T.Helper()