From: Jeremy Allison Date: Fri, 11 Dec 1998 02:34:00 +0000 (+0000) Subject: Added fixes from Jasper van der Neut X-Git-Tag: samba-2.0.0beta4~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bde32681fd9ac7cad9a55fcc7dc4e0073b220447;p=thirdparty%2Fsamba.git Added fixes from Jasper van der Neut who is doing some pretty amazine nmbd work ! Jeremy. --- diff --git a/source/nmbd/nmbd_mynames.c b/source/nmbd/nmbd_mynames.c index 64cb8ea9e93..10f06b4326e 100644 --- a/source/nmbd/nmbd_mynames.c +++ b/source/nmbd/nmbd_mynames.c @@ -180,6 +180,10 @@ void refresh_my_names(time_t t) { struct name_record *namerec; + /* B nodes don't send out name refresh requests, see RFC 1001, 15.5.1 */ + if (subrec != unicast_subnet) + continue; + for( namerec = (struct name_record *)ubi_trFirst( subrec->namelist ); namerec; namerec = (struct name_record *)ubi_trNext( namerec ) ) diff --git a/source/nmbd/nmbd_packets.c b/source/nmbd/nmbd_packets.c index 92e2fb3590b..89a08682d8c 100644 --- a/source/nmbd/nmbd_packets.c +++ b/source/nmbd/nmbd_packets.c @@ -245,7 +245,11 @@ static BOOL create_and_init_additional_record(struct packet_struct *packet, nmb->additional->rr_type = RR_TYPE_NB; nmb->additional->rr_class = RR_CLASS_IN; - nmb->additional->ttl = lp_max_ttl(); + /* See RFC 1002, sections 5.1.1.1, 5.1.1.2 and 5.1.1.3 */ + if (nmb->header.nm_flags.bcast) + nmb->additional->ttl = PERMANENT_TTL; + else + nmb->additional->ttl = lp_max_ttl(); nmb->additional->rdlength = 6;