]> git.puffer.fish Git - mirror/frr.git/commitdiff
ripd: fix packet sending
authorlyq140 <34637052+lyq140@users.noreply.github.com>
Mon, 6 Aug 2018 02:46:58 +0000 (10:46 +0800)
committerlyq140 <34637052+lyq140@users.noreply.github.com>
Mon, 6 Aug 2018 02:46:58 +0000 (10:46 +0800)
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>
ripd/ripd.c

index f7d6d3d9297d64710ee59e2a5d0f798a8db5c81f..dea3e40ae3a9a827a5c4696dabfdcc6156672494 100644 (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) {