diff -ur djbdns-1.04/Makefile djbdns-1.04-multiip/Makefile
--- djbdns-1.04/Makefile	Mon Jan 22 02:51:44 2001
+++ djbdns-1.04-multiip/Makefile	Thu Feb 15 13:54:19 2001
@@ -626,9 +626,9 @@
 	./compile parsetype.c
 
 pickdns: \
-load pickdns.o server.o response.o droproot.o qlog.o prot.o dns.a \
+load pickdns.o server.o iopause.o response.o droproot.o qlog.o prot.o dns.a \
 env.a libtai.a cdb.a alloc.a buffer.a unix.a byte.a socket.lib
-	./load pickdns server.o response.o droproot.o qlog.o \
+	./load pickdns server.o iopause.o response.o droproot.o qlog.o \
 	prot.o dns.a env.a libtai.a cdb.a alloc.a buffer.a unix.a \
 	byte.a  `cat socket.lib`
 
@@ -704,9 +704,9 @@
 	./compile random-ip.c
 
 rbldns: \
-load rbldns.o server.o response.o dd.o droproot.o qlog.o prot.o dns.a \
+load rbldns.o server.o iopause.o response.o dd.o droproot.o qlog.o prot.o dns.a \
 env.a libtai.a cdb.a alloc.a buffer.a unix.a byte.a socket.lib
-	./load rbldns server.o response.o dd.o droproot.o qlog.o \
+	./load rbldns server.o iopause.o response.o dd.o droproot.o qlog.o \
 	prot.o dns.a env.a libtai.a cdb.a alloc.a buffer.a unix.a \
 	byte.a  `cat socket.lib`
 
@@ -773,7 +773,8 @@
 server.o: \
 compile server.c byte.h case.h env.h strerr.h ip4.h uint16.h ndelay.h \
 socket.h uint16.h droproot.h qlog.h uint16.h response.h uint32.h \
-dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h taia.h
+dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h taia.h \
+iopause.h alloc.h
 	./compile server.c
 
 setup: \
@@ -978,10 +979,10 @@
 	./compile timeoutwrite.c
 
 tinydns: \
-load tinydns.o server.o droproot.o tdlookup.o response.o qlog.o \
+load tinydns.o server.o iopause.o droproot.o tdlookup.o response.o qlog.o \
 prot.o dns.a libtai.a env.a cdb.a alloc.a buffer.a unix.a byte.a \
 socket.lib
-	./load tinydns server.o droproot.o tdlookup.o response.o \
+	./load tinydns server.o iopause.o droproot.o tdlookup.o response.o \
 	qlog.o prot.o dns.a libtai.a env.a cdb.a alloc.a buffer.a \
 	unix.a byte.a  `cat socket.lib`
 
@@ -1083,10 +1084,10 @@
 	./compile utime.c
 
 walldns: \
-load walldns.o server.o response.o droproot.o qlog.o prot.o dd.o \
+load walldns.o server.o iopause.o response.o droproot.o qlog.o prot.o dd.o \
 dns.a env.a cdb.a alloc.a buffer.a unix.a byte.a socket.lib
-	./load walldns server.o response.o droproot.o qlog.o \
-	prot.o dd.o dns.a env.a cdb.a alloc.a buffer.a unix.a \
+	./load walldns server.o iopause.o response.o droproot.o qlog.o \
+	prot.o dd.o dns.a libtai.a env.a cdb.a alloc.a buffer.a unix.a \
 	byte.a  `cat socket.lib`
 
 walldns-conf: \
diff -ur djbdns-1.04/server.c djbdns-1.04-multiip/server.c
--- djbdns-1.04/server.c	Mon Jan 22 02:51:44 2001
+++ djbdns-1.04-multiip/server.c	Thu Feb 15 13:53:50 2001
@@ -10,6 +10,8 @@
 #include "qlog.h"
 #include "response.h"
 #include "dns.h"
+#include "alloc.h"
+#include "iopause.h"
 
 extern char *fatal;
 extern int respond(char *,char *,char *);
@@ -23,6 +25,11 @@
 
 static char *q;
 
+void nomem()
+{
+  strerr_die1x(111,"out of memory");
+}
+
 static int doit(void)
 {
   unsigned int pos;
@@ -81,33 +88,72 @@
 int main()
 {
   char *x;
-  int udp53;
+  int *udp53;
+  unsigned int off;
+  unsigned int cnt;
+  iopause_fd *iop;
 
   x = env_get("IP");
   if (!x)
     strerr_die2x(111,fatal,"$IP not set");
-  if (!ip4_scan(x,ip))
-    strerr_die3x(111,fatal,"unable to parse IP address ",x);
-
-  udp53 = socket_udp();
-  if (udp53 == -1)
-    strerr_die2sys(111,fatal,"unable to create UDP socket: ");
-  if (socket_bind4_reuse(udp53,ip,53) == -1)
-    strerr_die2sys(111,fatal,"unable to bind UDP socket: ");
+  off=0;
+  cnt=0;
+  while (x[off]) {
+    unsigned int l;
+    char dummy[4];
+    l=ip4_scan(x+off,dummy);
+	if (!l)
+      strerr_die3x(111,fatal,"unable to parse IP address ",x+off);
+	cnt++;
+	if (!x[off+l]) break;
+	if (x[off+l]!=',')
+      strerr_die3x(111,fatal,"unable to parse IP address ",x+off);
+	off+=l+1;
+  }
+  udp53=(int *) alloc(sizeof(int) *cnt);
+  if (!udp53) nomem();
+  iop=(iopause_fd *) alloc(sizeof(*iop) * cnt);
+  if (!iop) nomem();
+
+  off=0;
+  cnt=0;
+  while (x[off]) {
+    unsigned int l;
+    l=ip4_scan(x+off,ip);
+    udp53[cnt] = socket_udp();
+    if (udp53[cnt] == -1)
+      strerr_die2sys(111,fatal,"unable to create UDP socket: ");
+    if (socket_bind4_reuse(udp53[cnt],ip,53) == -1)
+      strerr_die2sys(111,fatal,"unable to bind UDP socket: ");
+	ndelay_off(udp53[cnt]);
+    socket_tryreservein(udp53[cnt],65536);
+	iop[cnt].fd=udp53[cnt];
+	iop[cnt].events=IOPAUSE_READ;
+	cnt++;
+	if (!x[off+l]) break;
+	off+=l+1;
+  }
 
   droproot(fatal);
 
   initialize();
   
-  ndelay_off(udp53);
-  socket_tryreservein(udp53,65536);
-
   for (;;) {
-    len = socket_recv4(udp53,buf,sizeof buf,ip,&port);
-    if (len < 0) continue;
-    if (!doit()) continue;
-    if (response_len > 512) response_tc();
-    socket_send4(udp53,response,response_len,ip,port);
-    /* may block for buffer space; if it fails, too bad */
+    struct taia stamp;
+    struct taia deadline;
+	unsigned int i;
+    taia_now(&stamp);
+    taia_uint(&deadline,300);
+    taia_add(&deadline,&deadline,&stamp);
+    iopause(iop,cnt,&deadline,&stamp);
+	for (i=0;i<cnt;i++)
+	  if (iop[i].revents) {
+        len = socket_recv4(udp53[i],buf,sizeof buf,ip,&port);
+        if (len < 0) continue;
+        if (!doit()) continue;
+        if (response_len > 512) response_tc();
+        socket_send4(udp53[i],response,response_len,ip,port);
+        /* may block for buffer space; if it fails, too bad */
+	  }
   }
 }
