directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Seelmann <m...@stefan-seelmann.de>
Subject Re: DHCP using Apache directory server
Date Wed, 20 Jan 2016 22:16:55 GMT
On 01/19/2016 02:46 PM, Sherman Lilly wrote:
> I have got my schemas installed and working and the directory server is
> working properly. I am trying to add a value to "dhcpOption" and it will
> only accept a binary value. I figured out the value has to be utf8 encoded
> value. How do I use Directory Studio to insert this value? Let say the
> string is "broadcast 192.168.255.255". Not really sure how to convert that
> to utf8 encoded binary and insert it into "dhcpOption" thorugh Directory
> Studio.
> 
> Any help is appreciated.

First I have to tell you that the DHCP (and also DNS) servers are not
maintained since years, I not even can find any server-side integration
test that tests the functionality. So very likely those won't work at
all or include major bugs. Help to test, fix, and document is however
appreciated :)

I just tried to add a "dhcpOption" value with Studio. As this attribute
is of syntax octet string the Hex Editor opens. I then choosed the "Edit
as Text" option. The resulting binary is a proper UTF-8 encoded value.
But when saving that there is an error on server side, I think that is a
bug in the LDAP API.

dhcpOption: 0x62 0x72 0x6F 0x61 0x64 0x63 0x61 0x73 0x74 0x20 0x31 0x39
0x32 0x2E 0x31 0x36
...org.apache.directory.api.ldap.model.message.ModifyRequestImpl@e292c46e:
java.lang.String cannot be cast to [B:
java.lang.ClassCastException: java.lang.String cannot be cast to [B
	at
org.apache.directory.api.ldap.model.entry.BinaryValue.hashCode(BinaryValue.java:212)
	at
org.apache.directory.api.ldap.model.entry.AbstractValue.apply(AbstractValue.java:231)
	at
org.apache.directory.api.ldap.model.entry.BinaryValue.<init>(BinaryValue.java:111)
	at
org.apache.directory.api.ldap.model.entry.DefaultAttribute.<init>(DefaultAttribute.java:497)



Mime
View raw message