From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] xmm7modem: handling of IPv6 address for activated context
Date: Wed, 20 Mar 2019 20:28:36 -0500 [thread overview]
Message-ID: <410132eb-c2c3-38aa-e9fa-aba0514085f5@gmail.com> (raw)
In-Reply-To: <1553073329-32420-1-git-send-email-antara.borwankar@intel.com>
[-- Attachment #1: Type: text/plain, Size: 2656 bytes --]
Hi Antara,
On 03/20/2019 04:15 AM, Antara Borwankar wrote:
> Handled IPv6 address after activating PDP context
> ---
> drivers/ifxmodem/gprs-context.c | 33 +++++++++++++++++++++++----------
> 1 file changed, 23 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/ifxmodem/gprs-context.c b/drivers/ifxmodem/gprs-context.c
> index 6042004..55d72a6 100644
> --- a/drivers/ifxmodem/gprs-context.c
> +++ b/drivers/ifxmodem/gprs-context.c
> @@ -352,10 +352,12 @@ static void cgcontrdp_cb(gboolean ok, GAtResult *result, gpointer user_data)
>
> DBG("DNS: %s, %s\n", gcd->dns1, gcd->dns2);
>
> - if (!laddrnetmask || at_util_get_ipv4_address_and_netmask(laddrnetmask,
> - gcd->address, gcd->netmask) < 0) {
> - failed_setup(gc, NULL, TRUE);
> - return;
> + if(gcd->proto == OFONO_GPRS_PROTO_IP) {
There really should be a space after 'if' here.
> + if (!laddrnetmask || at_util_get_ipv4_address_and_netmask(laddrnetmask,
> + gcd->address, gcd->netmask) < 0) {
> + failed_setup(gc, NULL, TRUE);
> + return;
> + }
> }
>
> if (gw)
> @@ -373,15 +375,26 @@ static void cgcontrdp_cb(gboolean ok, GAtResult *result, gpointer user_data)
> interface = ofono_gprs_context_get_interface(gc);
> datapath = get_datapath(modem, interface);
>
> - ofono_gprs_context_set_ipv4_address(gc, gcd->address, TRUE);
> + if(gcd->proto == OFONO_GPRS_PROTO_IP) {
And here
> + ofono_gprs_context_set_ipv4_address(gc, gcd->address, TRUE);
>
> - if (gcd->netmask[0])
> - ofono_gprs_context_set_ipv4_netmask(gc, gcd->netmask);
> + if (gcd->netmask[0])
> + ofono_gprs_context_set_ipv4_netmask(gc, gcd->netmask);
>
> - if (gcd->gateway[0])
> - ofono_gprs_context_set_ipv4_gateway(gc, gcd->gateway);
> + if (gcd->gateway[0])
> + ofono_gprs_context_set_ipv4_gateway(gc, gcd->gateway);
>
> - ofono_gprs_context_set_ipv4_dns_servers(gc, dns);
> + ofono_gprs_context_set_ipv4_dns_servers(gc, dns);
> + }
> +
> + if(gcd->proto == OFONO_GPRS_PROTO_IPV6) {
> + ofono_gprs_context_set_ipv6_address(gc, gcd->address);
So I'm not sure I understand what is happening here. gcd->address is
only set when gcd->proto is OFONO_GPRS_PROTO_IP. E.g. when it is
extracted by at_util_get_ipv4_address_and_netmask. How are you
obtaining it for IPV6?
> +
> + if (gcd->gateway[0])
> + ofono_gprs_context_set_ipv6_gateway(gc, gcd->gateway);
> +
> + ofono_gprs_context_set_ipv6_dns_servers(gc, dns);
> + }
>
> snprintf(buf, sizeof(buf), "AT+XDATACHANNEL=1,1,\"%s\",\"%s\",2,%u",
> ctrlpath, datapath, gcd->active_context);
>
Regards,
-Denis
next prev parent reply other threads:[~2019-03-21 1:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-20 9:15 [PATCH] xmm7modem: handling of IPv6 address for activated context Antara Borwankar
2019-03-21 1:28 ` Denis Kenzior [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-04-03 8:46 Antara Borwankar
2019-04-04 16:42 ` Denis Kenzior
2019-04-24 5:54 Antara Borwankar
2019-04-29 16:36 ` Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=410132eb-c2c3-38aa-e9fa-aba0514085f5@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox