Skip to content

Commit d2c73f2

Browse files
authored
Merge pull request ARMmbed#10842 from ghseb/cellular-stack-type-fixes
Cellular: Stack type fixes
2 parents 9e0dc3e + 142a223 commit d2c73f2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

features/cellular/framework/AT/AT_CellularContext.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,8 @@ bool AT_CellularContext::get_context()
378378
// APN matched -> Check PDP type
379379
pdp_type_t pdp_type = string_to_pdp_type(pdp_type_from_context);
380380

381-
// Accept exact matching PDP context type or dual PDP context for IPv4/IPv6 only modems
382-
if (get_property(pdp_type_t_to_cellular_property(pdp_type)) ||
383-
((pdp_type == IPV4V6_PDP_TYPE && (modem_supports_ipv4 || modem_supports_ipv6)) && !_nonip_req)) {
381+
// Accept exact matching PDP context type
382+
if (get_property(pdp_type_t_to_cellular_property(pdp_type))) {
384383
_pdp_type = pdp_type;
385384
_cid = cid;
386385
}

features/cellular/framework/targets/GEMALTO/CINTERION/GEMALTO_CINTERION_CellularStack.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,9 @@ nsapi_size_or_error_t GEMALTO_CINTERION_CellularStack::socket_sendto_impl(Cellul
290290
{
291291
if (socket->proto == NSAPI_UDP) {
292292
const int ip_version = address.get_ip_version();
293-
if ((ip_version == NSAPI_IPv4 && _stack_type != IPV4_STACK) ||
294-
(ip_version == NSAPI_IPv6 && _stack_type != IPV6_STACK)) {
293+
if (_stack_type != IPV4V6_STACK &&
294+
((ip_version == NSAPI_IPv4 && _stack_type != IPV4_STACK) ||
295+
(ip_version == NSAPI_IPv6 && _stack_type != IPV6_STACK))) {
295296
tr_warn("No IP route for %s", address.get_ip_address());
296297
return NSAPI_ERROR_NO_SOCKET;
297298
}

0 commit comments

Comments
 (0)