]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/rule_netlink.c
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / zebra / rule_netlink.c
index b651edd8f99f3e5a6fd09c6e5dbfc554195ccf82..c7832992ea06e50f507678e5561776e5ad11d42b 100644 (file)
@@ -1,24 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Zebra Policy Based Routing (PBR) interaction with the kernel using
  * netlink.
  * Copyright (C) 2018  Cumulus Networks, Inc.
- *
- * This file is part of FRR.
- *
- * FRR 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.
- *
- * FRR 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 FRR; see the file COPYING.  If not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
  */
 
 #include <zebra.h>
@@ -42,6 +26,7 @@
 #include "zebra/zebra_pbr.h"
 #include "zebra/zebra_errors.h"
 #include "zebra/zebra_dplane.h"
+#include "zebra/zebra_trace.h"
 
 /* definitions */
 
@@ -243,6 +228,8 @@ int netlink_rule_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
        uint8_t proto = 0;
        uint8_t ip_proto = 0;
 
+       frrtrace(3, frr_zebra, netlink_rule_change, h, ns_id, startup);
+
        /* Basic validation followed by extracting attributes. */
        if (h->nlmsg_type != RTM_NEWRULE && h->nlmsg_type != RTM_DELRULE)
                return 0;
@@ -403,7 +390,7 @@ int netlink_rules_read(struct zebra_ns *zns)
                return ret;
 
        ret = netlink_parse_info(netlink_rule_change, &zns->netlink_cmd,
-                                &dp_info, 0, 1);
+                                &dp_info, 0, true);
        if (ret < 0)
                return ret;
 
@@ -412,7 +399,7 @@ int netlink_rules_read(struct zebra_ns *zns)
                return ret;
 
        ret = netlink_parse_info(netlink_rule_change, &zns->netlink_cmd,
-                                &dp_info, 0, 1);
+                                &dp_info, 0, true);
        return ret;
 }