+// 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>
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;
}
/*