diff --git a/ripd/ChangeLog b/ripd/ChangeLog
index 4bdc8de..b39faa9 100644
--- a/ripd/ChangeLog
+++ b/ripd/ChangeLog
@@ -1,3 +1,20 @@
+2005-08-16 Paul Jakma <paul.jakma@sun.com>
+
+	* ripd.c: (general) Fix previous commit, broke multicast bind and
+	  hence setting of source port, which broke communication with
+	  non-borken ripd. Fix removes more stuff from rip_interface.c
+	  than it adds to ripd.c ;)
+	  (rip_create_socket) the to argument really is a from argument,
+	  rename it. Set the source port to RIP port unconditionally, it's
+	  required.
+	  (rip_send_packet) Set from address correctly for multicast.
+	  (rip_output_process) trivial: num can be BSS specified, rather
+	  than in body.
+	* rip_interface.c: (rip_interface_multicast_set) strip out
+	  redundant stuff related to bind, which rip_create_socket does.
+	  Just make it set the multicast socket option, as per the
+	  interface concerned, no more.
+
 2005-06-03 Paul Jakma <paul.jakma@sun.com>
 
 	* ripd.c: (rip_create_socket) move it up so rip_send_packet
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c
index 4a6f78e..5fa4b7d 100644
--- a/ripd/rip_interface.c
+++ b/ripd/rip_interface.c
@@ -139,9 +139,6 @@
 void
 rip_interface_multicast_set (int sock, struct connected *connected)
 {
-  int ret;
-  struct servent *sp;
-  struct sockaddr_in from;
   struct in_addr addr;
   struct prefix_ipv4 *p;
   
@@ -161,43 +158,8 @@
 		 "source address %s for interface %s",
 		 sock, inet_ntoa(addr),
 		 connected->ifp->name);
-      return;
     }
-
-  /* Bind myself. */
-  memset (&from, 0, sizeof (struct sockaddr_in));
-
-  /* Set RIP port. */
-  sp = getservbyname ("router", "udp");
-  if (sp) 
-    from.sin_port = sp->s_port;
-  else 
-    from.sin_port = htons (RIP_PORT_DEFAULT);
-
-  /* Address should be any address. */
-  from.sin_family = AF_INET;
-  from.sin_addr = connected->address->u.prefix4;
-#ifdef HAVE_SIN_LEN
-  from.sin_len = sizeof (struct sockaddr_in);
-#endif /* HAVE_SIN_LEN */
-
-  if (ripd_privs.change (ZPRIVS_RAISE))
-    zlog_err ("rip_interface_multicast_set: could not raise privs");
-      
-  ret = bind (sock, (struct sockaddr *) & from, sizeof (struct sockaddr_in));
-  if (ret < 0)
-    {
-      zlog_warn ("Can't bind socket fd %d to %s port %d for "
-		 "interface %s: %s",
-	      	 sock,inet_ntoa(from.sin_addr),
-		 (int)ntohs(from.sin_port),
-		 connected->ifp->name,
-		  safe_strerror (errno));
-    }
-
-  if (ripd_privs.change (ZPRIVS_LOWER))
-    zlog_err ("rip_interface_multicast_set: could not lower privs");
-
+  
   return;
 }
 
diff --git a/ripd/ripd.c b/ripd/ripd.c
index fdb2644..d21485e 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -1321,21 +1321,26 @@
 
 /* Make socket for RIP protocol. */
 static int 
-rip_create_socket (struct sockaddr_in *to)
+rip_create_socket (struct sockaddr_in *from)
 {
   int ret;
   int sock;
   struct sockaddr_in addr;
   
-  if (!to)
+  memset (&addr, 0, sizeof (struct sockaddr_in));
+  
+  if (!from)
     {
-      memset (&addr, 0, sizeof (struct sockaddr_in));
-      addr.sin_family = AF_INET;
-      addr.sin_port = htons (RIP_PORT_DEFAULT);
       addr.sin_family = AF_INET;
       addr.sin_addr.s_addr = INADDR_ANY;
+#ifdef HAVE_SINLEN
+      addr.sin_len = sizeof (struct sockaddr_in);
+#endif /* HAVE_SINLEN */
     }
   
+  /* sending port must always be the RIP port */
+  addr.sin_port = htons (RIP_PORT_DEFAULT);
+  
   /* Make datagram socket. */
   sock = socket (AF_INET, SOCK_DGRAM, 0);
   if (sock < 0) 
@@ -1360,8 +1365,12 @@
       int save_errno = errno;
       if (ripd_privs.change (ZPRIVS_LOWER))
         zlog_err ("rip_create_socket: could not lower privs");
-      zlog_err("cannot bind to port %d: %s",
-	       (int)ntohs(addr.sin_port), safe_strerror(save_errno));
+      
+      zlog_err("%s: Can't bind socket %d to %s port %d: %s", __func__,
+	       sock, inet_ntoa(addr.sin_addr), 
+	       (int) ntohs(addr.sin_port), 
+	       safe_strerror(save_errno));
+      
       close (sock);
       return ret;
     }
@@ -1440,16 +1449,25 @@
     }
   else
     {
-
+      struct sockaddr_in from;
+      
       sin.sin_port = htons (RIP_PORT_DEFAULT);
       sin.sin_addr.s_addr = htonl (INADDR_RIP_GROUP);
-
+      
+      /* multicast send should bind to local interface address */
+      from.sin_family = AF_INET;
+      from.sin_port = htons (RIP_PORT_DEFAULT);
+      from.sin_addr = ifc->address->u.prefix4;
+#ifdef HAVE_SIN_LEN
+      from.sin_len = sizeof (struct sockaddr_in);
+#endif /* HAVE_SIN_LEN */
+      
       /*
        * we have to open a new socket for each packet because this
        * is the most portable way to bind to a different source
        * ipv4 address for each packet. 
        */
-      if ( (send_sock = rip_create_socket (&sin)) < 0)
+      if ( (send_sock = rip_create_socket (&from)) < 0)
         {
           zlog_warn("rip_send_packet could not create socket.");
           return -1;
@@ -2105,7 +2123,7 @@
      with larger key string sizes */
   char auth_str[RIP_AUTH_SIMPLE_SIZE];
   size_t doff; /* offset of digest offset field */
-  int num;
+  int num = 0;
   int rtemax;
   int subnetted = 0;
 
@@ -2124,7 +2142,6 @@
 
   /* Reset stream and RTE counter. */
   stream_reset (s);
-  num = 0;
   rtemax = (RIP_PACKET_MAXSIZ - 4) / 20;
 
   /* Get RIP interface. */
