]> git.proxmox.com Git - mirror_frr.git/blobdiff - pimd/pim_ssmpingd.c
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / pimd / pim_ssmpingd.c
index da903bd9802acea01e4ab89a1e67cd4e409c5ecd..2fc30b4915355adbe56c6057eb14613d053777f9 100644 (file)
@@ -1,20 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * PIM for Quagga
  * Copyright (C) 2008  Everton da Silva Marques
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <zebra.h>
@@ -27,6 +14,7 @@
 #include "lib_errors.h"
 
 #include "pimd.h"
+#include "pim_instance.h"
 #include "pim_ssmpingd.h"
 #include "pim_time.h"
 #include "pim_sock.h"
@@ -212,7 +200,7 @@ static void ssmpingd_delete(struct ssmpingd_sock *ss)
 
        if (close(ss->sock_fd)) {
                zlog_warn(
-                       "%s: failure closing ssmpingd sock_fd=%d for source %pI4: errno=%d: %s",
+                       "%s: failure closing ssmpingd sock_fd=%d for source %pPA: errno=%d: %s",
                        __func__, ss->sock_fd, &ss->source_addr, errno,
                        safe_strerror(errno));
                /* warning only */
@@ -262,7 +250,7 @@ static int ssmpingd_read_msg(struct ssmpingd_sock *ss)
 
        if (len < 0) {
                zlog_warn(
-                       "%s: failure receiving ssmping for source %pI4 on fd=%d: errno=%d: %s",
+                       "%s: failure receiving ssmping for source %pPA on fd=%d: errno=%d: %s",
                        __func__, &ss->source_addr, ss->sock_fd, errno,
                        safe_strerror(errno));
                return -1;
@@ -272,7 +260,7 @@ static int ssmpingd_read_msg(struct ssmpingd_sock *ss)
 
        if (buf[0] != PIM_SSMPINGD_REQUEST) {
                zlog_warn(
-                       "%s: bad ssmping type=%d from %pSUp to %pSUp on interface %s ifindex=%d fd=%d src=%pI4",
+                       "%s: bad ssmping type=%d from %pSUp to %pSUp on interface %s ifindex=%d fd=%d src=%pPA",
                        __func__, buf[0], &from, &to,
                        ifp ? ifp->name : "<iface?>", ifindex, ss->sock_fd,
                        &ss->source_addr);
@@ -281,7 +269,7 @@ static int ssmpingd_read_msg(struct ssmpingd_sock *ss)
 
        if (PIM_DEBUG_SSMPINGD) {
                zlog_debug(
-                       "%s: recv ssmping from %pSUp, to %pSUp, on interface %s ifindex=%d fd=%d src=%pI4",
+                       "%s: recv ssmping from %pSUp, to %pSUp, on interface %s ifindex=%d fd=%d src=%pPA",
                        __func__, &from, &to, ifp ? ifp->name : "<iface?>",
                        ifindex, ss->sock_fd, &ss->source_addr);
        }
@@ -330,7 +318,7 @@ static struct ssmpingd_sock *ssmpingd_new(struct pim_instance *pim,
        sock_fd =
                ssmpingd_socket(source_addr, /* port: */ 4321, /* mTTL: */ 64);
        if (sock_fd < 0) {
-               zlog_warn("%s: ssmpingd_socket() failure for source %pI4",
+               zlog_warn("%s: ssmpingd_socket() failure for source %pPA",
                          __func__, &source_addr);
                return 0;
        }
@@ -361,10 +349,8 @@ int pim_ssmpingd_start(struct pim_instance *pim, pim_addr source_addr)
                return 0;
        }
 
-       {
-               zlog_info("%s: starting ssmpingd for source %pPAs", __func__,
-                         &source_addr);
-       }
+       zlog_info("%s: starting ssmpingd for source %pPAs", __func__,
+                 &source_addr);
 
        ss = ssmpingd_new(pim, source_addr);
        if (!ss) {