Skip to content

Commit df4c5f7

Browse files
author
Matthijs Mekking
committed
eui is not draft and draft is stoopid
git-svn-id: file:///svn/nsd/trunk@4095 a26ef69c-88ff-0310-839f-98b793d9c207
1 parent 1a71502 commit df4c5f7

9 files changed

+5
-46
lines changed

configure.ac

-9
Original file line numberDiff line numberDiff line change
@@ -789,15 +789,6 @@ case "$enable_minimal_responses" in
789789
;;
790790
esac
791791

792-
AC_ARG_ENABLE(draft-rrtypes, AC_HELP_STRING([--enable-draft-rrtypes], [Enable draft RRtypes.]))
793-
case "$enable_draft_rrtypes" in
794-
yes)
795-
AC_DEFINE_UNQUOTED([DRAFT_RRTYPES], [], [Define this to enable draft RRtypes.])
796-
;;
797-
no|*)
798-
;;
799-
esac
800-
801792
AC_ARG_ENABLE(mmap, AC_HELP_STRING([--enable-mmap], [Use mmap instead of malloc. Experimental.]))
802793
case "$enable_mmap" in
803794
yes)

dns.c

-2
Original file line numberDiff line numberDiff line change
@@ -426,14 +426,12 @@ static rrtype_descriptor_type rrtype_descriptors[(RRTYPE_DESCRIPTORS_LENGTH+1)]
426426
{ TYPE_LP, "LP", T_LP, 2, 2,
427427
{ RDATA_WF_SHORT, RDATA_WF_UNCOMPRESSED_DNAME },
428428
{ RDATA_ZF_SHORT, RDATA_ZF_DNAME } },
429-
#ifdef DRAFT_RRTYPES
430429
/* 108 */
431430
{ TYPE_EUI48, "EUI48", T_EUI48, 1, 1,
432431
{ RDATA_WF_EUI48 }, { RDATA_ZF_EUI48 } },
433432
/* 109 */
434433
{ TYPE_EUI64, "EUI64", T_EUI64, 1, 1,
435434
{ RDATA_WF_EUI64 }, { RDATA_ZF_EUI64 } },
436-
#endif
437435

438436
/* 32769 */
439437
{ TYPE_DLV, "DLV", T_DLV, 4, 4,

dns.h

-15
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,8 @@ typedef enum nsd_rc nsd_rc_type;
143143
#define TYPE_L32 105 /* RFC 6742 */
144144
#define TYPE_L64 106 /* RFC 6742 */
145145
#define TYPE_LP 107 /* RFC 6742 */
146-
147-
#ifdef DRAFT_RRTYPES
148146
#define TYPE_EUI48 108 /* draft-jabley-dnsext-eui48-eui64-rrtypes */
149147
#define TYPE_EUI64 109 /* draft-jabley-dnsext-eui48-eui64-rrtypes */
150-
#endif
151148

152149
#define TYPE_TSIG 250
153150
#define TYPE_IXFR 251
@@ -171,10 +168,8 @@ typedef enum nsd_rc nsd_rc_type;
171168

172169
#define IP4ADDRLEN (32/8)
173170
#define IP6ADDRLEN (128/8)
174-
#ifdef DRAFT_RRTYPES
175171
#define EUI48ADDRLEN (48/8)
176172
#define EUI64ADDRLEN (64/8)
177-
#endif
178173

179174
#define NSEC3_HASH_LEN 20
180175

@@ -197,13 +192,9 @@ enum rdata_wireformat
197192
RDATA_WF_BINARYWITHLENGTH, /* Binary data preceded by 1 byte length */
198193
RDATA_WF_APL, /* APL data. */
199194
RDATA_WF_IPSECGATEWAY, /* IPSECKEY gateway ip4, ip6 or dname. */
200-
#ifdef DRAFT_RRTYPES
201195
RDATA_WF_ILNP64, /* 64-bit uncompressed IPv6 address. */
202196
RDATA_WF_EUI48, /* 48-bit address. */
203197
RDATA_WF_EUI64 /* 64-bit address. */
204-
#else
205-
RDATA_WF_ILNP64 /* 64-bit uncompressed IPv6 address. */
206-
#endif
207198
};
208199
typedef enum rdata_wireformat rdata_wireformat_type;
209200

@@ -238,10 +229,8 @@ enum rdata_zoneformat
238229
RDATA_ZF_NSEC, /* NSEC type bitmap. */
239230
RDATA_ZF_LOC, /* Location data. */
240231
RDATA_ZF_ILNP64, /* 64-bit uncompressed IPv6 address. */
241-
#ifdef DRAFT_RRTYPES
242232
RDATA_ZF_EUI48, /* EUI48 address. */
243233
RDATA_ZF_EUI64, /* EUI64 address. */
244-
#endif
245234
RDATA_ZF_UNKNOWN /* Unknown data. */
246235
};
247236
typedef enum rdata_zoneformat rdata_zoneformat_type;
@@ -264,11 +253,7 @@ typedef struct rrtype_descriptor rrtype_descriptor_type;
264253
*
265254
* EUI64 + 1
266255
*/
267-
#ifdef DRAFT_RRTYPES
268256
#define RRTYPE_DESCRIPTORS_LENGTH (TYPE_EUI64 + 1)
269-
#else
270-
#define RRTYPE_DESCRIPTORS_LENGTH (TYPE_LP + 1)
271-
#endif
272257
rrtype_descriptor_type *rrtype_descriptor_by_name(const char *name);
273258
rrtype_descriptor_type *rrtype_descriptor_by_type(uint16_t type);
274259

