mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-28 13:08:06 +00:00
remove all vestiges of 16 bit global compression
This commit is contained in:
parent
af5dc286ff
commit
d780c35e54
@ -15,7 +15,6 @@
|
|||||||
# DNS_COMPRESS_ALL
|
# DNS_COMPRESS_ALL
|
||||||
# DNS_COMPRESS_GLOBAL
|
# DNS_COMPRESS_GLOBAL
|
||||||
# DNS_COMPRESS_GLOBAL14
|
# DNS_COMPRESS_GLOBAL14
|
||||||
# DNS_COMPRESS_GLOBAL16
|
|
||||||
# DNS_COMPRESS_NONE
|
# DNS_COMPRESS_NONE
|
||||||
#
|
#
|
||||||
# and where exp_name is the expected name after any decompression
|
# and where exp_name is the expected name after any decompression
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
# DNS_COMPRESS_ALL
|
# DNS_COMPRESS_ALL
|
||||||
# DNS_COMPRESS_GLOBAL
|
# DNS_COMPRESS_GLOBAL
|
||||||
# DNS_COMPRESS_GLOBAL14
|
# DNS_COMPRESS_GLOBAL14
|
||||||
# DNS_COMPRESS_GLOBAL16
|
|
||||||
# DNS_COMPRESS_NONE
|
# DNS_COMPRESS_NONE
|
||||||
#
|
#
|
||||||
# and where exp_name is the expected name after any decompression
|
# and where exp_name is the expected name after any decompression
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
# DNS_COMPRESS_ALL
|
# DNS_COMPRESS_ALL
|
||||||
# DNS_COMPRESS_GLOBAL
|
# DNS_COMPRESS_GLOBAL
|
||||||
# DNS_COMPRESS_GLOBAL14
|
# DNS_COMPRESS_GLOBAL14
|
||||||
# DNS_COMPRESS_GLOBAL16
|
|
||||||
# DNS_COMPRESS_NONE
|
# DNS_COMPRESS_NONE
|
||||||
#
|
#
|
||||||
# and where exp_name is the expected name after any decompression
|
# and where exp_name is the expected name after any decompression
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
# DNS_COMPRESS_ALL
|
# DNS_COMPRESS_ALL
|
||||||
# DNS_COMPRESS_GLOBAL
|
# DNS_COMPRESS_GLOBAL
|
||||||
# DNS_COMPRESS_GLOBAL14
|
# DNS_COMPRESS_GLOBAL14
|
||||||
# DNS_COMPRESS_GLOBAL16
|
|
||||||
# DNS_COMPRESS_NONE
|
# DNS_COMPRESS_NONE
|
||||||
#
|
#
|
||||||
# and where exp_name is the expected name after any decompression
|
# and where exp_name is the expected name after any decompression
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
# DNS_COMPRESS_ALL
|
# DNS_COMPRESS_ALL
|
||||||
# DNS_COMPRESS_GLOBAL
|
# DNS_COMPRESS_GLOBAL
|
||||||
# DNS_COMPRESS_GLOBAL14
|
# DNS_COMPRESS_GLOBAL14
|
||||||
# DNS_COMPRESS_GLOBAL16
|
|
||||||
# DNS_COMPRESS_NONE
|
# DNS_COMPRESS_NONE
|
||||||
#
|
#
|
||||||
# and where exp_name is the expected name after any decompression
|
# and where exp_name is the expected name after any decompression
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
# DNS_COMPRESS_ALL
|
# DNS_COMPRESS_ALL
|
||||||
# DNS_COMPRESS_GLOBAL
|
# DNS_COMPRESS_GLOBAL
|
||||||
# DNS_COMPRESS_GLOBAL14
|
# DNS_COMPRESS_GLOBAL14
|
||||||
# DNS_COMPRESS_GLOBAL16
|
|
||||||
# DNS_COMPRESS_NONE
|
# DNS_COMPRESS_NONE
|
||||||
#
|
#
|
||||||
# and where exp_name is the expected name after any decompression
|
# and where exp_name is the expected name after any decompression
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
# DNS_COMPRESS_ALL
|
# DNS_COMPRESS_ALL
|
||||||
# DNS_COMPRESS_GLOBAL
|
# DNS_COMPRESS_GLOBAL
|
||||||
# DNS_COMPRESS_GLOBAL14
|
# DNS_COMPRESS_GLOBAL14
|
||||||
# DNS_COMPRESS_GLOBAL16
|
|
||||||
# DNS_COMPRESS_NONE
|
# DNS_COMPRESS_NONE
|
||||||
#
|
#
|
||||||
# and where exp_name is the expected name after any decompression
|
# and where exp_name is the expected name after any decompression
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
# DNS_COMPRESS_ALL
|
# DNS_COMPRESS_ALL
|
||||||
# DNS_COMPRESS_GLOBAL
|
# DNS_COMPRESS_GLOBAL
|
||||||
# DNS_COMPRESS_GLOBAL14
|
# DNS_COMPRESS_GLOBAL14
|
||||||
# DNS_COMPRESS_GLOBAL16
|
|
||||||
# DNS_COMPRESS_NONE
|
# DNS_COMPRESS_NONE
|
||||||
#
|
#
|
||||||
# and where exp_name is the expected name after any decompression
|
# and where exp_name is the expected name after any decompression
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
# DNS_COMPRESS_ALL
|
# DNS_COMPRESS_ALL
|
||||||
# DNS_COMPRESS_GLOBAL
|
# DNS_COMPRESS_GLOBAL
|
||||||
# DNS_COMPRESS_GLOBAL14
|
# DNS_COMPRESS_GLOBAL14
|
||||||
# DNS_COMPRESS_GLOBAL16
|
|
||||||
# DNS_COMPRESS_NONE
|
# DNS_COMPRESS_NONE
|
||||||
#
|
#
|
||||||
# and where exp_name is the expected name after any decompression
|
# and where exp_name is the expected name after any decompression
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
# DNS_COMPRESS_ALL
|
# DNS_COMPRESS_ALL
|
||||||
# DNS_COMPRESS_GLOBAL
|
# DNS_COMPRESS_GLOBAL
|
||||||
# DNS_COMPRESS_GLOBAL14
|
# DNS_COMPRESS_GLOBAL14
|
||||||
# DNS_COMPRESS_GLOBAL16
|
|
||||||
# DNS_COMPRESS_NONE
|
# DNS_COMPRESS_NONE
|
||||||
#
|
#
|
||||||
# and where exp_data is the expected wire format data in hex format
|
# and where exp_data is the expected wire format data in hex format
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
# DNS_COMPRESS_ALL
|
# DNS_COMPRESS_ALL
|
||||||
# DNS_COMPRESS_GLOBAL
|
# DNS_COMPRESS_GLOBAL
|
||||||
# DNS_COMPRESS_GLOBAL14
|
# DNS_COMPRESS_GLOBAL14
|
||||||
# DNS_COMPRESS_GLOBAL16
|
|
||||||
# DNS_COMPRESS_NONE
|
# DNS_COMPRESS_NONE
|
||||||
#
|
#
|
||||||
# and where exp_data is the expected wire format data in hex format
|
# and where exp_data is the expected wire format data in hex format
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: t_names.c,v 1.29 2000/11/14 23:29:47 bwelling Exp $ */
|
/* $Id: t_names.c,v 1.30 2000/12/28 00:43:12 bwelling Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@ -2242,8 +2242,6 @@ t_dns_name_fromwire_x(const char *testfile, size_t buflen) {
|
|||||||
dc_method = DNS_COMPRESS_NONE;
|
dc_method = DNS_COMPRESS_NONE;
|
||||||
if (! strcmp(tok, "DNS_COMPRESS_GLOBAL14"))
|
if (! strcmp(tok, "DNS_COMPRESS_GLOBAL14"))
|
||||||
dc_method = DNS_COMPRESS_GLOBAL14;
|
dc_method = DNS_COMPRESS_GLOBAL14;
|
||||||
else if (! strcmp(tok,"DNS_COMPRESS_GLOBAL16"))
|
|
||||||
dc_method = DNS_COMPRESS_GLOBAL16;
|
|
||||||
else if (! strcmp(tok, "DNS_COMPRESS_GLOBAL"))
|
else if (! strcmp(tok, "DNS_COMPRESS_GLOBAL"))
|
||||||
dc_method = DNS_COMPRESS_GLOBAL;
|
dc_method = DNS_COMPRESS_GLOBAL;
|
||||||
else if (! strcmp(tok, "DNS_COMPRESS_ALL"))
|
else if (! strcmp(tok, "DNS_COMPRESS_ALL"))
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: compress.h,v 1.19 2000/11/14 23:29:55 bwelling Exp $ */
|
/* $Id: compress.h,v 1.20 2000/12/28 00:42:56 bwelling Exp $ */
|
||||||
|
|
||||||
#ifndef DNS_COMPRESS_H
|
#ifndef DNS_COMPRESS_H
|
||||||
#define DNS_COMPRESS_H 1
|
#define DNS_COMPRESS_H 1
|
||||||
@ -28,8 +28,7 @@ ISC_LANG_BEGINDECLS
|
|||||||
|
|
||||||
#define DNS_COMPRESS_NONE 0x00 /* no compression */
|
#define DNS_COMPRESS_NONE 0x00 /* no compression */
|
||||||
#define DNS_COMPRESS_GLOBAL14 0x01 /* "normal" compression. */
|
#define DNS_COMPRESS_GLOBAL14 0x01 /* "normal" compression. */
|
||||||
#define DNS_COMPRESS_GLOBAL16 0x02 /* 16-bit edns global comp. */
|
#define DNS_COMPRESS_GLOBAL 0x01 /* all global comp. */
|
||||||
#define DNS_COMPRESS_GLOBAL 0x03 /* all global comp. */
|
|
||||||
/*
|
/*
|
||||||
* Synonymous with DNS_COMPRESS_GLOBAL. A genuine difference existed when
|
* Synonymous with DNS_COMPRESS_GLOBAL. A genuine difference existed when
|
||||||
* local compression was an IETF draft, but that draft has been retired without
|
* local compression was an IETF draft, but that draft has been retired without
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: name.h,v 1.82 2000/11/27 19:42:34 gson Exp $ */
|
/* $Id: name.h,v 1.83 2000/12/28 00:42:58 bwelling Exp $ */
|
||||||
|
|
||||||
#ifndef DNS_NAME_H
|
#ifndef DNS_NAME_H
|
||||||
#define DNS_NAME_H 1
|
#define DNS_NAME_H 1
|
||||||
@ -93,7 +93,6 @@ ISC_LANG_BEGINDECLS
|
|||||||
*** Extended Label Types
|
*** Extended Label Types
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#define DNS_LABELTYPE_GLOBALCOMP16 0x40
|
|
||||||
#define DNS_LABELTYPE_BITSTRING 0x41
|
#define DNS_LABELTYPE_BITSTRING 0x41
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: name.c,v 1.109 2000/12/11 19:24:14 bwelling Exp $ */
|
/* $Id: name.c,v 1.110 2000/12/28 00:42:55 bwelling Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@ -2290,16 +2290,6 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
|
|||||||
*ndata++ = c;
|
*ndata++ = c;
|
||||||
saw_bitstring = ISC_TRUE;
|
saw_bitstring = ISC_TRUE;
|
||||||
state = fw_bitstring;
|
state = fw_bitstring;
|
||||||
} else if (c == DNS_LABELTYPE_GLOBALCOMP16) {
|
|
||||||
/*
|
|
||||||
* 16-bit pointer.
|
|
||||||
*/
|
|
||||||
if ((dctx->allowed & DNS_COMPRESS_GLOBAL16) ==
|
|
||||||
0)
|
|
||||||
return (DNS_R_DISALLOWED);
|
|
||||||
new_current = 0;
|
|
||||||
n = 2;
|
|
||||||
state = fw_newcurrent;
|
|
||||||
} else
|
} else
|
||||||
return (DNS_R_BADLABELTYPE);
|
return (DNS_R_BADLABELTYPE);
|
||||||
break;
|
break;
|
||||||
@ -2430,10 +2420,17 @@ dns_name_towire(dns_name_t *name, dns_compress_t *cctx, isc_buffer_t *target) {
|
|||||||
else
|
else
|
||||||
gf = ISC_FALSE;
|
gf = ISC_FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If the offset is too high for 14 bit global compression, we're
|
||||||
|
* out of luck.
|
||||||
|
*/
|
||||||
|
if (gf && go >= 0x4000)
|
||||||
|
gf = ISC_FALSE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Will the compression pointer reduce the message size?
|
* Will the compression pointer reduce the message size?
|
||||||
*/
|
*/
|
||||||
if (gf && (gp.length + ((go < 16384) ? 2 : 3)) >= name->length)
|
if (gf && (gp.length + 2) >= name->length)
|
||||||
gf = ISC_FALSE;
|
gf = ISC_FALSE;
|
||||||
|
|
||||||
if (gf) {
|
if (gf) {
|
||||||
@ -2442,19 +2439,10 @@ dns_name_towire(dns_name_t *name, dns_compress_t *cctx, isc_buffer_t *target) {
|
|||||||
(void)memcpy((unsigned char *)target->base + target->used,
|
(void)memcpy((unsigned char *)target->base + target->used,
|
||||||
gp.ndata, (size_t)gp.length);
|
gp.ndata, (size_t)gp.length);
|
||||||
isc_buffer_add(target, gp.length);
|
isc_buffer_add(target, gp.length);
|
||||||
if (go < 16384) {
|
go |= 0xc000;
|
||||||
go |= 0xc000;
|
if (target->length - target->used < 2)
|
||||||
if (target->length - target->used < 2)
|
return (ISC_R_NOSPACE);
|
||||||
return (ISC_R_NOSPACE);
|
isc_buffer_putuint16(target, go);
|
||||||
isc_buffer_putuint16(target, go);
|
|
||||||
} else {
|
|
||||||
if (target->length - target->used < 3)
|
|
||||||
return (ISC_R_NOSPACE);
|
|
||||||
*((unsigned char*)target->base + target->used) =
|
|
||||||
DNS_LABELTYPE_GLOBALCOMP16;
|
|
||||||
isc_buffer_add(target, 1);
|
|
||||||
isc_buffer_putuint16(target, go);
|
|
||||||
}
|
|
||||||
if (gp.length != 0)
|
if (gp.length != 0)
|
||||||
dns_compress_add(cctx, &gp, &gs, offset);
|
dns_compress_add(cctx, &gp, &gs, offset);
|
||||||
} else {
|
} else {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: t_api.c,v 1.44 2000/11/25 01:20:47 marka Exp $ */
|
/* $Id: t_api.c,v 1.45 2000/12/28 00:42:59 bwelling Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@ -654,7 +654,6 @@ struct dc_method_map {
|
|||||||
|
|
||||||
{ DNS_COMPRESS_NONE, "DNS_COMPRESS_NONE" },
|
{ DNS_COMPRESS_NONE, "DNS_COMPRESS_NONE" },
|
||||||
{ DNS_COMPRESS_GLOBAL14, "DNS_COMPRESS_GLOBAL14" },
|
{ DNS_COMPRESS_GLOBAL14, "DNS_COMPRESS_GLOBAL14" },
|
||||||
{ DNS_COMPRESS_GLOBAL16, "DNS_COMPRESS_GLOBAL16" },
|
|
||||||
{ DNS_COMPRESS_GLOBAL, "DNS_COMPRESS_GLOBAL" },
|
{ DNS_COMPRESS_GLOBAL, "DNS_COMPRESS_GLOBAL" },
|
||||||
{ DNS_COMPRESS_ALL, "DNS_COMPRESS_ALL" },
|
{ DNS_COMPRESS_ALL, "DNS_COMPRESS_ALL" },
|
||||||
{ 0, NULL }
|
{ 0, NULL }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user