Using ofpbuf_end() to compute payload length would fail if the ofpbuf had any tailroom.
Signed-off-by: Jarno Rajahalme <jrajaha...@nicira.com> --- lib/pcap-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pcap-file.c b/lib/pcap-file.c index 2d3f9fe..e2fd203 100644 --- a/lib/pcap-file.c +++ b/lib/pcap-file.c @@ -311,7 +311,7 @@ tcp_reader_run(struct tcp_reader *r, const struct flow *flow, } tcp = packet->l4; flags = TCP_FLAGS(tcp->tcp_ctl); - l7_length = (char *) ofpbuf_end(packet) - (char *) packet->l7; + l7_length = (char *) ofpbuf_tail(packet) - (char *) packet->l7; seq = ntohl(get_16aligned_be32(&tcp->tcp_seq)); /* Construct key. */ -- 1.7.10.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev