]> git.puffer.fish Git - mirror/frr.git/commitdiff
ripd: fix packet sending in authenticate mode 2790/head
authorlyq140 <34637052+lyq140@users.noreply.github.com>
Mon, 6 Aug 2018 06:14:00 +0000 (14:14 +0800)
committerlyq140 <34637052+lyq140@users.noreply.github.com>
Mon, 6 Aug 2018 06:14:00 +0000 (14:14 +0800)
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>
ripd/ripd.c

index dea3e40ae3a9a827a5c4696dabfdcc6156672494..8032cf2ec50c1f6e612dbab581afc0684f1ce2d2 100644 (file)
@@ -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) {