Skip to content
Commit 87d5e0d6 authored by Robert Lubos's avatar Robert Lubos Committed by Anas Nashif
Browse files

net: iface: Allow NULL pointer to be handled in net_if_is_ip_offloaded



In case native interface is used with NET_OFFLOAD enabled, the
net_if_is_ip_offloaded() could lead to a crash, if called on unbound
net_context (i.e. with no iface assigned to net_context yet).

As since commit 40d22402 the net_context
allocated on offloaded interface is always assigned with the iface
pointer during its creation, it can be safely assumed that in case of
NULL pointer is provided we deal with a native interface. Therefore
instead of asserting on the iface pointer, indicate that the interface
is native when NULL pointer is provided.

Signed-off-by: default avatarRobert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit 32bd3aa7)
parent 156bf29c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment