Re: [Kea-users] Option 121, multiple routes

2017-08-06 Thread Francis Dupont
Nepryakhin Ivan writes:
> Hello, please tell me how to send in the field option 121 several 
> routes, at this time the configuration
> 
> "Option-def": [
>{
> 
> "Name": "rfc3442-classless-static-routes",
> "Code": 121,
> "Space": "dhcp4",
> "Type": "record",
> "Array": false,
> "Record-types": "uint8, uint8, uint8, ipv4-address"
>   }
> ]

=> this definition is fine but as you found it can handle only one route
with a subnet which encodes into 3 bytes...
Unfortunately there is only one correct definition: say the layout
is binary (BTW it is the default for unknown options) and encode the
value manually...

Regards

Francis Dupont 

PS: there is a pending ticket to extend option definitions to array and
record but it is for making the last field of the record an array.
 An alternative would be to accept arrays of records but there is no
interesting examples in standard options and in your case it doesn't
help because of the very specific encoding of subnets.
 Note binary definition always works and it is possible too to write
a dedicated code and to call it with a hook.
___
Kea-users mailing list
Kea-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users


[Kea-users] Option 121, multiple routes

2017-08-05 Thread Nepryakhin Ivan
Hello, please tell me how to send in the field option 121 several 
routes, at this time the configuration


"Option-def": [
  {

   "Name": "rfc3442-classless-static-routes",
   "Code": 121,
   "Space": "dhcp4",
   "Type": "record",
   "Array": false,
   "Record-types": "uint8, uint8, uint8, ipv4-address"
 }
]

.

   {
   "Name": "rfc3442-classless-static-routes",
   "Code": 121,
   "Space": "dhcp4",
   "Csv-format": true,
   "Data": "9,10,0, 172.25.16.1"
}

But so they tend to transmit only one route, the second is obtained only 
if I change
 "Record-types": "uint8, uint8, uint8, ipv4-addres, uint8, uint8, 
uint8, ipv4-addres, etc"


If more correct way?

--


Best regards,
Nepryakhin Ivan
System administrator





___
Kea-users mailing list
Kea-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users