bug in MQX getaddrinfo() with IPv6 enabled?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

bug in MQX getaddrinfo() with IPv6 enabled?

1,158 Views
m_bach
Contributor III

Hi Community,

 

I using MQX with IPv6, so enabled RTCSCFG_ENABLE_IP6

 

Now when I'm using get getaddrinfo() with an FQDN, getaddrinfo() always fails if my DNS Server does not reply AAAA queries...

 

Whats happening:

- getaddrinfo() sends the 'A' record query to my DNS server, and collects the qualified answer. Everything is fine.

- next in line due to NET_ORDER is the INET6 family query

- getaddrinfo() then sends a subsequent 'AAAA' query, which is not fully responded by my DNS Server for this host.

- then getaddrinfo() returns error(4), which is odd because the 'A' record was replied fine.

 

I patched getaddrinfo.c accoringly, and want to know what you think about this.

 

cheers, Martin

Original Attachment has been moved to: getaddrinfo.c.patch.zip

0 Kudos
Reply
5 Replies

921 Views
RadekS
NXP Employee
NXP Employee

It is known issue. It was already fixed on development branch.

In attachment you can find latest version of getaddrinfo.c file.


Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

921 Views
m_bach
Contributor III

sorry, can't compile....

(Y:\MQX\rtcs\source\if\getaddrinfo.c|640|59|1|19503|1)

=        if((ip_addr = RTCS_hosts_get_addr(hostname, family)) != NULL) 

>illegal implicit conversion from 'int' to

>'void *'

(Y:\MQX\rtcs\source\if\getaddrinfo.c|674|64|1|20598|1)

=e, '.') == NULL) && ((dns_suffix = RTCS_get_primary_dns_suffix()) != NULL )) 

>illegal implicit conversion from 'int' to

>'const char *'

(Y:\\MQX\rtcs\source\if\getaddrinfo.c|700|53|1|21815|1)

=                dns_params.name_to_resolve = hostname;      /* Host name to resolve (null-terminated string). */              

>illegal implicit conversion from 'const char *' to

>'char *'

seems I'm lacking some new function defs, such as RTCS_hosts_get_addr()  and RTCS_get_primary_dns_suffix() ...

0 Kudos
Reply

921 Views
m_bach
Contributor III

Hi RadekS, thanks a lot!

I'm just checking your changes. Which is a little hard, because there is a change in tabs/spaces style. I have to ignore whitespace changes ...

Is there a way to follow the MQX developpent branch? Any public source code repository available?

thanks, Martin

0 Kudos
Reply

921 Views
RadekS
NXP Employee
NXP Employee

No, unfortunately currently it is not possible. MQX is released only in periodic intervals.

You are right, attached getaddrinfo.c contains more changes and some of these changes don’t need be anyway connected to this bug. It is just snippet from current source code.

You should take it only as inspiration…

921 Views
m_bach
Contributor III

ok, you got it :smileywink:

0 Kudos
Reply