]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_ns.c
Merge pull request #13458 from sri-mohan1/srib-ldpd
[mirror_frr.git] / zebra / zebra_ns.c
index 13fd972499375d283290deabf18786c5766ef87b..6bb5e971e616e2a443cf4afdb472e986696127fd 100644 (file)
@@ -1,23 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* zebra NS Routines
  * Copyright (C) 2016 Cumulus Networks, Inc.
  *                    Donald Sharp
  * Copyright (C) 2017/2018 6WIND
- *
- * This file is part of Quagga.
- *
- * Quagga 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, or (at your option) any
- * later version.
- *
- * Quagga 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"
 
@@ -34,6 +19,7 @@
 #include "zebra_netns_notify.h"
 #include "zebra_netns_id.h"
 #include "zebra_pbr.h"
+#include "zebra_tc.h"
 #include "rib.h"
 #include "table_manager.h"
 #include "zebra_errors.h"
@@ -126,7 +112,10 @@ int zebra_ns_enable(ns_id_t ns_id, void **info)
        zebra_dplane_ns_enable(zns, true);
        interface_list(zns);
        route_read(zns);
+
+       vlan_read(zns);
        kernel_read_pbr_rules(zns);
+       kernel_read_tc_qdisc(zns);
 
        return 0;
 }
@@ -136,7 +125,9 @@ int zebra_ns_enable(ns_id_t ns_id, void **info)
  */
 static int zebra_ns_disable_internal(struct zebra_ns *zns, bool complete)
 {
-       route_table_finish(zns->if_table);
+       if (zns->if_table)
+               route_table_finish(zns->if_table);
+       zns->if_table = NULL;
 
        zebra_dplane_ns_enable(zns, false /*Disable*/);