Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

-d validation code was broken.

  • Loading branch information...
commit 0353c840d7e8a7d129ee1b12a6b6896d803d31b2 1 parent 8a864e2
itojun authored
Showing with 16 additions and 2 deletions.
  1. +5 −1 kame/kame/mdnsd/mainloop.c
  2. +11 −1 kame/kame/mdnsd/mdnsd.c
View
6 kame/kame/mdnsd/mainloop.c
@@ -1,4 +1,4 @@
-/* $KAME: mainloop.c,v 1.4 2000/05/21 05:15:35 itojun Exp $ */
+/* $KAME: mainloop.c,v 1.5 2000/05/21 06:34:01 itojun Exp $ */
/*
* Copyright (C) 2000 WIDE Project.
@@ -411,6 +411,10 @@ relay(buf, len, from)
return 0;
}
+/*
+ * XXX should defer transmission with random delay, and supress duplicated
+ * replies (mdns-00 page 3)
+ */
static int
serve(buf, len, from)
char *buf;
View
12 kame/kame/mdnsd/mdnsd.c
@@ -1,4 +1,4 @@
-/* $KAME: mdnsd.c,v 1.3 2000/05/21 05:15:35 itojun Exp $ */
+/* $KAME: mdnsd.c,v 1.4 2000/05/21 06:34:01 itojun Exp $ */
/*
* Copyright (C) 2000 WIDE Project.
@@ -287,14 +287,21 @@ static int
iscanon(n)
const char *n;
{
+#if 0
struct addrinfo hints, *res;
int ret;
+#endif
if (strlen(n) == 0)
return 0;
if (n[strlen(n) - 1] != '.')
return 0;
+#if 0
+ /*
+ * XXX the code fragment does not work. /etc/resolv.conf will have
+ * "nameserver 0.0.0.0" to point to mdnsd itself!
+ */
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM; /*dummy*/
@@ -313,6 +320,9 @@ iscanon(n)
ret = 0;
freeaddrinfo(res);
return ret;
+#else
+ return 1;
+#endif
}
int
Please sign in to comment.
Something went wrong with that request. Please try again.