]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospfd/ospf_ext.c
Merge pull request #13060 from opensourcerouting/feature/allow_peering_with_127.0.0.1
[mirror_frr.git] / ospfd / ospf_ext.c
index ea1506ea277dbf38ce3ee7ba27c5ea377e03c2d9..75b58035a3d5607f45cb5d46b5718fdcf73c47e0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * This is an implementation of RFC7684 OSPFv2 Prefix/Link Attribute
  * Advertisement
@@ -8,20 +9,6 @@
  * Author: Anselme Sawadogo <anselmesawadogo@gmail.com>
  *
  * Copyright (C) 2016 - 2018 Orange Labs http://www.orange.com
- *
- * 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>
@@ -38,7 +25,7 @@
 #include "vty.h"
 #include "stream.h"
 #include "log.h"
-#include "thread.h"
+#include "frrevent.h"
 #include "hash.h"
 #include "sockunion.h" /* for inet_aton() */
 #include "network.h"
@@ -74,7 +61,7 @@ static struct ospf_ext_lp OspfEXT;
 
 /*
  * -----------------------------------------------------------------------
- * Followings are initialize/terminate functions for Extended Prefix/Link
+ * Following are initialize/terminate functions for Extended Prefix/Link
  * Opaque LSA handling.
  * -----------------------------------------------------------------------
  */
@@ -114,7 +101,7 @@ int ospf_ext_init(void)
 {
        int rc = 0;
 
-       memset(&OspfEXT, 0, sizeof(struct ospf_ext_lp));
+       memset(&OspfEXT, 0, sizeof(OspfEXT));
        OspfEXT.enabled = false;
        /* Only Area flooding is supported yet */
        OspfEXT.scope = OSPF_OPAQUE_AREA_LSA;
@@ -216,7 +203,7 @@ void ospf_ext_finish(void)
 
 /*
  * ---------------------------------------------------------------------
- * Followings are control functions for Extended Prefix/Link Opaque LSA
+ * Following are control functions for Extended Prefix/Link Opaque LSA
  * parameters management.
  * ---------------------------------------------------------------------
  */
@@ -256,10 +243,10 @@ static uint32_t get_ext_link_instance_value(void)
 /* Lookup Extended Prefix/Links by ifp from OspfEXT struct iflist */
 static struct ext_itf *lookup_ext_by_ifp(struct interface *ifp)
 {
-       struct listnode *node, *nnode;
+       struct listnode *node;
        struct ext_itf *exti;
 
-       for (ALL_LIST_ELEMENTS(OspfEXT.iflist, node, nnode, exti))
+       for (ALL_LIST_ELEMENTS_RO(OspfEXT.iflist, node, exti))
                if (exti->ifp == ifp)
                        return exti;
 
@@ -681,7 +668,7 @@ void ospf_ext_update_sr(bool enable)
 
 /*
  * -----------------------------------------------------------------------
- * Followings are callback functions against generic Opaque-LSAs handling
+ * Following are callback functions against generic Opaque-LSAs handling
  * -----------------------------------------------------------------------
  */
 
@@ -985,7 +972,7 @@ static int ospf_ext_pref_lsa_update(struct ospf_lsa *lsa)
 
 /*
  * -------------------------------------------------------
- * Followings are OSPF protocol processing functions for
+ * Following are OSPF protocol processing functions for
  * Extended Prefix/Link Opaque LSA
  * -------------------------------------------------------
  */
@@ -1713,7 +1700,7 @@ static void ospf_ext_lsa_schedule(struct ext_itf *exti, enum lsa_opcode op)
 
 /*
  * ------------------------------------
- * Followings are vty show functions.
+ * Following are vty show functions.
  * ------------------------------------
  */