Was investigating why I can't connect to my smtp-sink:

$ smtp-sink -v [::1]:10055 10
smtp-sink: name_mask: all
smtp-sink: trying... [::1]:10055

  then in another window: $ smtp-source [::1]:10055

  and the smtp-sink aborts with:

smtp-sink: fatal: sockaddr_to_hostaddr: Non-recoverable failure in name resolution


Turns out that the problem is a structure declared too short
by two bytes to receive a sockaddr_in6 from accept(),
and the two bytes of a received IP address are then clobbered.

In smtp-sink.c/connect_event() the sa is declared
as struct sockaddr instead of struct sockaddr_storage
(RFC 3493).

Seems like elsewhere this is handled correctly
( like in inet_listen.c/inet_accept() ).

  Mark

Reply via email to