Skip to content

Commit

Permalink
Fix tunnelDstIP field in traceflow on dual-stack
Browse files Browse the repository at this point in the history
On dual-stack testbed, Inter-Node traceflow observation for
IPv4 packet in encap mode has empty tunnelDstIP field because
isIPv6 variable is set.

Change the logic to set isIPv6 variable based on the packet
IPv4 or IPv6.

Fixes antrea-io#4502

Signed-off-by: Kumar Atish <atish.iaf@gmail.com>
  • Loading branch information
Atish-iaf committed Mar 2, 2023
1 parent bf45314 commit 94c2b34
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/agent/controller/traceflow/packetin.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ func (c *Controller) parsePacketIn(pktIn *ofctrl.PacketIn) (*crdv1alpha1.Tracefl
if tableID == openflow.L2ForwardingOutTable.GetID() {
ob := new(crdv1alpha1.Observation)
tunnelDstIP := ""
isIPv6 := c.nodeConfig.NodeIPv6Addr != nil
// decide according to packet.
isIPv6 := etherData.Ethertype == protocol.IPv6_MSG
if match := getMatchTunnelDstField(matchers, isIPv6); match != nil {
tunnelDstIP, err = getTunnelDstValue(match)
if err != nil {
Expand Down

0 comments on commit 94c2b34

Please sign in to comment.