]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_nb_rpcs.c
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / zebra / zebra_nb_rpcs.c
index 204cc5da6d44c6f7fdc0a0232131580651c1b87e..083ab3fde69d28de7462f4ae44ddd4457f5e272d 100644 (file)
@@ -1,20 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (C) 2020 Cumulus Networks, Inc.
  *                    Chirag Shah
- *
- * 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>
@@ -65,19 +52,22 @@ int clear_evpn_dup_addr_rpc(struct nb_cb_rpc_args *args)
                        if (yang_dup_mac) {
                                yang_str2mac(yang_dup_mac->value, &mac);
                                ret = zebra_vxlan_clear_dup_detect_vni_mac(
-                                       zvrf, vni, &mac);
+                                       zvrf, vni, &mac, args->errmsg,
+                                       args->errmsg_len);
                        } else if (yang_dup_ip) {
                                yang_str2ip(yang_dup_ip->value, &host_ip);
                                ret = zebra_vxlan_clear_dup_detect_vni_ip(
-                                       zvrf, vni, &host_ip);
+                                       zvrf, vni, &host_ip, args->errmsg,
+                                       args->errmsg_len);
                        } else
                                ret = zebra_vxlan_clear_dup_detect_vni(zvrf,
                                                                       vni);
                }
        }
-       ret = (ret != CMD_SUCCESS) ? NB_ERR : NB_OK;
+       if (ret < 0)
+               return NB_ERR;
 
-       return ret;
+       return NB_OK;
 }
 
 /*