From Sowmini fix for crash reported in [quagga-dev 929].
diff --git a/ripd/ripd.c b/ripd/ripd.c
index a69963b..22777e5 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -1253,9 +1253,10 @@
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