ripd: fix packet sending

fix a bug when sending a rip packet.
in authenticate mode but without any string,
no packet should send.

Signed-off-by: lyq140 <34637052+lyq140@users.noreply.github.com>
This commit is contained in:
lyq140 2018-08-06 10:46:58 +08:00
parent 46a9c3af89
commit ac000da998

View File

@ -2101,6 +2101,9 @@ void rip_output_process(struct connected *ifc, struct sockaddr_in *to,
/* to be passed to auth functions later */
rip_auth_prepare_str_send(ri, key, auth_str,
RIP_AUTH_SIMPLE_SIZE);
if (0 == strlen(auth_str)) {
return;
}
}
if (version == RIPv1) {