Skip to content
Commit 09b361de authored by Ravi kumar Veeramally's avatar Ravi kumar Veeramally Committed by Jukka Rissanen
Browse files

net: app: Fix get_server_ctx helper function



When net_app_ctx has multiple net_contexts, selecting net_context
based on dst address has some glitches.

E.g. One net_app_ctx and two net_contexts (net_ctx1, net_ctx2).
     Both net_contexts are mapped to net_app_ctx.
     When a caller looking for net_ctx (e.g. net_ctx2) with
     matching dst address. Loop goes through net_ctx1 and dst
     doesn't match. But another if condition checks does this
     net_context mapped to net_app_ctx, yes it matches.
     So return net_ctx1, which is wrong.

So first go through all elements in array of net_contexts for
matching dst address, if it fails to find then go for matching
net_app_ctx.

Signed-off-by: default avatarRavi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
parent 0055e007
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment