Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
miniflow: Fix miniflow push of L4 port numbers.
Replace a 64 bit copy of L4 src/dst ports that was also
including additional packet params (e.g. TCP Seq Num). This
was later resulting in all packets from the flow missing in
the EMC.

Signed-off-by: Kevin Traynor <kevin.traynor@intel.com>
Reported-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
  • Loading branch information
Jarno Rajahalme committed Feb 3, 2015
1 parent 1b8c7b9 commit 115f248
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions AUTHORS
Expand Up @@ -88,6 +88,7 @@ Jun Nakajima jun.nakajima@intel.com
Justin Pettit jpettit@nicira.com
Keith Amidon keith@nicira.com
Ken Ajiro ajiro@mxw.nes.nec.co.jp
Kevin Traynor kevin.traynor@intel.com
Kmindg G kmindg@gmail.com
Krishna Kondaka kkondaka@vmware.com
Kyle Mestery mestery@mestery.com
Expand Down Expand Up @@ -215,6 +216,7 @@ Chris Hydon chydon@aristanetworks.com
Christian Stigen Larsen cslarsen@gmail.com
Christopher Paggen cpaggen@cisco.com
Chunhe Li lichunhe@huawei.com
Ciara Loftus ciara.loftus@intel.com
Daniel Badea daniel.badea@windriver.com
Dave Walker DaveWalker@ubuntu.com
David Palma palma@onesource.pt
Expand Down
9 changes: 6 additions & 3 deletions lib/flow.c
Expand Up @@ -672,21 +672,24 @@ miniflow_extract(struct ofpbuf *packet, const struct pkt_metadata *md,
miniflow_push_be32(mf, arp_tha[2], 0);
miniflow_push_be32(mf, tcp_flags,
TCP_FLAGS_BE32(tcp->tcp_ctl));
miniflow_push_words(mf, tp_src, &tcp->tcp_src, 1);
miniflow_push_be16(mf, tp_src, tcp->tcp_src);
miniflow_push_be16(mf, tp_dst, tcp->tcp_dst);
miniflow_pad_to_64(mf, igmp_group_ip4);
}
} else if (OVS_LIKELY(nw_proto == IPPROTO_UDP)) {
if (OVS_LIKELY(size >= UDP_HEADER_LEN)) {
const struct udp_header *udp = data;

miniflow_push_words(mf, tp_src, &udp->udp_src, 1);
miniflow_push_be16(mf, tp_src, udp->udp_src);
miniflow_push_be16(mf, tp_dst, udp->udp_dst);
miniflow_pad_to_64(mf, igmp_group_ip4);
}
} else if (OVS_LIKELY(nw_proto == IPPROTO_SCTP)) {
if (OVS_LIKELY(size >= SCTP_HEADER_LEN)) {
const struct sctp_header *sctp = data;

miniflow_push_words(mf, tp_src, &sctp->sctp_src, 1);
miniflow_push_be16(mf, tp_src, sctp->sctp_src);
miniflow_push_be16(mf, tp_dst, sctp->sctp_dst);
miniflow_pad_to_64(mf, igmp_group_ip4);
}
} else if (OVS_LIKELY(nw_proto == IPPROTO_ICMP)) {
Expand Down

0 comments on commit 115f248

Please sign in to comment.