]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/irdp_main.c
Merge pull request #5805 from donaldsharp/babel_int_return
[mirror_frr.git] / zebra / irdp_main.c
index 9300ba6034f888ad41980ebbfe049ad94e38d6fd..0de618625d770e67bb41edc402b7856c55b44183 100644 (file)
@@ -56,7 +56,7 @@
 #include "zebra/interface.h"
 #include "zebra/rtadv.h"
 #include "zebra/rib.h"
-#include "zebra/zserv.h"
+#include "zebra/zebra_router.h"
 #include "zebra/redistribute.h"
 #include "zebra/irdp.h"
 #include "zebra/zebra_errors.h"
@@ -82,7 +82,7 @@ int irdp_sock_init(void)
        int save_errno;
        int sock;
 
-       frr_elevate_privs(&zserv_privs) {
+       frr_with_privs(&zserv_privs) {
 
                sock = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
                save_errno = errno;
@@ -113,7 +113,7 @@ int irdp_sock_init(void)
        };
 
        t_irdp_raw = NULL;
-       thread_add_read(zebrad.master, irdp_read_raw, NULL, sock, &t_irdp_raw);
+       thread_add_read(zrouter.master, irdp_read_raw, NULL, sock, &t_irdp_raw);
 
        return sock;
 }
@@ -241,11 +241,11 @@ int irdp_send_thread(struct thread *t_advert)
                timer = MAX_INITIAL_ADVERT_INTERVAL;
 
        if (irdp->flags & IF_DEBUG_MISC)
-               zlog_debug("IRDP: New timer for %s set to %u\n", ifp->name,
+               zlog_debug("IRDP: New timer for %s set to %u", ifp->name,
                           timer);
 
        irdp->t_advertise = NULL;
-       thread_add_timer(zebrad.master, irdp_send_thread, ifp, timer,
+       thread_add_timer(zrouter.master, irdp_send_thread, ifp, timer,
                         &irdp->t_advertise);
        return 0;
 }
@@ -306,7 +306,7 @@ void process_solicit(struct interface *ifp)
        timer = (random() % MAX_RESPONSE_DELAY) + 1;
 
        irdp->t_advertise = NULL;
-       thread_add_timer(zebrad.master, irdp_send_thread, ifp, timer,
+       thread_add_timer(zrouter.master, irdp_send_thread, ifp, timer,
                         &irdp->t_advertise);
 }