chiark / gitweb /
pkstream/pkstream.c: Be more careful about handling address families.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 28 Sep 2017 00:52:03 +0000 (01:52 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 28 Jun 2018 23:24:00 +0000 (00:24 +0100)
commitd66e33f00fd3c8f4ca06fe089234b93e601b1356
treedce2a53321443463b177d6dacb0c5d0ab2212c4e
parent2fb1657b7265213150274ea7bd65057b85871dc7
pkstream/pkstream.c: Be more careful about handling address families.

  * Introduce a concept of `known' address families.  Currently, only
    `AF_INET' is known.

  * Filter `struct addrinfo' chains for known address families.  If we
    come up short, complain.

  * Tweak `aihints' to arrange that addresses which are supposed to
    match up actually will do: so server peer and bind addresses should
    match; client bind and connect addresses should match; and UDP local
    and remote addresses should match.

  * Initialize address structures using the `ai_family' slot from the
    appropriate `struct addrinfo' structure.
pkstream/pkstream.c