diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index c707562..df87b11 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -1,3 +1,15 @@
+2005-01-10  Greg Troxel  <gdt@fnord.ir.bbn.com>
+
+	* ospf_packet.h: Remove commented out definition of
+	OSPF_MAX_PACKET; neither it or the uncommented one are used any more.
+
+	* ospf_packet.c (ospf_make_ls_upd): Leave room for authentication
+	when deciding if an update will fit.
+	(ospf_packet_authspace): Factor out calculation of size required
+	for authentication.
+	(ospf_make_db_desc): Use ospf_max_packet, not OSPF_MAX_PACKET.
+	Don't confuse readers that there is a macro.
+
 2004-12-30 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
 
 	* ospf_network.c: Improve all setsockopt error messages to give detailed
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index 6eb6651..f636e2b 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -241,16 +241,25 @@
   return new;
 }
 
+/* XXX inline */
+unsigned int
+ospf_packet_authspace (struct ospf_interface *oi)
+{
+  int auth = 0;
+
+  if ( ospf_auth_type (oi) == OSPF_AUTH_CRYPTOGRAPHIC)
+    auth = OSPF_AUTH_MD5_SIZE;
+
+  return auth;
+}
+
 unsigned int
 ospf_packet_max (struct ospf_interface *oi)
 {
   int max;
 
-  if ( ospf_auth_type (oi) == OSPF_AUTH_CRYPTOGRAPHIC)
-    max = oi->ifp->mtu - OSPF_AUTH_MD5_SIZE;
-  else
-    max = oi->ifp->mtu;
-  
+  max = oi->ifp->mtu - ospf_packet_authspace(oi);
+
   max -= (OSPF_HEADER_SIZE + sizeof (struct ip));
 
   return max;
@@ -1410,8 +1419,8 @@
 	  return;
 	}
 
-      /* Packet overflows MTU size, send immediatly. */
-      if (length + ntohs (find->data->length) > OSPF_PACKET_MAX (oi))
+      /* Packet overflows MTU size, send immediately. */
+      if (length + ntohs (find->data->length) > ospf_packet_max (oi))
 	{
 	  if (oi->type == OSPF_IFTYPE_NBMA)
 	    ospf_ls_upd_send (nbr, ls_upd, OSPF_SEND_PACKET_DIRECT);
@@ -2735,7 +2744,7 @@
 		u_int16_t ls_age;
 		
 		/* DD packet overflows interface MTU. */
-		if (length + OSPF_LSA_HEADER_SIZE > OSPF_PACKET_MAX (oi))
+		if (length + OSPF_LSA_HEADER_SIZE > ospf_packet_max (oi))
 		  break;
 		
 		/* Keep pointer to LS age. */
@@ -2770,7 +2779,7 @@
   oi = nbr->oi;
 
   /* LS Request packet overflows interface MTU. */
-  if (*length + delta > OSPF_PACKET_MAX(oi))
+  if (*length + delta > ospf_packet_max(oi))
     return 0;
 
   stream_putl (s, lsa->data->type);
@@ -2827,6 +2836,7 @@
   struct ospf_lsa *lsa;
   struct listnode *node;
   u_int16_t length = OSPF_LS_UPD_MIN_SIZE;
+  unsigned int size_noauth;
   unsigned long delta = stream_get_putp (s);
   unsigned long pp;
   int count = 0;
@@ -2837,6 +2847,9 @@
   pp = stream_get_putp (s);
   ospf_output_forward (s, OSPF_LS_UPD_MIN_SIZE);
 
+  /* Calculate amount of packet usable for data. */
+  size_noauth = stream_get_size(s) - ospf_packet_authspace(oi);
+
   while ((node = listhead (update)) != NULL)
     {
       struct lsa_header *lsah;
@@ -2850,7 +2863,7 @@
       assert (lsa->data);
 
       /* Will it fit? */
-      if (length + delta + ntohs (lsa->data->length) > stream_get_size (s))
+      if (length + delta + ntohs (lsa->data->length) > size_noauth)
         break;
 
       /* Keep pointer to LS age. */
@@ -2899,7 +2912,7 @@
       lsa = getdata (node);
       assert (lsa);
       
-      if (length + delta > OSPF_PACKET_MAX (oi))
+      if (length + delta > ospf_packet_max (oi))
 	break;
       
       stream_put (s, lsa->data, OSPF_LSA_HEADER_SIZE);
@@ -3264,6 +3277,7 @@
   else
     size = oi->ifp->mtu;
 
+  /* XXX Should this be - sizeof(struct ip)?? -gdt */
   if (size > OSPF_MAX_PACKET_SIZE)
     {
       zlog_warn ("ospf_ls_upd_packet_new: oversized LSA id:%s too big,"
diff --git a/ospfd/ospf_packet.h b/ospfd/ospf_packet.h
index 8de0bfb..af9e634 100644
--- a/ospfd/ospf_packet.h
+++ b/ospfd/ospf_packet.h
@@ -119,10 +119,8 @@
 
 
 /* Macros. */
+/* XXX Perhaps obsolete; function in ospf_packet.c */
 #define OSPF_PACKET_MAX(oi)     ospf_packet_max (oi)
-/*
-#define OSPF_PACKET_MAX(oi)     (((oi)->ifp->mtu - ((oi)->auth_md5 ? OSPF_AUTH_MD5_SIZE : 0)) - 88)
-*/
 
 #define OSPF_OUTPUT_PNT(S)      ((S)->data + (S)->putp)
 #define OSPF_OUTPUT_LENGTH(S)   ((S)->endp)
