[Kea-users] Vendor Encapsulated options

Marcin Siodelski marcin at isc.org
Mon Nov 28 17:17:59 UTC 2016


On 08.11.2016 22:00, Sutherland, Rob wrote:
> Mitel phones expect option 43 (vendor encapsulated options) to be
> delivered as a string such as:
> 
> id:ipphone.mitel.com;sw_tftp=10.200.107.32;call_srv=10.200.107.32
> 
>  
> 
> The issue I am having is that I can find no way to define these options
> without a sub-option. This leaves two bytes in front of the option that
> confuse the phone. For example, the above string, which is 65 bytes
> long, has two bytes pre-pended: 1 (for the sub-option) and 0x41 (65 byte
> payload). Here is my attempt to configure this:
> 
>  
> 
>    "option-def": [
> 
>        {
> 
>             "name": "mitel-options",
> 
>             "code": 1,
> 
>             "space": "vendor-encapsulated-options-space",
> 
>             "type": "string",
> 
>             "array": false,
> 
>             "encapsulate": ""
> 
>         }
> 
>  ],
> 
>     "option-data": [
> 
>         {
> 
>             "name": "vendor-encapsulated-options",
> 
>              "csv-format": false
> 
>         },
> 
>         {
> 
>             "name": "mitel-options",
> 
>             "space": "vendor-encapsulated-options-space",
> 
>             "csv-format": true,
> 
>             "data":
> "id:ipphone.mitel.com;sw_tftp=10.200.107.32;call_srv=10.200.107.32"
> 
>         }
> 
>    ],
> 
>  
> 
> How can I eliminate the sub-code?
> 
>  
> 
> Thanks!
> 
>  
> 
> Rob
> 
>  
> 


Rob,

Thanks for reporting your problem with option 43. I see your issue with
the way that we currently handle this option. I do agree that it needs a
fix on our end to allow specifying values without sub options. I created
Kea ticket to address this problem:

http://kea.isc.org/ticket/5073

I don't have any noninvasive solution for you right now. But I have a
simple code change that could do what you want, in case you're ok with
locally patching Kea. Here is a diff.

diff --git a/src/lib/dhcp/std_option_defs.h b/src/lib/dhcp/std_option_defs.h
index cc0e2fc..eea2ab1 100644
--- a/src/lib/dhcp/std_option_defs.h
+++ b/src/lib/dhcp/std_option_defs.h
@@ -125,7 +125,7 @@ const OptionDefParams
STANDARD_V4_OPTION_DEFINITIONS[] = {
     { "nis-servers", DHO_NIS_SERVERS, OPT_IPV4_ADDRESS_TYPE, true,
NO_RECORD_DEF, "" },
     { "ntp-servers", DHO_NTP_SERVERS, OPT_IPV4_ADDRESS_TYPE, true,
NO_RECORD_DEF, "" },
     { "vendor-encapsulated-options", DHO_VENDOR_ENCAPSULATED_OPTIONS,
-      OPT_EMPTY_TYPE, false, NO_RECORD_DEF,
"vendor-encapsulated-options-space" },
+      OPT_STRING_TYPE, false, NO_RECORD_DEF,
"vendor-encapsulated-options-space" },
     { "netbios-name-servers", DHO_NETBIOS_NAME_SERVERS,
       OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
     { "netbios-dd-server", DHO_NETBIOS_DD_SERVER,


Your new configuration will look like this:

    "option-data": [
        {
            "name": "vendor-encapsulated-options",
            "data":
"id:ipphone.mitel.com;sw_tftp=10.200.107.32;call_srv=10.200.107.32"

        }
   ],

Note, that I also removed option-def section.

Let me know if that works for you.

Marcin Siodelski
ISC




More information about the Kea-users mailing list