git://git.onelab.eu
/
sliver-openvswitch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f21fa45
)
lib/pcap: Use ofpbuf_tail() instead of ofpbuf_end().
author
Jarno Rajahalme
<jrajahalme@nicira.com>
Tue, 25 Mar 2014 22:26:23 +0000
(15:26 -0700)
committer
Jarno Rajahalme
<jrajahalme@nicira.com>
Tue, 25 Mar 2014 22:26:23 +0000
(15:26 -0700)
Using ofpbuf_end() to compute payload length would fail if the ofpbuf
had any tailroom.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/pcap-file.c
patch
|
blob
|
history
diff --git
a/lib/pcap-file.c
b/lib/pcap-file.c
index
2d3f9fe
..
e2fd203
100644
(file)
--- 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. */