diff options
Diffstat (limited to 'ripd/ripd.c')
| -rw-r--r-- | ripd/ripd.c | 13 | 
1 files changed, 8 insertions, 5 deletions
diff --git a/ripd/ripd.c b/ripd/ripd.c index a1630f6c..afa49fd6 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -2449,19 +2449,22 @@ rip_update_interface (struct connected *ifc, u_char version, int route_type)            /* Destination address and port setting. */            memset (&to, 0, sizeof (struct sockaddr_in));            if (ifc->destination) -            /* use specified broadcast or point-to-point destination addr */ +            /* use specified broadcast or peer destination addr */              to.sin_addr = ifc->destination->u.prefix4; -          else +          else if (ifc->address->prefixlen < IPV4_MAX_PREFIXLEN)              /* calculate the appropriate broadcast address */              to.sin_addr.s_addr =                ipv4_broadcast_addr(ifc->address->u.prefix4.s_addr,                                    ifc->address->prefixlen); +	  else +	    /* do not know where to send the packet */ +	    return;            to.sin_port = htons (RIP_PORT_DEFAULT);            if (IS_RIP_DEBUG_EVENT) -            zlog_debug ("%s announce to %s on %s", -                       if_is_pointopoint (ifc->ifp) ? "unicast" : "broadcast", -                       inet_ntoa (to.sin_addr), ifc->ifp->name); +            zlog_debug("%s announce to %s on %s", +		       CONNECTED_PEER(ifc) ? "unicast" : "broadcast", +		       inet_ntoa (to.sin_addr), ifc->ifp->name);            rip_output_process (ifc, &to, route_type, version);          }  | 
