diff options
author | Samba Release Account <samba-bugs@samba.org> | 1997-05-30 23:15:17 +0000 |
---|---|---|
committer | Samba Release Account <samba-bugs@samba.org> | 1997-05-30 23:15:17 +0000 |
commit | 5c4776f496d814b0ab5b75b5d029dc0998236365 (patch) | |
tree | 617f524b6d3c3ec886efa917432b363178af7e2c /source3/namedbname.c | |
parent | 3ab97ebe6db1a5a4a0573c7c8482c94876bbce9a (diff) | |
download | samba-5c4776f496d814b0ab5b75b5d029dc0998236365.tar.gz samba-5c4776f496d814b0ab5b75b5d029dc0998236365.tar.xz samba-5c4776f496d814b0ab5b75b5d029dc0998236365.zip |
namedbname.c: Added 'S' or 'R' flags to wins.dat to aid debugging. Forced all type 1e
names to be added as 255.255.255.255.
namedbsubnet.c: Fixed bug I intruduced - register 1e name on WINS subnet also.
(thanks to Luke for pointing this one out).
Jeremy (jallison@whistle.com)
(This used to be commit fbeaf146c0903f0939d1128af01cff8ea18a2546)
Diffstat (limited to 'source3/namedbname.c')
-rw-r--r-- | source3/namedbname.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/source3/namedbname.c b/source3/namedbname.c index 5eb03bc637..7d91b6e045 100644 --- a/source3/namedbname.c +++ b/source3/namedbname.c @@ -249,7 +249,7 @@ void dump_names(void) } DEBUG(4,("\n")); - if (f && n->source == REGISTER) + if (f && ((n->source == REGISTER) || (n->source == SELF))) { /* XXXX i have little imagination as to how to output nb_flags as anything other than as a hexadecimal number :-) */ @@ -260,11 +260,11 @@ void dump_names(void) for (i = 0; i < n->num_ips; i++) { - fprintf(f, "%s %2x ", - inet_ntoa(n->ip_flgs[i].ip), - n->ip_flgs[i].nb_flags); + fprintf(f, "%s %2x%c ", + inet_ntoa(n->ip_flgs[i].ip), + n->ip_flgs[i].nb_flags, (n->source == REGISTER ? 'R' : 'S')); } - fprintf(f, "\n"); + fprintf(f, "\n"); } } @@ -341,6 +341,17 @@ void load_netbios_names(void) continue; } + /* Deal with SELF or REGISTER name encoding. Default is REGISTER + for compatibility with old nmbds. */ + if(nb_flags_str[strlen(nb_flags_str)-1] == 'S') + { + DEBUG(5,("Ignoring SELF name %s\n", line)); + continue; + } + + if(nb_flags_str[strlen(nb_flags_str)-1] == 'R') + nb_flags_str[strlen(nb_flags_str)-1] = '\0'; + /* netbios name. # divides the name from the type (hex): netbios#xx */ strcpy(name,name_str); @@ -449,6 +460,12 @@ struct name_record *add_netbios_entry(struct subnet_record *d, } } + if(type == 0x1e) + { + /* Add all 1e names as address 255.255.255.255 */ + ip = *interpret_addr2("255.255.255.255"); + } + n = (struct name_record *)malloc(sizeof(*n)); if (!n) return(NULL); |