Age | Commit message (Collapse) | Author |
|
This only implements decimal suffixes, and furthermore only with
a leading "0". A complete implementation would probably allow one
and probably two digit suffixes without.
But what primarily is missing is translating interface names to
and from interface indexes.
This also only implements the parsing, and uses the FreeBSD trick of
squeezing in the Scope Id in the second 16-bit word of the fe80::/64
or ff02:/64 address prefix. But inet_drv is not prepared to handle
this word, so it might only work on FreeBSD, not being supported even
there... So inet_drv needs to handle this too.
|
|
There are a multitude of RFC:s that point to each other and some of them
suggest different addresses with IPv4 suffixes. Use the IPv4 suffix
text representation only for the old well known ::a.b.c.d and
::ffff:a.b.c.d prefixes. The others seems to be moving targets.
|
|
|
|
|
|
|
|
|
|
|
|
The current implementations of inet:parse_ipv6_address/1 and
inet:parse_ipv6strict_address/1 permit address strings which have an
unlimited number of leading zeros. Addresses such as:
"0000000000000000000000000000000ffff::"
"::00000000000000000000000000000000000000000000000000000000"
"::0000000f435:1"
If we are using this facility to validate string representations of
IPv6 addresses, then we would end up validating addresses which are
non-conformant (with respect to RFC 4291 section 2.2) and potentially
dangerous.
This patch ensures that each segment of an IPv6 address has a maximum
of 4 hex digits.
|
|
|
|
|
|
|
|
|
|
The warning was introduced in e367eb44969b00cac910c8eb14e7b3ce3ee0cc91.
|
|
* fredrik/inet/export-ip-funcs/OTP-8067:
Inet doc clarifications
Documentation changes inet
Changes to function names, tests and docs of inet
Added specs and doc
Exported ipv4address and ipv6address functions to inet module, changed and made testcases
|
|
made testcases
|
|
|
|
|
|
* rani/inet_gethostbyname_fixes:
inet_res_SUITE: testcase fixes for legacy DNS resolver (Solaris 8)
inet_res: /etc/resolv.conf: use domain as default search list
inet: delayed/avoided read of /etc/resolv.conf and /etc/hosts
inet_gethost_native: workaround for empty result hostname on MacOS X
inet_res_SUITE: testcase fix for empty domain name
inet:gethostbyname improved to parse IP strings and look up own hostname
OTP-8426 The resolver routines failed to look up the own node name as
hostname, if the OS native resolver was erroneously configured,
bug reported by Yogish Baliga, now fixed.
The resolver routines now tries to parse the hostname as an IP
string as most OS resolvers do, unless the native resolver is
used.
The DNS resolver inet_res and file resolver inet_hosts now do not
read OS configuration files until they are needed. Since the
native resolver is default, in most cases they are never needed.
The DNS resolver's automatic updating of OS configuration file
data (/etc/resolv.conf) now uses the 'domain' keyword as default
search domain if there is no 'search' keyword.
|
|
Now inet:gethostbyname tries to parse the hostname as an IP string
first if the 'native' lookup method is not used. One can also
make the IP string parsing explicit using the new 'string'
lookup method, or avoid it using the new pseudo lookup
method 'nostring'.
In R13B04 a bug was introduced when the gethostbyname code
was rewritten, so if the native resolver was used and
misconfigured to not be able to look up the own hostname,
inet:gethostbyname also failed. This is now fixed.
|
|
|