rcpgenerator.cc rcpgenerator.hh \
sillyrecords.cc \
statbag.cc \
- unix_utility.cc
+ unix_utility.cc \
+ dns_random.cc
pdns_notify_LDFLAGS = \
$(AM_LDFLAGS) \
$(LIBCRYPTO_LIBS) \
$(BOOST_PROGRAM_OPTIONS_LIBS)
+if LIBSODIUM
+pdns_notify_LDADD += $(LIBSODIUM_LIBS)
+endif
+
dnsscope_SOURCES = \
arguments.cc \
base32.cc \
#endif
#include <bitset>
#include "dnsparser.hh"
+#include "dns_random.hh"
#include "iputils.hh"
#include <boost/program_options.hpp>
}
vector<uint8_t> outpacket;
DNSPacketWriter pw(outpacket, DNSName(argv[2]), QType::SOA, 1, Opcode::Notify);
- pw.getHeader()->id = random();
+ pw.getHeader()->id = dns_random(UINT16_MAX);
if(send(sock, &outpacket[0], outpacket.size(), 0) < 0) {
cerr<<"Unable to send notify to "<<addr.toStringWithPort()<<": "+stringerror()<<endl;