]> git.puffer.fish Git - mirror/frr.git/commitdiff
From Sowmini fix for crash reported in [quagga-dev 929].
authorhasso <hasso>
Thu, 18 Mar 2004 02:40:55 +0000 (02:40 +0000)
committerhasso <hasso>
Thu, 18 Mar 2004 02:40:55 +0000 (02:40 +0000)
ripd/ChangeLog
ripd/ripd.c

index 5820f424a3bf85cb1705d8a03e54d41b415010d8..0d7b5bcdd78c7fd05a348b347afe020da363d001 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-18 sowmini.varadhan@sun.com
+
+       * ripd.c: rip_send_packet can get null connected address when
+         called in response to a unicast rip-request. Handle correctly.
+
 2004-03-03 Krzysztof Oledzki <oleq@ans.pl>
 
        * ripd.c: fix "show ip rip" and per interface rip version selection.
index a69963be1ab8da135edfd3344fbd8213e4bfab30..22777e504eeed43bfc40a0f0e28f40438d78c7e1 100644 (file)
@@ -1253,9 +1253,10 @@ rip_send_packet (caddr_t buf, int size, struct sockaddr_in *to,
           strcpy(dst, inet_ntoa(sin.sin_addr));
         }
       zlog_info("rip_send_packet %s > %s (%s)",
-                inet_ntoa(connected->address->u.prefix4), dst, ifp->name);
+                (connected ? inet_ntoa(connected->address->u.prefix4) : ""),
+                dst, ifp->name);
     }
-  if (connected->flags & ZEBRA_IFA_SECONDARY)
+  if (connected && connected->flags & ZEBRA_IFA_SECONDARY)
     {
       /*
        * ZEBRA_IFA_SECONDARY is set on linux when an interface is configured