[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Ipv6 resolving using ip6.arpa.
- To: ircd-users@xxxxxxx
- Subject: Ipv6 resolving using ip6.arpa.
- From: Kurt Roeckx <Q@xxxxxxx>
- Date: Sat, 16 Nov 2002 23:33:36 +0100
- Delivered-to: ircd-users-out@irc.org
- Delivered-to: ircd-users@irc.org
- User-agent: Mutt/1.2.5i
I've made a little patch for people who also want to use ip6.arpa
instead of ip6.int for resolving hosts.
BCP49 (RFC3152) deprecates the use of ip6.int and it should be no
problem to get an ip6.arpa delegation from the RIRs, so we'll
move to ip6.arpa in the future.
Kurt
diff -ur irc2.10.3p3/ircd/res.c irc2.10.3p3+arpa/ircd/res.c
--- irc2.10.3p3/ircd/res.c Thu Oct 18 21:54:54 2001
+++ irc2.10.3p3+arpa/ircd/res.c Sat Nov 16 23:14:03 2002
@@ -473,7 +473,7 @@
}
else
{
- (void)sprintf(ipbuf, "%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.ip6.int.",
+ (void)sprintf(ipbuf, "%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.ip6.%s.",
(u_int)(cp[15]&0xf), (u_int)(cp[15]>>4),
(u_int)(cp[14]&0xf), (u_int)(cp[14]>>4),
(u_int)(cp[13]&0xf), (u_int)(cp[13]>>4),
@@ -489,7 +489,13 @@
(u_int)(cp[3]&0xf), (u_int)(cp[3]>>4),
(u_int)(cp[2]&0xf), (u_int)(cp[2]>>4),
(u_int)(cp[1]&0xf), (u_int)(cp[1]>>4),
- (u_int)(cp[0]&0xf), (u_int)(cp[0]>>4));
+ (u_int)(cp[0]&0xf), (u_int)(cp[0]>>4),
+#ifdef SIXBONE_HACK
+ (cp[0] == 0x3f && cp[1] == 0xfe) ? "int" : "arpa"
+#else
+ "arpa"
+#endif
+ );
}
#else
cp = (u_char *)&numb->s_addr;
diff -ur irc2.10.3p3/support/config.h.dist irc2.10.3p3+arpa/support/config.h.dist
--- irc2.10.3p3/support/config.h.dist Fri Oct 19 23:51:15 2001
+++ irc2.10.3p3+arpa/support/config.h.dist Sat Nov 16 23:25:00 2002
@@ -383,6 +383,12 @@
*/
#undef CLONE_CHECK
+/*
+ * Because ip6.arpa is still not delegated for the 6bone (3ffe::/16)
+ * this options allows you to still resolve it using ip6.int.
+ */
+#define SIXBONE_HACK
+
/* STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP */
/* STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP */
/* STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP */