diff options
author | Florin Coras <fcoras@cisco.com> | 2017-04-25 11:58:06 -0700 |
---|---|---|
committer | Florin Coras <fcoras@cisco.com> | 2017-04-25 13:26:38 -0700 |
commit | 82b13a89a3cd436b9d3ed5538952508354ea65ba (patch) | |
tree | 27db5ce8e7c6fe7d4f771c0583da305b40762ef5 /src/vnet/tcp/tcp.h | |
parent | 11b8dbf78af49d270a0e72abe7dea73eec30d85f (diff) |
Session/tcp coverity fixes
Change-Id: Ic5467df16e870b49c49678b1dbb40f4a2390b3c9
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp.h')
-rw-r--r-- | src/vnet/tcp/tcp.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vnet/tcp/tcp.h b/src/vnet/tcp/tcp.h index 40fb3515635..f61a1b52882 100644 --- a/src/vnet/tcp/tcp.h +++ b/src/vnet/tcp/tcp.h @@ -351,6 +351,14 @@ vnet_get_tcp_main () return &tcp_main; } +always_inline tcp_header_t * +tcp_buffer_hdr (vlib_buffer_t * b) +{ + ASSERT ((signed) b->current_data >= (signed) -VLIB_BUFFER_PRE_DATA_SIZE); + return (tcp_header_t *) (b->data + b->current_data + + vnet_buffer (b)->tcp.hdr_offset); +} + clib_error_t *vnet_tcp_enable_disable (vlib_main_t * vm, u8 is_en); always_inline tcp_connection_t * |