]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospfd/ospf_ism.c
Merge pull request #11242 from patrasar/pimv6_issue_11233
[mirror_frr.git] / ospfd / ospf_ism.c
index 86712c61985d1344fa616cc0c68623c13661c01a..97da61034f1e65f12130b41d90f3cb8b26e6d5ea 100644 (file)
@@ -45,7 +45,7 @@
 
 DEFINE_HOOK(ospf_ism_change,
            (struct ospf_interface * oi, int state, int oldstate),
-           (oi, state, oldstate))
+           (oi, state, oldstate));
 
 /* elect DR and BDR. Refer to RFC2319 section 9.4 */
 static struct ospf_neighbor *ospf_dr_election_sub(struct list *routers)
@@ -201,7 +201,7 @@ static void ospf_dr_change(struct ospf *ospf, struct route_table *nbrs)
        }
 }
 
-static int ospf_dr_election(struct ospf_interface *oi)
+int ospf_dr_election(struct ospf_interface *oi)
 {
        struct in_addr old_dr, old_bdr;
        int old_state, new_state;
@@ -223,8 +223,8 @@ static int ospf_dr_election(struct ospf_interface *oi)
 
        new_state = ospf_ism_state(oi);
 
-       zlog_debug("DR-Election[1st]: Backup %s", inet_ntoa(BDR(oi)));
-       zlog_debug("DR-Election[1st]: DR     %s", inet_ntoa(DR(oi)));
+       zlog_debug("DR-Election[1st]: Backup %pI4", &BDR(oi));
+       zlog_debug("DR-Election[1st]: DR     %pI4", &DR(oi));
 
        if (new_state != old_state
            && !(new_state == ISM_DROther && old_state < ISM_DROther)) {
@@ -233,8 +233,8 @@ static int ospf_dr_election(struct ospf_interface *oi)
 
                new_state = ospf_ism_state(oi);
 
-               zlog_debug("DR-Election[2nd]: Backup %s", inet_ntoa(BDR(oi)));
-               zlog_debug("DR-Election[2nd]: DR     %s", inet_ntoa(DR(oi)));
+               zlog_debug("DR-Election[2nd]: Backup %pI4", &BDR(oi));
+               zlog_debug("DR-Election[2nd]: DR     %pI4", &DR(oi));
        }
 
        list_delete(&el_list);
@@ -248,7 +248,7 @@ static int ospf_dr_election(struct ospf_interface *oi)
 }
 
 
-int ospf_hello_timer(struct thread *thread)
+void ospf_hello_timer(struct thread *thread)
 {
        struct ospf_interface *oi;
 
@@ -263,11 +263,9 @@ int ospf_hello_timer(struct thread *thread)
 
        /* Hello timer set. */
        OSPF_HELLO_TIMER_ON(oi);
-
-       return 0;
 }
 
-static int ospf_wait_timer(struct thread *thread)
+static void ospf_wait_timer(struct thread *thread)
 {
        struct ospf_interface *oi;
 
@@ -278,8 +276,6 @@ static int ospf_wait_timer(struct thread *thread)
                zlog_debug("ISM[%s]: Timer (Wait timer expire)", IF_NAME(oi));
 
        OSPF_ISM_EVENT_SCHEDULE(oi, ISM_WaitTimer);
-
-       return 0;
 }
 
 /* Hook function called after ospf ISM event is occurred. And vty's
@@ -575,7 +571,7 @@ static void ism_change_state(struct ospf_interface *oi, int state)
 }
 
 /* Execute ISM event process. */
-int ospf_ism_event(struct thread *thread)
+void ospf_ism_event(struct thread *thread)
 {
        int event;
        int next_state;
@@ -601,6 +597,4 @@ int ospf_ism_event(struct thread *thread)
 
        /* Make sure timer is set. */
        ism_timer_set(oi);
-
-       return 0;
 }