In IPv4 Im trying to use the circuit ID as the identifier to restrict IPv4 
leases to one IP address at bridged clients. 

However, some clients have phone service and we put a GrandStream ATA as a 
bridge after their ONU but before the router. 
The ATA does pull from its own shared pool for IP leases, but it grabs that 
circuit ID and stores it in the lease table, not allowing anything else past it 
to obtain an IP address

Im trying to do an if statement in the “identifier-expression” under the 
flex_id hook to swap it out. 

This is what I have.. Im sure it's a syntax issue or something along those 
lines. But Im hoping that it's possible to do something like this:

    {
    "library": "/usr/local/lib/kea/hooks/libdhcp_flex_id.so",
        "parameters": { 
    //  "identifier-expression": "relay4[1].hex",
        "identifier-expression": "if (substring(option[60].hex,0,18) == 'HT8XX 
dslforum.org' or substring(option[60].hex,0,18) == 'HT802 dslforum.org' or 
substring(option[60].hex,0,18) == 'HT812 dslforum.org') {option[60].hex,0,18} 
else {relay4[1].hex}",
        "replace-client-id": true
        }
    },

Any help would be great

Thanks! 

- Allan
_______________________________________________
ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.

To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.

Kea-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/kea-users

Reply via email to