summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--isisd/dict.c1
-rw-r--r--isisd/isis_circuit.c4
-rw-r--r--isisd/isis_lsp.c3
-rw-r--r--isisd/isis_pdu.c4
-rw-r--r--isisd/isis_route.c10
-rw-r--r--isisd/isis_te.c17
-rw-r--r--lib/thread.c2
-rw-r--r--ospfd/.gitignore2
-rw-r--r--ospfd/ospf_main.c4
-rw-r--r--redhat/.gitignore2
-rw-r--r--vtysh/vtysh.c2
-rw-r--r--zebra/zserv.c2
12 files changed, 25 insertions, 28 deletions
diff --git a/isisd/dict.c b/isisd/dict.c
index a038028d22..56676edaf1 100644
--- a/isisd/dict.c
+++ b/isisd/dict.c
@@ -649,6 +649,7 @@ dnode_t *dict_delete(dict_t *dict, dnode_t *delete)
if (delete->left != nil && delete->right != nil) {
dnode_t *next = dict_next(dict, delete);
+ assert (next);
dnode_t *nextparent = next->parent;
dnode_color_t nextcolor = next->color;
diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c
index 0ea6c3d453..3a89766b2f 100644
--- a/isisd/isis_circuit.c
+++ b/isisd/isis_circuit.c
@@ -308,12 +308,12 @@ isis_circuit_del_addr (struct isis_circuit *circuit,
else
{
prefix2str (connected->address, buf, sizeof (buf));
- zlog_warn ("Nonexitant ip address %s removal attempt from \
+ zlog_warn ("Nonexistant ip address %s removal attempt from \
circuit %d", buf, circuit->circuit_id);
zlog_warn ("Current ip addresses on %s:", circuit->interface->name);
for (ALL_LIST_ELEMENTS_RO(circuit->ip_addrs, node, ip))
{
- prefix2str((struct prefix*)ip, (char *)buf, BUFSIZ);
+ prefix2str(ip, buf, sizeof(buf));
zlog_warn(" %s", buf);
}
zlog_warn("End of addresses");
diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c
index c13bcc5d8a..a710c00e5f 100644
--- a/isisd/isis_lsp.c
+++ b/isisd/isis_lsp.c
@@ -2484,8 +2484,7 @@ lsp_regenerate_schedule_pseudo (struct isis_circuit *circuit, int level)
int lvl;
struct isis_area *area = circuit->area;
- if (circuit == NULL ||
- circuit->circ_type != CIRCUIT_T_BROADCAST ||
+ if (circuit->circ_type != CIRCUIT_T_BROADCAST ||
circuit->state != C_STATE_UP)
return ISIS_OK;
diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c
index 96e459a797..114c05bec0 100644
--- a/isisd/isis_pdu.c
+++ b/isisd/isis_pdu.c
@@ -2430,7 +2430,7 @@ send_lan_l1_hello (struct thread *thread)
}
if (circuit->u.bc.run_dr_elect[0])
- retval = isis_dr_elect (circuit, 1);
+ isis_dr_elect (circuit, 1);
retval = send_hello (circuit, 1);
@@ -2460,7 +2460,7 @@ send_lan_l2_hello (struct thread *thread)
}
if (circuit->u.bc.run_dr_elect[1])
- retval = isis_dr_elect (circuit, 2);
+ isis_dr_elect (circuit, 2);
retval = send_hello (circuit, 2);
diff --git a/isisd/isis_route.c b/isisd/isis_route.c
index cc3ecba0d3..101d40dba3 100644
--- a/isisd/isis_route.c
+++ b/isisd/isis_route.c
@@ -585,10 +585,14 @@ isis_route_validate_merge (struct isis_area *area, int family)
if (family == AF_INET)
table = area->route_table[0];
-#ifdef HAVE_IPV6
else if (family == AF_INET6)
table = area->route_table6[0];
-#endif
+ else
+ {
+ zlog_warn ("ISIS-Rte (%s) %s called for unknown family %d",
+ area->area_tag, __func__, family);
+ return;
+ }
for (rnode = route_top (table); rnode; rnode = route_next (rnode))
{
@@ -600,10 +604,8 @@ isis_route_validate_merge (struct isis_area *area, int family)
if (family == AF_INET)
table = area->route_table[1];
-#ifdef HAVE_IPV6
else if (family == AF_INET6)
table = area->route_table6[1];
-#endif
for (rnode = route_top (table); rnode; rnode = route_next (rnode))
{
diff --git a/isisd/isis_te.c b/isisd/isis_te.c
index ecbb63c92b..51919bb3f2 100644
--- a/isisd/isis_te.c
+++ b/isisd/isis_te.c
@@ -985,17 +985,15 @@ show_vty_unknown_tlv (struct vty *vty, struct subtlv_header *tlvh)
void
mpls_te_print_detail(struct vty *vty, struct te_is_neigh *te)
{
- struct subtlv_header *tlvh, *next;
+ struct subtlv_header *tlvh;
u_int16_t sum = 0;
zlog_debug ("ISIS MPLS-TE: Show database TE detail");
tlvh = (struct subtlv_header *)te->sub_tlvs;
- for (; sum < te->sub_tlvs_length; tlvh = (next ? next : SUBTLV_HDR_NEXT (tlvh)))
+ for (; sum < te->sub_tlvs_length; tlvh = SUBTLV_HDR_NEXT (tlvh))
{
- next = NULL;
-
switch (tlvh->type)
{
case TE_SUBTLV_ADMIN_GRP:
@@ -1222,13 +1220,10 @@ DEFUN (show_isis_mpls_te_router,
{
vty_out (vty, "--- MPLS-TE router parameters ---%s", VTY_NEWLINE);
- if (vty != NULL)
- {
- if (ntohs (isisMplsTE.router_id.s_addr) != 0)
- vty_out (vty, " Router-Address: %s%s", inet_ntoa (isisMplsTE.router_id), VTY_NEWLINE);
- else
- vty_out (vty, " N/A%s", VTY_NEWLINE);
- }
+ if (ntohs (isisMplsTE.router_id.s_addr) != 0)
+ vty_out (vty, " Router-Address: %s%s", inet_ntoa (isisMplsTE.router_id), VTY_NEWLINE);
+ else
+ vty_out (vty, " N/A%s", VTY_NEWLINE);
}
else
vty_out (vty, " MPLS-TE is disable on this router%s", VTY_NEWLINE);
diff --git a/lib/thread.c b/lib/thread.c
index 5b8778b717..e10d0c48bf 100644
--- a/lib/thread.c
+++ b/lib/thread.c
@@ -828,7 +828,7 @@ funcname_thread_add_read_write (int dir, struct thread_master *m,
#else
if (FD_ISSET (fd, fdset))
{
- zlog (NULL, LOG_WARNING, "There is already %s fd [%d]", (dir = THREAD_READ) ? "read" : "write", fd);
+ zlog (NULL, LOG_WARNING, "There is already %s fd [%d]", (dir == THREAD_READ) ? "read" : "write", fd);
return NULL;
}
diff --git a/ospfd/.gitignore b/ospfd/.gitignore
index f7d6f09f22..4b8787c89e 100644
--- a/ospfd/.gitignore
+++ b/ospfd/.gitignore
@@ -14,4 +14,4 @@ TAGS
.arch-ids
*~
*.loT
-
+*.a
diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c
index 845d96032b..edb1ca470e 100644
--- a/ospfd/ospf_main.c
+++ b/ospfd/ospf_main.c
@@ -383,7 +383,7 @@ main (int argc, char **argv)
pid_file[0] = '\0';
snprintf(pidfile_temp, sizeof(pidfile_temp), "%s/ospfd-%d.pid", pid_file, instance );
- strncpy(pid_file, pidfile_temp, sizeof(pid_file));
+ strlcpy(pid_file, pidfile_temp, sizeof(pid_file));
}
/* Process id file create. */
pid_output (pid_file);
@@ -407,7 +407,7 @@ main (int argc, char **argv)
}
else
{
- strcpy(vty_path, vty_sock_path);
+ strlcpy(vty_path, vty_sock_path, sizeof(vty_path));
}
vty_serv_sock (vty_addr, vty_port, vty_path);
diff --git a/redhat/.gitignore b/redhat/.gitignore
index e399bd8114..a38f1c06e3 100644
--- a/redhat/.gitignore
+++ b/redhat/.gitignore
@@ -1,5 +1,5 @@
zebra.spec
-quagga.spec
+frr.spec
Makefile
Makefile.in
.nfs*
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 7546b4ddb0..1b0dd8cd29 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -3001,7 +3001,7 @@ vtysh_connect (struct vtysh_client *vclient)
memset (&addr, 0, sizeof (struct sockaddr_un));
addr.sun_family = AF_UNIX;
- strncpy (addr.sun_path, path, strlen (path));
+ strlcpy (addr.sun_path, path, sizeof (addr.sun_path));
#ifdef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
len = addr.sun_len = SUN_LEN(&addr);
#else
diff --git a/zebra/zserv.c b/zebra/zserv.c
index 83d7d0f811..8618e5c371 100644
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -1188,7 +1188,7 @@ zread_ipv4_delete (struct zserv *client, u_short length, struct zebra_vrf *zvrf)
api.safi = stream_getw (s);
/* IPv4 prefix. */
- memset (&p, 0, sizeof (struct prefix_ipv4));
+ memset (&p, 0, sizeof (struct prefix));
p.family = AF_INET;
p.prefixlen = stream_getc (s);
stream_get (&p.u.prefix4, s, PSIZE (p.prefixlen));