diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2008-07-09 17:16:52 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2008-07-09 17:16:52 +0000 |
commit | e21e18e517e9e801b8dcfda227e8d292a07a55de (patch) | |
tree | ce967771a166a0ee914acd6bcc8821fa65ebb81b /usr.sbin/relayd/relay.c | |
parent | 43e55672e3e4f9340da885d183b4f3ad60963700 (diff) |
Use OpenBSD's knuth shuffle algorithm of random values from bind to
produce the DNS request ids instead of a simple per-request
arc4random(). This ensure randomness but also satisfies the
non-repeating property we need.
ok deraadt@
Diffstat (limited to 'usr.sbin/relayd/relay.c')
-rw-r--r-- | usr.sbin/relayd/relay.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/usr.sbin/relayd/relay.c b/usr.sbin/relayd/relay.c index 005ca6852c2..c9432815bb0 100644 --- a/usr.sbin/relayd/relay.c +++ b/usr.sbin/relayd/relay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relay.c,v 1.91 2008/07/09 14:57:01 reyk Exp $ */ +/* $OpenBSD: relay.c,v 1.92 2008/07/09 17:16:51 reyk Exp $ */ /* * Copyright (c) 2006, 2007, 2008 Reyk Floeter <reyk@openbsd.org> @@ -485,6 +485,16 @@ relay_init(void) rlay->rl_dstnhosts, rlay->rl_dsttable->conf.name, rlay->rl_dsttable->conf.check ? "" : " (no check)"); } + + switch (rlay->rl_proto->type) { + case RELAY_PROTO_DNS: + relay_udp_init(rlay); + break; + case RELAY_PROTO_TCP: + case RELAY_PROTO_HTTP: + /* Use defaults */ + break; + } } /* Schedule statistics timer */ |