From da9c9a24d09071c77843ce39f0470ba487c300bf Mon Sep 17 00:00:00 2001 From: hasso Date: Thu, 18 Mar 2004 02:40:55 +0000 Subject: From Sowmini fix for crash reported in [quagga-dev 929]. --- ripd/ChangeLog | 5 +++++ ripd/ripd.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'ripd') diff --git a/ripd/ChangeLog b/ripd/ChangeLog index 5820f424..0d7b5bcd 100644 --- a/ripd/ChangeLog +++ b/ripd/ChangeLog @@ -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 * ripd.c: fix "show ip rip" and per interface rip version selection. diff --git a/ripd/ripd.c b/ripd/ripd.c index a69963be..22777e50 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -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 -- cgit v1.2.1