summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlyq140 <34637052+lyq140@users.noreply.github.com>2018-08-06 14:14:00 +0800
committerlyq140 <34637052+lyq140@users.noreply.github.com>2018-08-06 14:14:00 +0800
commit558c6842f76897c2a7e48e5c00cfae6da4c04118 (patch)
treed167ee012faef7abda91f831e4190b6fadc09baa
parentac000da998362c07be0e045b92a38f439444603a (diff)
ripd: fix packet sending in authenticate mode
fix a bug when sending packets. in authenticate mode but without any string, no packet should send. Signed-off-by: lyq140 <34637052+lyq140@users.noreply.github.com>
-rw-r--r--ripd/ripd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ripd/ripd.c b/ripd/ripd.c
index dea3e40ae3..8032cf2ec5 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -2101,9 +2101,8 @@ 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 (strlen(auth_str) == 0)
+ return;
}
if (version == RIPv1) {