From: Yuri Schaeffer Date: Wed, 10 Jul 2013 12:36:48 +0000 (+0000) Subject: Subnet OPT assigned by IANA X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=754944ed68bf52832abdebd82e6e77b78879d44e;p=thirdparty%2Funbound.git Subnet OPT assigned by IANA git-svn-id: file:///svn/unbound/branches/edns-subnet@2919 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/unbound.conf.5.in b/doc/unbound.conf.5.in index 89c916e96..bc520d3a9 100644 --- a/doc/unbound.conf.5.in +++ b/doc/unbound.conf.5.in @@ -911,8 +911,7 @@ Send client source address to this authority. Can be IP4 or IP6. Append 10.2.3.4/24 or 2001::11/64. .TP 5 .B client\-subnet\-opcode: \fI -Client subnet option code is not assigned by IANA. Specify positive -integer smaller than 65536. Defaults to 20730. +Specify positive integer smaller than 65536. Defaults to 8. .TP 5 .B max\-client\-subnet\-ipv6: \fI Specifies the maximum prefix length of the client source address we diff --git a/edns-subnet/edns-subnet.c b/edns-subnet/edns-subnet.c index ee27b5710..a658126fd 100644 --- a/edns-subnet/edns-subnet.c +++ b/edns-subnet/edns-subnet.c @@ -15,8 +15,8 @@ #include "edns-subnet/edns-subnet.h" #include -/** Opcode for edns subnet option, is TBD. */ -uint16_t EDNSSUBNET_OPCODE = 0x50fa; +/** Opcode for edns subnet option, as assigned by IANA. */ +uint16_t EDNSSUBNET_OPCODE = 8; uint8_t EDNSSUBNET_MAX_SUBNET_IP4 = 24; uint8_t EDNSSUBNET_MAX_SUBNET_IP6 = 64; diff --git a/util/config_file.c b/util/config_file.c index 6a2894204..ceab04ae6 100644 --- a/util/config_file.c +++ b/util/config_file.c @@ -161,9 +161,7 @@ config_create(void) cfg->forwards = NULL; #ifdef CLIENT_SUBNET cfg->client_subnet = NULL; - /* OPC Not assigned yet! taken from http://wilmer.gaa.st/ - * edns-client-subnet/bind-9.7.1-dig-edns-client-subnet.diff */ - cfg->client_subnet_opcode = 0x50fa; + cfg->client_subnet_opcode = 8; cfg->max_client_subnet_ipv4 = 24; cfg->max_client_subnet_ipv6 = 64; #endif