[riot-commits] [RIOT-OS/RIOT] e9a409: sock_dns: fix off-by-one error in _parse_dns_reply()

benpicco noreply at github.com
Mon Feb 24 21:58:37 CET 2020


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: e9a40933f7bfbade1a38498666ca96192e7f8bd1
      https://github.com/RIOT-OS/RIOT/commit/e9a40933f7bfbade1a38498666ca96192e7f8bd1
  Author: Benjamin Valentin <benpicco at googlemail.com>
  Date:   2020-02-24 (Mon, 24 Feb 2020)

  Changed paths:
    M sys/net/application_layer/dns/dns.c

  Log Message:
  -----------
  sock_dns: fix off-by-one error in _parse_dns_reply()


  Commit: a65daf7a313d37a3ae34e1658be25771f3d13308
      https://github.com/RIOT-OS/RIOT/commit/a65daf7a313d37a3ae34e1658be25771f3d13308
  Author: Benjamin Valentin <benpicco at googlemail.com>
  Date:   2020-02-24 (Mon, 24 Feb 2020)

  Changed paths:
    M sys/shell/commands/sc_gnrc_icmpv6_echo.c

  Log Message:
  -----------
  shell/gnrc_icmpv6_echo: set success state if DNS query succeeded

We need to set `res` to 0 to signal success, otherwise we end up
in the print usage case.


  Commit: 367f19d390b6216519651cfc5601cd9e455ed763
      https://github.com/RIOT-OS/RIOT/commit/367f19d390b6216519651cfc5601cd9e455ed763
  Author: Benjamin Valentin <benpicco at googlemail.com>
  Date:   2020-02-24 (Mon, 24 Feb 2020)

  Changed paths:
    M sys/shell/commands/sc_gnrc_icmpv6_echo.c

  Log Message:
  -----------
  shell/gnrc_icmpv6_echo: don't do DNS lookup for plain IP

When using ping6 with an IP address, don't do a DNS lookup.
Hostnames can't contain ':', so use that to tell them apart
from plain IP addressees.


  Commit: 1de14931b8a326d12e35685bad1fd4779848401f
      https://github.com/RIOT-OS/RIOT/commit/1de14931b8a326d12e35685bad1fd4779848401f
  Author: Benjamin Valentin <benpicco at googlemail.com>
  Date:   2020-02-24 (Mon, 24 Feb 2020)

  Changed paths:
    M sys/include/net/sock/dns.h
    M sys/net/application_layer/dns/dns.c

  Log Message:
  -----------
  sock_dns: use the same buffer for request & reply

Saving RAM is more important than saving a few cycles
used by re-creating the request buffer in the error case.

Also reduce the size of the buffer to 128 bytes.
If we are just requesting the AAAA record it is unlikely
for the reply to take up the maximum size of 512 bytes.

We were already placing restrictions on the domain name length,
those are now actually a bit more relaxed (112 bytes instead of 64)


  Commit: fa4447241fea157131b7c97ce742ece555e24c48
      https://github.com/RIOT-OS/RIOT/commit/fa4447241fea157131b7c97ce742ece555e24c48
  Author: Benjamin Valentin <benjamin.valentin at ml-pa.com>
  Date:   2020-02-24 (Mon, 24 Feb 2020)

  Changed paths:
    M sys/include/net/sock/dns.h
    M sys/shell/commands/sc_gnrc_icmpv6_echo.c

  Log Message:
  -----------
  sock_dns: make sock_dns_query() return the length of the address

The implementation already did that, now also reflect this in the
documentation.


  Commit: d044800300b0392280791d802ef7fc0e5cdf52cb
      https://github.com/RIOT-OS/RIOT/commit/d044800300b0392280791d802ef7fc0e5cdf52cb
  Author: benpicco <benjamin.valentin at ml-pa.com>
  Date:   2020-02-24 (Mon, 24 Feb 2020)

  Changed paths:
    M sys/include/net/sock/dns.h
    M sys/net/application_layer/dns/dns.c
    M sys/shell/commands/sc_gnrc_icmpv6_echo.c

  Log Message:
  -----------
  Merge pull request #13450 from benpicco/dns-fixes

fix DNS resolution in ping6


Compare: https://github.com/RIOT-OS/RIOT/compare/77d6eaaf1919...d044800300b0


More information about the commits mailing list