[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: netscape & unknown protocol error 0x02



Phil Peterson wrote:
> 
> Hi all, I work on Communicator's LDAP support. To answer Mark's points:
> 
> Mark Smith wrote:
> >
> > ...
> > Error 2 is "protocol error."  I suspect that Netscape
> > Communicator/Navigator is trying to use LDAPv3 and not falling back to
> > LDAPv2 correctly.  But I am not sure since I don't work on Communicator.
> 
> Is there something special Communicator has to do to fall back to
> LDAPv2? I thought that was handled in the LDAP SDK?

In the Netscape/Mozilla SDK implementation, if automated referral
chasing is enabled (which is the default; also settable with
ldap_set_option( ..., LDAP_OPT_REFERRALS, LDAP_OPT_ON | LDAP_OPT_OFF),
then the SDK will automatically fallback to LDAPv2 if it receives a
protocolError when it tries to bind to a v2 server using v3.  When
establishing the initial connection, the client code needs to do the
fallback though.


> ...
> I am aware of LDAPv3 referral bugs in the version of the LDAP SDK that
> Communicator uses. Mark's probably aware of those too :-)  The new
> mozilla/Netscape 5.0 version will use the latest LDAP SDK which is
> available to mozilla.

I don't think any of the bug fixes change what version of LDAP is used
though....

> ...
> We don't have any LDAPv2 vs. LDAPv3 prefs, and I wasn't aware that we
> needed any. Do you think we do?

I'd say no as long as your code falls back to LDAPv2 if the initial bind
request fails.  If you don't issue a bind at all (as it is optional with
LDAPv3), then you need to check for protocolError on the first operation
you do and fall back to LDAPv2 (which means issuing a bind and trying
your request again).

-- 
Mark Smith
Directory Architect / Sun-Netscape Alliance
My words are my own, not my employer's.  Got LDAP?