Adding Recursion Available bit to name_query and node_status_query

Richard Sharpe rsharpe at ns.aus.com
Tue May 14 08:56:01 GMT 2002


On Tue, 14 May 2002, Christopher R. Hertel wrote:

> RFC 1002: 4.2.1.1: 
>         RA    3   Recursion Available Flag.
>                   Only valid in responses from a NetBIOS Name
>                   Server -- must be zero in all other
>                   responses.
> 
> ..so Microsoft are getting it wrong.  Not surprising, I suppose.  The
> RFCs are contradictory at times.  In this case, 1002:4.2.15 says:
> 
>         An end node responding to a NAME QUERY REQUEST always responds
>         with the AA and RA bits set for both the NEGATIVE and POSITIVE
>         NAME QUERY RESPONSE packets.
> 
> Which is obviously a contradiction.  Dang them.  I personally think that
> the first should be the correct behavior as "Recursion Available" should
> mean that the ability to go beyond the local name table, and talk to the
> NBNS database, is available.

I was printing out the value of both bits. Here is the kludge I used:

        fprintf(stderr, "Flags: %s %s %s %s\n",
                        ((flags & NM_FLAGS_RA) ? "Recursion_Available" : 
""),
                        ((flags & NM_FLAGS_AA) ? "Authoritative" : ""),
                        ((flags & NM_FLAGS_B)  ? "Broadcast" : ""),
                        ((flags & NM_FLAGS_RD) ? "Recursion_Desired" : 
""));

Of couse, I might have the test wrong in namequery.c. I should check with 
a sniffer.

Regards
-----
Richard Sharpe, rsharpe at ns.aus.com, rsharpe at samba.org, 
sharpe at ethereal.com





More information about the samba-technical mailing list