Bump to version 1.22.1
[platform/upstream/busybox.git] / networking / dnsd.c
index 1a99040..fe98400 100644 (file)
@@ -6,7 +6,7 @@
  * Copyright (C) 2005 Odd Arild Olsen (oao at fibula dot no)
  * Copyright (C) 2003 Paul Sheer
  *
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
+ * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  *
  * Odd Arild Olsen started out with the sheerdns [1] of Paul Sheer and rewrote
  * it into a shape which I believe is both easier to understand and maintain.
  * the first porting of oao' scdns to busybox also.
  */
 
+//usage:#define dnsd_trivial_usage
+//usage:       "[-dvs] [-c CONFFILE] [-t TTL_SEC] [-p PORT] [-i ADDR]"
+//usage:#define dnsd_full_usage "\n\n"
+//usage:       "Small static DNS server daemon\n"
+//usage:     "\n       -c FILE Config file"
+//usage:     "\n       -t SEC  TTL"
+//usage:     "\n       -p PORT Listen on PORT"
+//usage:     "\n       -i ADDR Listen on ADDR"
+//usage:     "\n       -d      Daemonize"
+//usage:     "\n       -v      Verbose"
+//usage:     "\n       -s      Send successful replies only. Use this if you want"
+//usage:     "\n               to use /etc/resolv.conf with two nameserver lines:"
+//usage:     "\n                       nameserver DNSD_SERVER"
+//usage:     "\n                       nameserver NORMAL_DNS_SERVER"
+
 #include "libbb.h"
 #include <syslog.h>
 
@@ -388,7 +403,7 @@ static int process_packet(struct dns_entry *conf_data,
        query_len = strlen(query_string) + 1;
        /* may be unaligned! */
        unaligned_type_class = (void *)(query_string + query_len);
-       query_len += sizeof(unaligned_type_class);
+       query_len += sizeof(*unaligned_type_class);
        /* where to append answer block */
        answb = (void *)(unaligned_type_class + 1);