buglwIP - A Lightweight TCP/IP stack - Bugs: bug #50411, ip6addr_aton() fails on IPv4...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #50411: ip6addr_aton() fails on IPv4 mapped addresses

Submitter:  Joel Cunningham <jcunningham>
Submitted:  Mon 27 Feb 2017 03:02:54 PM UTC
   
 
Category:  IPv6 Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  2.1.0
lwIP version:  git head

Mon 11 Jun 2018 08:22:48 PM UTC, comment #2: 

Fixed in 2837bb31.

Not that this requires a dual-stack configuration.

Simon Goldschmidt <goldsimon>
Group administrator
Mon 27 Feb 2017 07:43:04 PM UTC, comment #1: 

Implementation hint: the dotted representation is only allowed for the last 32 bits.

Simon Goldschmidt <goldsimon>
Group administrator
Mon 27 Feb 2017 03:02:54 PM UTC, original submission:  

I was testing out some of the socket examples with an IPv4 mapped IPv6 address and found that ip6addr_aton() fails when encountering the dotted quads section of the IPv4 mapped address

#define SOCK_TARGET_HOST6  "::FFFF:192.168.1.16"

socket_examples_init() calls ip6addr_aton() which hits the "unexpected digit" case when the first dot is encountered:


if (s[1] == ':') {
...
} else if (isxdigit(*s)) {
  /* add current digit */
  current_block_value = (current_block_value << 4) +
      (isdigit(*s) ? (u32_t)(*s - '0') :
      (u32_t)(10 + (islower(*s) ? *s - 'a' : *s - 'A')));
} else {
  /* unexpected digit, space? CRLF? */
  break;
}


Joel Cunningham <jcunningham>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by jcunningham (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-06-11 goldsimon StatusNone Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2018-05-25 goldsimon Planned ReleaseNone 2.1.0

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code