[5509] in Athena Bugs

home help back first fref pref prev next nref lref last post

[Mark Rosenstein: netconfig: verify.c]

daemon@ATHENA.MIT.EDU (Richard Basch)
Wed Jul 11 17:05:53 1990

Date: Wed, 11 Jul 90 17:05:35 -0400
To: bugs@ATHENA.MIT.EDU
From: Richard Basch <probe@MIT.EDU>


Being installed (from Dynamic Host Conf project)...

Author: mar
Auditor: probe

This addresses the bugs about spurious "Address already in use" messages
appearing.  In addition, it prints the ethernet address of the machines
using a given address, if it really is in use.

References:
	changes.71	942
	changes.71	833

-Richard

------- Forwarded Message

Date: Wed, 11 Jul 90 13:29:55 -0400
From: Mark Rosenstein <mar@MIT.EDU>
Sender: mar@MIT.EDU
To: probe@MIT.EDU
Subject: netconfig: verify.c

*** /tmp/,RCSt1019322	Wed Jul 11 13:28:42 1990
--- verify.c	Wed Jul 11 13:00:29 1990
***************
*** 136,151 ****
  	    }
  
  	    if ((nh->nh_datalen < sizeof(*eh) + sizeof(*ea)) ||
  		(ea->arp_hrd != htons(ARPHRD_ETHER)) ||
  		(ea->arp_pro != htons(ETHERTYPE_IP)) ||
  		(ea->arp_hln != sizeof(struct ether_addr)) ||
  		(ea->arp_pln != sizeof(struct in_addr)) ||
  		(ea->arp_op != htons(ARPOP_REPLY)) ||
! 		(ntohl(_getlong(&(ea->arp_spa[0]))) != ni->ni_recommend))
  	      continue;
  
! 	    if (debug)
! 	      printf("address is in use\n");
  	    return(FAIL);
  	}
      }
--- 136,156 ----
  	    }
  
  	    if ((nh->nh_datalen < sizeof(*eh) + sizeof(*ea)) ||
+ 		(eh->ether_type != ETHERTYPE_ARP) ||
  		(ea->arp_hrd != htons(ARPHRD_ETHER)) ||
  		(ea->arp_pro != htons(ETHERTYPE_IP)) ||
  		(ea->arp_hln != sizeof(struct ether_addr)) ||
  		(ea->arp_pln != sizeof(struct in_addr)) ||
  		(ea->arp_op != htons(ARPOP_REPLY)) ||
! 		(ntohl(_getlong(&(ea->arp_spa[0]))) != ni->ni_recommend) ||
! 		(bcmp(ea->arp_sha, pa, sizeof(struct ether_addr)) == 0))
  	      continue;
  
! 	    fprintf(stderr, "Address %d.%d.%d.%d is in use by %02x-%02x-%02x-%02x-%02x-%02x.\n",
! 		    ea->arp_spa[0], ea->arp_spa[1], ea->arp_spa[2],
! 		    ea->arp_spa[3], ea->arp_sha[0], ea->arp_sha[1],
! 		    ea->arp_sha[2], ea->arp_sha[3], ea->arp_sha[4],
! 		    ea->arp_sha[5]);
  	    return(FAIL);
  	}
      }

------- End Forwarded Message

home help back first fref pref prev next nref lref last post