]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Added fixes from Jasper van der Neut <jasper@Cal005208.student.utwente.nl>
authorJeremy Allison <jra@samba.org>
Fri, 11 Dec 1998 02:34:00 +0000 (02:34 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 11 Dec 1998 02:34:00 +0000 (02:34 +0000)
who is doing some pretty amazine nmbd work !
Jeremy.

source/nmbd/nmbd_mynames.c
source/nmbd/nmbd_packets.c

index 64cb8ea9e93182d1db1802f244dc9c3f62df98a9..10f06b4326e6322a9032f0f017f2cfaf2e77ff03 100644 (file)
@@ -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 ) )
index 92e2fb3590b306614669e558e67f85664fef913d..89a08682d8c92e2ed2b7da989c875dc56db625a4 100644 (file)
@@ -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;