From 5b9098da821a08e6327a00ecd89995011d4ed7d8 Mon Sep 17 00:00:00 2001 From: Quan Tian Date: Thu, 18 May 2023 00:05:08 +0800 Subject: [PATCH] Use LOCAL instead of CONTROLLER as the in_port of packet-out message CONTROLLER cannot be used as the in_port due to a bug in Windows ovsext driver, otherwise the Windows OS would crash. See https://github.com/openvswitch/ovs-issues/issues/280. Signed-off-by: Quan Tian --- pkg/agent/proxy/proxier.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/agent/proxy/proxier.go b/pkg/agent/proxy/proxier.go index 5887c4b9cac..4565bf5b52e 100644 --- a/pkg/agent/proxy/proxier.go +++ b/pkg/agent/proxy/proxier.go @@ -23,6 +23,7 @@ import ( "sync" "time" + "antrea.io/libOpenflow/openflow15" "antrea.io/libOpenflow/protocol" "antrea.io/ofnet/ofctrl" corev1 "k8s.io/api/core/v1" @@ -1053,12 +1054,15 @@ func (p *proxier) HandlePacketIn(pktIn *ofctrl.PacketIn) error { return fmt.Errorf("error when getting match field inPort") } outPort := inPortField.GetValue().(uint32) + // It cannot use CONTROLLER (the default value when inPort is 0) as the inPort due to a bug in Windows ovsext + // driver, otherwise the Windows OS would crash. See https://github.com/openvswitch/ovs-issues/issues/280. + inPort := uint32(openflow15.P_LOCAL) return openflow.SendRejectPacketOut(p.ofClient, srcMAC, dstMAC, srcIP, dstIP, - 0, + inPort, outPort, isIPv6, ethernetPkt,