even if socktype/protocol is mixed. % ./test localhost echo arg: family 0 socktype 0 protocol 0 addrlen 0 host localhost serv echo ai1: family 24 socktype 2 protocol 17 addrlen 28 localhost host ::1 serv echo ai2: family 24 socktype 1 protocol 6 addrlen 28 localhost host ::1 serv echo ai3: family 2 socktype 2 protocol 17 addrlen 16 localhost host 127.0.0.1 serv echo ai4: family 2 socktype 1 protocol 6 addrlen 16 localhost host 127.0.0.1 serv echo
fix error type on unsupported servname (numeric servname where numeric is prohibited).
(1) When servname == 0 and protocol == 0, return addrinfo structure for both DGRAM/UDP and STREAM/TCP. For example, if you ask for localhost/echo without specifying servname nor protocol, the following four addrinfo structure will be returned (the order may vary): ::1 dgram/udp port 7 ::1 stream/tcp port 7 127.0.0.1 dgram/udp port 7 127.0.0.1 stream/tcp port 7 This fixes KAME PR 141. TODO: clarify ordering constraints for the above case. (2) fix memory leak on failure cases (3) clarify non-udp/tcp protocol cases. * kame/libinet6/getnamenfo.c: clarify non-udp/tcp protocol cases.
* kame/kame/pim6sd: config parser was rewritten using lex and yacc. According to this change, each line MUST now be terminated by a semi-colon ';', and hence older configuration files will cause parsing errors. Please be careful in updating.
- disallow servname for raw socket.