mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #10842 from ghseb/cellular-stack-type-fixes
Cellular: Stack type fixespull/10928/head
commit
d2c73f2bcd
|
@ -378,9 +378,8 @@ bool AT_CellularContext::get_context()
|
|||
// APN matched -> Check PDP type
|
||||
pdp_type_t pdp_type = string_to_pdp_type(pdp_type_from_context);
|
||||
|
||||
// Accept exact matching PDP context type or dual PDP context for IPv4/IPv6 only modems
|
||||
if (get_property(pdp_type_t_to_cellular_property(pdp_type)) ||
|
||||
((pdp_type == IPV4V6_PDP_TYPE && (modem_supports_ipv4 || modem_supports_ipv6)) && !_nonip_req)) {
|
||||
// Accept exact matching PDP context type
|
||||
if (get_property(pdp_type_t_to_cellular_property(pdp_type))) {
|
||||
_pdp_type = pdp_type;
|
||||
_cid = cid;
|
||||
}
|
||||
|
|
|
@ -290,8 +290,9 @@ nsapi_size_or_error_t GEMALTO_CINTERION_CellularStack::socket_sendto_impl(Cellul
|
|||
{
|
||||
if (socket->proto == NSAPI_UDP) {
|
||||
const int ip_version = address.get_ip_version();
|
||||
if ((ip_version == NSAPI_IPv4 && _stack_type != IPV4_STACK) ||
|
||||
(ip_version == NSAPI_IPv6 && _stack_type != IPV6_STACK)) {
|
||||
if (_stack_type != IPV4V6_STACK &&
|
||||
((ip_version == NSAPI_IPv4 && _stack_type != IPV4_STACK) ||
|
||||
(ip_version == NSAPI_IPv6 && _stack_type != IPV6_STACK))) {
|
||||
tr_warn("No IP route for %s", address.get_ip_address());
|
||||
return NSAPI_ERROR_NO_SOCKET;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue