Hi Jinmei,

Thanks for bringing up this point.
Please see my comment below.

> > As requested, here are my comments about the addrselect-api draft.
> 
> One additional comment (I think this has not been pointed out by
> anyone.  sorry if not):
> 
> Using new flags for ai_flags of getaddrinfo() may have a compatibility
> issue.  RFC3493 says:
> 
>    The ai_flags field to which hints parameter points shall be set to
>    zero or be the bitwise-inclusive OR of one or more of the values
>    AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST, AI_NUMERICSERV,
>    AI_V4MAPPED, AI_ALL, and AI_ADDRCONFIG.
> 
> I personally don't think this prohibits the use of other flags, but
> some existing implementations seem to interpret this part in the
> strictest way.  Those return an error of EAI_BADFLAGS if an unknown
> flag is specified in hints.ai_flags.  getaddrinfo contained in BSD
> variants and in the "libbind" library of ISC BIND behave this way.
> For those implementations, applications that use this API extensions
> will simply not be working, which is probably what we want to avoid.
> 

It may vary implementation to implementation. I can't think of any other
way than changing the implementation to support the new API. Those 
implementations that don't support the new AI_* flag will return
EAI_BADFLAGS with getaddrinfo(). I'd say that similar could be true for
new socket options.

> However, I cannot think of any other solutions than having these
> implementations change the behavior.  So, we should probably first
> agree on what the implementation should do for unknown flags and
> describe the clarification in this document.

As you mentioned that RFC3494 already defines :

[EAI_BADFLAGS]  The flags parameter had an invalid value.

Are you implying that the document (RFC3494) should clarify that the
implementation can return EAI_BADFLAGS for unknown flag value?

If so, it makes sense to me. However, I'd interpret unknown value
as invalid value as well.

-Samita


--------------------------------------------------------------------
IETF IPv6 working group mailing list
ipv6@ietf.org
Administrative Requests: https://www1.ietf.org/mailman/listinfo/ipv6
--------------------------------------------------------------------

Reply via email to