resolved: use one UDP socket per transaction
authorTom Gundersen <teg@jklm.no>
Thu, 9 Jul 2015 12:19:55 +0000 (14:19 +0200)
committerTom Gundersen <teg@jklm.no>
Tue, 14 Jul 2015 16:50:57 +0000 (18:50 +0200)
commitd20b1667dbab8bccf69735523a0d5fc645e81b80
tree941c5b59eeabd49bdccd612d0aee0c48ea588024
parent29815b6c608b836cada5e349d06a96b63eaa65f3
resolved: use one UDP socket per transaction

We used to have one global socket, use one per transaction instead. This
has the side-effect of giving us a random UDP port per transaction, and
hence increasing the entropy and making cache poisoining significantly
harder to achieve.

We still reuse the same port number for packets belonging to the same
transaction (resent packets).
TODO
src/resolve/resolved-dns-scope.c
src/resolve/resolved-dns-scope.h
src/resolve/resolved-dns-transaction.c
src/resolve/resolved-dns-transaction.h
src/resolve/resolved-manager.c
src/resolve/resolved-manager.h