]> git.ipfire.org Git - thirdparty/shairport-sync.git/commit
Connect to NQPTP control socket on localhost 1793/head
authorKlemens Nanni <kn@openbsd.org>
Sat, 27 Jan 2024 07:27:46 +0000 (08:27 +0100)
committerKlemens Nanni <klemens@posteo.de>
Sat, 27 Jan 2024 17:56:26 +0000 (18:56 +0100)
commit6dd311a1a81a0f1c89521f332f3b1a04b6a752b1
tree93a51943d32820b1558fbecbdec06a89aa2749f7
parente36ec5c45d872cd1bdc59a24b805560b5e7029aa
Connect to NQPTP control socket on localhost

nqptp.c listens on "localhost", but shairport-sync connectes to the wildcard
address 0/0.  This apparently works on Linux and FreeBSD, but OpenBSD fails:

```
$ ktrace shairport-sync -v -u
[...]
         0.000038288 "ptp-utilities.c:243" *fatal error: error sending timing_peer_list to NQPTP
         0.000021868 "shairport.c:1728" emergency exit
$ kdump
[...]
  2319 shairport-sync STRU  struct sockaddr { AF_INET, 0.0.0.0:9000 }
  2319 shairport-sync RET   sendto -1 errno 51 Network is unreachable
[...]
```

Resolve and connect to "localhost" just like NQPTP does, resulting in
127.0.0.1 or ::1 as socket addresses.

This is required to run when configured `--with-airplay-2`.
Tested on OpenBSD/amd64 7.4-current with shairport-sync 2.4.3 and nqptp
1.2.5-dev cfa8315 (plus OpenBSD fixes).

I expect Linux and FreeBSD to work as before, but have not tested it.
ptp-utilities.c