Age | Commit message (Collapse) | Author | Files | Lines |
|
When memif CP processes the socket connection error, it may go through
the following code paths which may eventually cause double pool_put on a
clib_file
memif_master_conn_fd_error:633 -> memif_disconnect ->
memif_socket_close -> memif_file_del_by_index ->
clib_file_del_by_index -> clib_file_del -> pool_put
After memif_master_conn_fd_error:633, the code continues on
memif_maser_conn_fd_error:651 -> memif_file_del -> clib_file_del ->
pool_put
The fix is to skip calling memif_file_del in
memif_master_conn_fd_error:651 if uf->file_descriptor == ~0 to catch
problem from all possible paths in memif_master_conn_fd_error
Type: fix
Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I0960998db1ff358a8ddd4a5e22188a244eccd270
|
|
Type: style
Change-Id: I0d25d922312dfd60a665916cf47c3d2faa29ea49
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
When memif sends back socket messages containing strings, we copy
vectors into C-string. Unfortunately, most vectors are not
null-terminated, causing strncpy() read overflow. Moreover, strncpy()
does not null-terminate string in case of max length reached.
This patch introduces helpers to safely copy strings from vectors.
Type: fix
Fixes: d6042d4f1ea0baf02bc87c72960a331a9e08dfab
Change-Id: I38489ec8d2a5d4a42b9abde1aa3dfdbd06ebe024
Signed-off-by: Benoît Ganne <bganne@cisco.com>
|
|
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: I67f58aa93c721dbd518cc2ddcea330006693662f
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
|
|
Change-Id: Ie7621a38a44e7c692e23e58c43d27d8d2aab43e6
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I0fe60a639c7589dc842d85db092c81c1a7441cb7
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
|
|
Change-Id: I65306fb1f8e39221dd1d8c00737a7fb1c0129ba8
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
private header size allows to reserve firs X bytes of payload to be
considered as private metadata. For now we just support value 0
but adding this field to address future needs without changing protocol
version.
Change-Id: Id77336584c0194a303b20210aff584c7372cba01
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
interface reconnect.
Change-Id: Ifc7eb2494a22c334d8899422545fca1a4bba4d05
Signed-off-by: Chun Li <chunl2@cisco.com>
|
|
This patch teaches worer threads to sleep and to be waken up by
kernel if there is activity on file desctiptors assigned to that thread.
It also adds counters to epoll file descriptors and new
debug cli 'show unix file'.
Change-Id: Iaf67869f4aa88ff5b0a08982e1c08474013107c4
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Set the content of tmp.sock prior to calling memif_msg_send_disconnect.
Also fix the problem socket was not close in the same spot due to
error encountered.
Change-Id: I8f54ebad2250d1944afcc52e71d2a59da05362af
Signed-off-by: Steven <sluong@cisco.com>
|
|
This reverts commit 590acf8fa7af6a8604edd72a32f9f087be52c767.
new version includes minor fix for the crash when the interface is
deleted.
Change-Id: I8fc56eb9145e4d8e1d410206f84e705045898608
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
This will allow us to use this code in client libraries without vlib.
Change-Id: I8557b752496841ba588aa36b6082cbe2cd1867fe
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
1. coverity complains about "buffer not null terminated" for strncpy because we
pass the size of the destination to the call which is equal to the true size
of the destination. We subtract 1 for the size to accommodate the null like all
other places are already doing it.
2. Add a check to tx_queues in memif_interface_tx_inline to avoid "divide by zero".
3. To avoid null pointer dereference in memif_create_if, change the goto done
rather than goto error and spit a more meaningful error rather than silent about it.
4. Shuffle a line to avoid "check after use" in vl_api_memif_delete_t_handler.
Change-Id: Icba7ecd5362c012a48ac35795d31aab356617420
Signed-off-by: Steven <sluong@cisco.com>
|
|
In IP mode memif interface is L3 point-to-point interfaces and
we don't pass l2 header. There is no l2 header rewrite operation and
received packets are sent straight to ip4-input / ip6-input nodes.
Change-Id: I4177f3fce3004da7ecf14d235006ae053fcf3f09
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I4d41def83a23f13701f1ddcea722d481e4c85cbc
Signed-off-by: Damjan Marion <damarion@cisco.com>
|