]> git.proxmox.com Git - mirror_frr.git/blobdiff - isisd/isis_route.c
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / isisd / isis_route.c
index 4fdb11b211e6af35381fedfd024ff11bc10b2cca..711d5cbed9f481e03149579aaf7077e30ac2c84a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * IS-IS Rout(e)ing protocol               - isis_route.c
  * Copyright (C) 2001,2002   Sampo Saaristo
@@ -6,20 +7,6 @@
  *
  *                                         based on ../ospf6d/ospf6_route.[ch]
  *                                         by Yasuhiro Ohara
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public Licenseas 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>
@@ -485,6 +472,9 @@ static void isis_route_update(struct isis_area *area, struct prefix *prefix,
                              struct prefix_ipv6 *src_p,
                              struct isis_route_info *route_info)
 {
+       if (area == NULL)
+               return;
+
        if (CHECK_FLAG(route_info->flag, ISIS_ROUTE_FLAG_ACTIVE)) {
                if (CHECK_FLAG(route_info->flag, ISIS_ROUTE_FLAG_ZEBRA_SYNCED))
                        return;
@@ -492,9 +482,8 @@ static void isis_route_update(struct isis_area *area, struct prefix *prefix,
                isis_route_remove_previous_sid(area, prefix, route_info);
 
                /* Install route. */
-               if (area)
-                       isis_zebra_route_add_route(area->isis, prefix, src_p,
-                                                  route_info);
+               isis_zebra_route_add_route(area->isis, prefix, src_p,
+                                          route_info);
                /* Install/reinstall Prefix-SID label. */
                if (route_info->sr.present)
                        isis_zebra_prefix_sid_install(area, prefix, route_info,
@@ -509,9 +498,8 @@ static void isis_route_update(struct isis_area *area, struct prefix *prefix,
                        isis_zebra_prefix_sid_uninstall(
                                area, prefix, route_info, &route_info->sr);
                /* Uninstall route. */
-               if (area)
-                       isis_zebra_route_del_route(area->isis, prefix, src_p,
-                                                  route_info);
+               isis_zebra_route_del_route(area->isis, prefix, src_p,
+                                          route_info);
                hook_call(isis_route_update_hook, area, prefix, route_info);
 
                UNSET_FLAG(route_info->flag, ISIS_ROUTE_FLAG_ZEBRA_SYNCED);