|Date:||Wed, 10 Oct 2018 17:16:43 +0200|
|From:||"Xavier G." <email@example.com>|
|Subject:||Implement the generate() operator.|
Hello, Attached is a patch that implement the generate() operator as part of dhcp-eval. generate() is similar to execute() in that it executes an external program. However, unlike execute(), generate() is a data expression: it reads up to 1024 bytes from the standard output of the resulting child process and makes them available as a C string. It can therefore be combined with substring(), concat() and other similar operators for maximum flexibility. Similarly to execute(), generate() can be disabled through ./configure --disable-generate. generate() typically enables users to generate complex DHCP options that would otherwise require the implementation of many more operators. For instance, we recently stumbled upon an ISP which expects a particular value for options 90 or 11 (authentication). This value is computed using a proprietary, ISP-specific algorithm (it involves random salts, MD5 hashing and a password... far from rocket science, but definitely ISP-specific) and should be renewed systematically or at least frequently. Moreover, this algorithm is likely to change often enough to discourage its implementation in C within dhclient/dhcpd. generate() enables users to delegate tricky value generations to external programs which can be implemented using more high-level languages and can be updated frequently. Note: the attached patch modifies configure.ac and config h.in but the configure script itself needs to be regenerated. Let me know whether this feature is welcome within isc-dhcp and if anything ought to be improved in the attached patch. Thanks in advance. -- Xavier G.
Message body is not shown because sender requested not to inline it.
Message body not shown because it is not plain text.