emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: netsec 682578f 4/6: Add option to bypass NSM TLS checks on local net


From: Jimmy Yuen Ho Wong
Subject: Re: netsec 682578f 4/6: Add option to bypass NSM TLS checks on local networks
Date: Mon, 16 Jul 2018 16:24:45 +0100

On Mon, Jul 16, 2018 at 4:00 PM Eli Zaretskii <address@hidden> wrote:
>
> > From: Robert Pluim <address@hidden>
> > Date: Mon, 16 Jul 2018 15:34:35 +0200
> > Cc: address@hidden
> >
> > Eli, I see there╩╝s a sys_getaddrinfo in w32.c, is something needed
> > to get emacs to use that on MS-Windows?
>
> No, you don't need anything special.  nt/inc/socket.h redirects
> getaddrinfo into sys_getaddrinfo, and all our C sources see the
> redirection.
>
> > +DEFUN ("get-address-info", Fget_address_info, Sget_address_info, 1, 2, 0,
> > +       doc: /* Look up ip address info of NAME.
> > +Optional parameter FAMILY controls whether to look up IPv4 or IPv6
> > +addresses.  The default of nil means look up both, symbol `ipv4' means
> > +IPv4 only, symbol `ipv6' mean IPv6 only.  Returns a list of addresses,
> > +or nil if none were found.  */)
>
> This doc string doesn't tell that each address is a vector or a
> string.
>
> > +  if (EQ (family, Qipv4))
> > +    hints.ai_family = AF_INET;
> > +#ifdef AF_INET6
> > +  if (EQ (family, Qipv6))
> > +    hints.ai_family = AF_INET6;
> > +#endif
>
> Should we signal an error if 'ipv6' is requested on a system that
> doesn't support that?
>
> > +  ret = getaddrinfo (SSDATA (name), NULL, &hints, &res);
>
> You should encode NAME (using ENCODE_SYSTEM), because it could include
> non-ASCII characters.  In general, any Lisp string should be encoded
> before you can pass its data to a C library function.
>

Does getaddrinfo accept unicode hostnames? If not I think we can just
make sure NAME is all ASCII as per Punycode for i18nized host names.

> Thanks.
>
> P.S. This needs a NEWS entry, at the very least, and perhaps also an
> update for the ELisp manual.
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]