Signed-off-by: Pravin B Shelar <pshe...@nicira.com>
---
 lib/ofpbuf.h |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/lib/ofpbuf.h b/lib/ofpbuf.h
index 4e7038d..82588e3 100644
--- a/lib/ofpbuf.h
+++ b/lib/ofpbuf.h
@@ -336,10 +336,7 @@ static inline void ofpbuf_set_l4(struct ofpbuf *b, void 
*l4)
 
 static inline size_t ofpbuf_l4_size(const struct ofpbuf *b)
 {
-    return b->l4_ofs != UINT16_MAX
-        ? (const char *)ofpbuf_tail(b) - (const char *)ofpbuf_l4(b)
-        - ofpbuf_l2_pad_size(b)
-        : 0;
+    return b->l4_ofs != UINT16_MAX ? ofpbuf_size(b) - b->l4_ofs : 0;
 }
 
 static inline const void *ofpbuf_get_tcp_payload(const struct ofpbuf *b)
-- 
1.7.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to