]> git.ipfire.org Git - thirdparty/pdns.git/commit
Utilize std::shuffle and introduce pdns::dns_random_engine
authorkrionbsd <krion@FreeBSD.org>
Mon, 6 Apr 2020 10:28:34 +0000 (12:28 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 22 Apr 2020 07:44:47 +0000 (09:44 +0200)
commitbbec1961a3d3e79b5e0a50477a7bf33812310b67
treee0a32a25a4c385b22bbcee1e1a0593647741041c
parent0c65a9434e77055a0494ff1200e176d8fe43289e
Utilize std::shuffle and introduce pdns::dns_random_engine

std::random_shuffle is deprecated and removed starting from C++17, so we
might better use std::shuffle which uses URBG:
https://en.cppreference.com/w/cpp/named_req/UniformRandomBitGenerator
under the hood for a better random generation.
12 files changed:
pdns/Makefile.am
pdns/dns_random.hh
pdns/dnspacket.cc
pdns/misc.cc
pdns/misc.hh
pdns/pdns_recursor.cc
pdns/recursordist/Makefile.am
pdns/recursordist/shuffle.cc [new symlink]
pdns/recursordist/shuffle.hh [new symlink]
pdns/shuffle.cc [new file with mode: 0644]
pdns/shuffle.hh [new file with mode: 0644]
pdns/syncres.cc