Skip to content
This repository was archived by the owner on Apr 20, 2024. It is now read-only.

Commit b3dda16

Browse files
authored
Merge pull request #7 from aojea/sctp
don't skip SCTP tests
2 parents e4cc04b + da58b59 commit b3dda16

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/e2e.yml

-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ jobs:
137137
# Run tests
138138
/usr/local/bin/ginkgo --nodes=25 \
139139
--focus="Netpol" \
140-
--skip="SCTP" \
141140
/usr/local/bin/e2e.test \
142141
-- \
143142
--kubeconfig=${PWD}/_artifacts/kubeconfig.conf \

pkg/networkpolicy/controller.go

+11
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,20 @@ func (c *Controller) Run(ctx context.Context) error {
249249
go wait.Until(func() { c.syncNFTablesRules(ctx) }, 60*time.Second, ctx.Done())
250250
}
251251

252+
// https://netfilter.org/projects/libnetfilter_queue/doxygen/html/group__Queue.html
253+
// the kernel will not normalize offload packets,
254+
// i.e. your application will need to be able to handle packets larger than the mtu.
255+
// Normalization is expensive, so this flag should always be set.
256+
var flags uint32
257+
flags = nfqueue.NfQaCfgFlagGSO
258+
if c.config.FailOpen {
259+
flags += nfqueue.NfQaCfgFlagFailOpen
260+
}
261+
252262
// Set configuration options for nfqueue
253263
config := nfqueue.Config{
254264
NfQueue: uint16(c.config.QueueID),
265+
Flags: flags,
255266
MaxPacketLen: 128, // only interested in the headers
256267
MaxQueueLen: 1024,
257268
Copymode: nfqueue.NfQnlCopyPacket, // headers

0 commit comments

Comments
 (0)