doc/ChangeLog

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
11 November 2013: Matthijs
2+
- EUI48 and EUI64 is now RFC 7043
3+
14
5 November 2013: Wouter
25
- Accept interface: as an alternative for ip-address: for
36
consistency with unbound.conf syntax.

doc/REQUIREMENTS

+2-2
Original file line numberDiff line numberDiff line change
@@ -863,8 +863,8 @@ RR records details.
863863
"L64" 106, # RFC 6742
864864
"LP" 107, # RFC 6742
865865

866-
"EUI48" 108, # [draft-jabley-dnsext-eui48-eui64-rrtypes]
867-
"EUI64" 109, # [draft-jabley-dnsext-eui48-eui64-rrtypes]
866+
"EUI48" 108, # RFC 7043
867+
"EUI64" 109, # RFC 7043
868868

869869
"TKEY" 249, # RFC 2930
870870
"TSIG" 250, # RFC 2845

rdata.c

-6
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ rdata_ilnp64_to_string(buffer_type *output, rdata_atom_type rdata,
235235
return 1;
236236
}
237237

238-
#ifdef DRAFT_RRTYPES
239238
static int
240239
rdata_eui48_to_string(buffer_type *output, rdata_atom_type rdata,
241240
rr_type* ATTR_UNUSED(rr))
@@ -271,7 +270,6 @@ rdata_eui64_to_string(buffer_type *output, rdata_atom_type rdata,
271270
a1, a2, a3, a4, a5, a6, a7, a8);
272271
return 1;
273272
}
274-
#endif
275273

276274
static int
277275
rdata_rrtype_to_string(buffer_type *output, rdata_atom_type rdata,
@@ -631,10 +629,8 @@ static rdata_to_string_type rdata_to_string_table[RDATA_ZF_UNKNOWN + 1] = {
631629
rdata_nsec_to_string,
632630
rdata_loc_to_string,
633631
rdata_ilnp64_to_string,
634-
#ifdef DRAFT_RRTYPES
635632
rdata_eui48_to_string,
636633
rdata_eui64_to_string,
637-
#endif
638634
rdata_unknown_to_string
639635
};
640636

@@ -713,13 +709,11 @@ rdata_wireformat_to_rdata_atoms(region_type *region,
713709
case RDATA_WF_ILNP64:
714710
length = IP6ADDRLEN/2;
715711
break;
716-
#ifdef DRAFT_RRTYPES
717712
case RDATA_WF_EUI48:
718713
length = EUI48ADDRLEN;
719714
case RDATA_WF_EUI64:
720715
length = EUI64ADDRLEN;
721716
break;
722-
#endif
723717
case RDATA_WF_BINARY:
724718
/* Remaining RDATA is binary. */
725719
length = end - buffer_position(packet);

zonec.c

-2
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,6 @@ zparser_conv_ilnp64(region_type *region, const char *text)
451451
return r;
452452
}
453453

454-
#ifdef DRAFT_RRTYPES
455454
static uint16_t *
456455
zparser_conv_eui48(region_type *region, const char *text)
457456
{
@@ -541,7 +540,6 @@ zparser_conv_eui(region_type *region, const char *text, size_t len)
541540
}
542541
return r;
543542
}
544-
#endif
545543

546544
uint16_t *
547545
zparser_conv_text(region_type *region, const char *text, size_t len)

zonec.h

-2
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,7 @@ uint16_t *zparser_conv_byte(region_type *region, const char *text);
9696
uint16_t *zparser_conv_a(region_type *region, const char *text);
9797
uint16_t *zparser_conv_aaaa(region_type *region, const char *text);
9898
uint16_t *zparser_conv_ilnp64(region_type *region, const char *text);
99-
#ifdef DRAFT_RRTYPES
10099
uint16_t *zparser_conv_eui(region_type *region, const char *text, size_t len);
101-
#endif
102100
uint16_t *zparser_conv_text(region_type *region, const char *text, size_t len);
103101
uint16_t *zparser_conv_dns_name(region_type *region, const uint8_t* name, size_t len);
104102
uint16_t *zparser_conv_b32(region_type *region, const char *b32);

zparser.y

-8
Original file line numberDiff line numberDiff line change
@@ -995,21 +995,13 @@ rdata_lp: STR sp dname trail
995995

996996
rdata_eui48: STR trail
997997
{
998-
#ifdef DRAFT_RRTYPES
999998
zadd_rdata_wireformat(zparser_conv_eui(parser->region, $1.str, 48));
1000-
#else
1001-
zc_error_prev_line("EUI48 not supported, enable with --enable-draft-rrtypes.");
1002-
#endif
1003999
}
10041000
;
10051001

10061002
rdata_eui64: STR trail
10071003
{
1008-
#ifdef DRAFT_RRTYPES
10091004
zadd_rdata_wireformat(zparser_conv_eui(parser->region, $1.str, 64));
1010-
#else
1011-
zc_error_prev_line("EUI64 not supported, enable with --enable-draft-rrtypes.");
1012-
#endif
10131005
}
10141006
;
10151007

0 commit comments

Comments
 (0)