Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cellular: Stack type fixes #10842

Merged
merged 3 commits into from
Jul 1, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions features/cellular/framework/AT/AT_CellularContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,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))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

_pdp_type = pdp_type;
_cid = cid;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down