diff options
Diffstat (limited to 'ospfd')
-rw-r--r-- | ospfd/ospf_api.c | 2 | ||||
-rw-r--r-- | ospfd/ospf_apiserver.c | 4 | ||||
-rw-r--r-- | ospfd/ospf_apiserver.h | 2 | ||||
-rw-r--r-- | ospfd/ospf_lsa.h | 3 | ||||
-rw-r--r-- | ospfd/ospf_nsm.c | 2 | ||||
-rw-r--r-- | ospfd/ospf_opaque.c | 13 | ||||
-rw-r--r-- | ospfd/ospf_opaque.h | 4 | ||||
-rw-r--r-- | ospfd/ospf_te.c | 6 |
8 files changed, 20 insertions, 16 deletions
diff --git a/ospfd/ospf_api.c b/ospfd/ospf_api.c index 77383191..fc3b51dd 100644 --- a/ospfd/ospf_api.c +++ b/ospfd/ospf_api.c @@ -219,7 +219,7 @@ msg_print (struct msg *msg) #else /* ORIGINAL_CODING */ /* API message common header part. */ zlog_debug - ("API-msg [%s]: type(%d),len(%d),seq(%lu),data(%p),size(%lu)", + ("API-msg [%s]: type(%d),len(%d),seq(%lu),data(%p),size(%zd)", ospf_api_typename (msg->hdr.msgtype), msg->hdr.msgtype, ntohs (msg->hdr.msglen), (unsigned long) ntohl (msg->hdr.msgseq), STREAM_DATA (msg->s), STREAM_SIZE (msg->s)); diff --git a/ospfd/ospf_apiserver.c b/ospfd/ospf_apiserver.c index 15fd2e5f..2a9003b7 100644 --- a/ospfd/ospf_apiserver.c +++ b/ospfd/ospf_apiserver.c @@ -1831,7 +1831,7 @@ ospf_apiserver_lsa11_originator (void *arg) /* Periodically refresh opaque LSAs so that they do not expire in other routers. */ -void +struct ospf_lsa * ospf_apiserver_lsa_refresher (struct ospf_lsa *lsa) { struct ospf_apiserver *apiserv; @@ -1904,7 +1904,7 @@ ospf_apiserver_lsa_refresher (struct ospf_lsa *lsa) } out: - return; + return new; } diff --git a/ospfd/ospf_apiserver.h b/ospfd/ospf_apiserver.h index 9a8ae254..b60f56b4 100644 --- a/ospfd/ospf_apiserver.h +++ b/ospfd/ospf_apiserver.h @@ -180,7 +180,7 @@ extern void ospf_apiserver_config_write_router (struct vty *vty); extern void ospf_apiserver_config_write_if (struct vty *vty, struct interface *ifp); extern void ospf_apiserver_show_info (struct vty *vty, struct ospf_lsa *lsa); extern int ospf_ospf_apiserver_lsa_originator (void *arg); -extern void ospf_apiserver_lsa_refresher (struct ospf_lsa *lsa); +extern struct ospf_lsa *ospf_apiserver_lsa_refresher (struct ospf_lsa *lsa); extern void ospf_apiserver_flush_opaque_lsa (struct ospf_apiserver *apiserv, u_char lsa_type, u_char opaque_type); diff --git a/ospfd/ospf_lsa.h b/ospfd/ospf_lsa.h index fee34708..72e2f8a5 100644 --- a/ospfd/ospf_lsa.h +++ b/ospfd/ospf_lsa.h @@ -114,6 +114,9 @@ struct ospf_lsa /* Refreshement List or Queue */ int refresh_list; + + /* For Type-9 Opaque-LSAs */ + struct ospf_interface *oi; }; /* OSPF LSA Link Type. */ diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c index 279d2a01..cbc31716 100644 --- a/ospfd/ospf_nsm.c +++ b/ospfd/ospf_nsm.c @@ -216,7 +216,7 @@ ospf_db_summary_add (struct ospf_neighbor *nbr, struct ospf_lsa *lsa) { case OSPF_OPAQUE_LINK_LSA: /* Exclude type-9 LSAs that does not have the same "oi" with "nbr". */ - if (lsa->oi != nbr->oi) + if (nbr->oi && ospf_if_exists (lsa->oi) != nbr->oi) return 0; break; case OSPF_OPAQUE_AREA_LSA: diff --git a/ospfd/ospf_opaque.c b/ospfd/ospf_opaque.c index 6e90011e..aa126e19 100644 --- a/ospfd/ospf_opaque.c +++ b/ospfd/ospf_opaque.c @@ -251,7 +251,7 @@ struct ospf_opaque_functab void (* config_write_debug )(struct vty *vty); void (* show_opaque_info )(struct vty *vty, struct ospf_lsa *lsa); int (* lsa_originator)(void *arg); - void (* lsa_refresher )(struct ospf_lsa *lsa); + struct ospf_lsa *(* lsa_refresher )(struct ospf_lsa *lsa); int (* new_lsa_hook)(struct ospf_lsa *lsa); int (* del_lsa_hook)(struct ospf_lsa *lsa); }; @@ -354,7 +354,7 @@ ospf_register_opaque_functab ( void (* config_write_debug )(struct vty *vty), void (* show_opaque_info )(struct vty *vty, struct ospf_lsa *lsa), int (* lsa_originator)(void *arg), - void (* lsa_refresher )(struct ospf_lsa *lsa), + struct ospf_lsa *(* lsa_refresher )(struct ospf_lsa *lsa), int (* new_lsa_hook)(struct ospf_lsa *lsa), int (* del_lsa_hook)(struct ospf_lsa *lsa)) { @@ -1608,12 +1608,13 @@ out: return new; } -void +struct ospf_lsa * ospf_opaque_lsa_refresh (struct ospf_lsa *lsa) { struct ospf *ospf; struct ospf_opaque_functab *functab; - + struct ospf_lsa *new = NULL; + ospf = ospf_lookup (); if ((functab = ospf_opaque_functab_lookup (lsa)) == NULL @@ -1633,9 +1634,9 @@ ospf_opaque_lsa_refresh (struct ospf_lsa *lsa) ospf_lsa_flush (ospf, lsa); } else - (* functab->lsa_refresher)(lsa); + new = (* functab->lsa_refresher)(lsa); - return; + return new; } /*------------------------------------------------------------------------* diff --git a/ospfd/ospf_opaque.h b/ospfd/ospf_opaque.h index f49fe460..22730645 100644 --- a/ospfd/ospf_opaque.h +++ b/ospfd/ospf_opaque.h @@ -120,7 +120,7 @@ ospf_register_opaque_functab ( void (* config_write_debug )(struct vty *vty), void (* show_opaque_info )(struct vty *vty, struct ospf_lsa *lsa), int (* lsa_originator)(void *arg), - void (* lsa_refresher )(struct ospf_lsa *lsa), + struct ospf_lsa *(* lsa_refresher )(struct ospf_lsa *lsa), int (* new_lsa_hook)(struct ospf_lsa *lsa), int (* del_lsa_hook)(struct ospf_lsa *lsa) ); @@ -143,7 +143,7 @@ extern void ospf_opaque_lsa_originate_schedule (struct ospf_interface *oi, int *init_delay); extern struct ospf_lsa *ospf_opaque_lsa_install (struct ospf_lsa *, int rt_recalc); -extern void ospf_opaque_lsa_refresh (struct ospf_lsa *lsa); +extern struct ospf_lsa *ospf_opaque_lsa_refresh (struct ospf_lsa *lsa); extern void ospf_opaque_lsa_reoriginate_schedule (void *lsa_type_dependent, u_char lsa_type, diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c index c5ec0ad8..24e81052 100644 --- a/ospfd/ospf_te.c +++ b/ospfd/ospf_te.c @@ -133,7 +133,7 @@ static void ospf_mpls_te_config_write_router (struct vty *vty); static void ospf_mpls_te_config_write_if (struct vty *vty, struct interface *ifp); static void ospf_mpls_te_show_info (struct vty *vty, struct ospf_lsa *lsa); static int ospf_mpls_te_lsa_originate (void *arg); -static void ospf_mpls_te_lsa_refresh (struct ospf_lsa *lsa); +static struct ospf_lsa *ospf_mpls_te_lsa_refresh (struct ospf_lsa *lsa); static void ospf_mpls_te_lsa_schedule (struct mpls_te_link *lp, enum sched_opcode); static void del_mpls_te_link (void *val); @@ -1009,7 +1009,7 @@ out: return rc; } -static void +static struct ospf_lsa * ospf_mpls_te_lsa_refresh (struct ospf_lsa *lsa) { struct mpls_te_link *lp; @@ -1070,7 +1070,7 @@ ospf_mpls_te_lsa_refresh (struct ospf_lsa *lsa) } out: - return; + return new; } static void |