]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/if_netlink.c
zebra: Fix build error when `--disable-bfdd`
[mirror_frr.git] / zebra / if_netlink.c
index 6e5fef3b3fce4ed3a726ab26a2b5f6b4ccd93e98..fcb692b715fe589c74324c8cb528af8d2f92f6aa 100644 (file)
@@ -1,22 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Interface looking up by netlink.
  * Copyright (C) 1998 Kunihiro Ishiguro
- *
- * This file is part of GNU Zebra.
- *
- * GNU Zebra 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.
- *
- * GNU Zebra 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>
@@ -48,7 +33,7 @@
 #include "table.h"
 #include "memory.h"
 #include "rib.h"
-#include "thread.h"
+#include "frrevent.h"
 #include "privs.h"
 #include "nexthop.h"
 #include "vrf.h"
@@ -2164,7 +2149,15 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
 
                        if (tb[IFLA_PROTO_DOWN])
                                netlink_proc_dplane_if_protodown(ifp->info, tb);
-
+                       if (IS_ZEBRA_IF_BRIDGE(ifp)) {
+                               zif = ifp->info;
+                               if (IS_ZEBRA_DEBUG_KERNEL)
+                                       zlog_debug(
+                                               "RTM_NEWLINK ADD for %s(%u), vlan-aware %d",
+                                               name, ifp->ifindex,
+                                               IS_ZEBRA_IF_BRIDGE_VLAN_AWARE(
+                                                       zif));
+                       }
                } else if (ifp->vrf->vrf_id != vrf_id) {
                        /* VRF change for an interface. */
                        if (IS_ZEBRA_DEBUG_KERNEL)
@@ -2300,6 +2293,14 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
                        else if (IS_ZEBRA_IF_BOND_SLAVE(ifp) || was_bond_slave)
                                zebra_l2if_update_bond_slave(ifp, bond_ifindex,
                                                             !!bypass);
+                       if (IS_ZEBRA_IF_BRIDGE(ifp)) {
+                               if (IS_ZEBRA_DEBUG_KERNEL)
+                                       zlog_debug(
+                                               "RTM_NEWLINK update for %s(%u), vlan-aware %d",
+                                               name, ifp->ifindex,
+                                               IS_ZEBRA_IF_BRIDGE_VLAN_AWARE(
+                                                       zif));
+                       }
                }
 
                zif = ifp->info;
@@ -2322,8 +2323,6 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
                        zlog_debug("RTM_DELLINK for %s(%u)", name,
                                   ifp->ifindex);
 
-               UNSET_FLAG(ifp->status, ZEBRA_INTERFACE_VRF_LOOPBACK);
-
                if (IS_ZEBRA_IF_BOND(ifp))
                        zebra_l2if_update_bond(ifp, false);
                if (IS_ZEBRA_IF_BOND_SLAVE(ifp))