#include "linklist.h"
#include "vector.h"
+#include "lib_errors.h"
#include "vty.h"
#include "command.h"
#include "vrf.h"
* this should not be considered as an update
* then create the new interface
*/
- if (ifp->vrf_id != vrf_id && vrf_is_mapped_on_netns(vrf_id))
+ if (ifp->vrf_id != vrf_id && vrf_is_mapped_on_netns(
+ vrf_lookup_by_id(vrf_id)))
return if_create(name, vrf_id);
/* If it came from the kernel
* or by way of zclient, believe it and update
return CHECK_FLAG(ifp->status, ZEBRA_INTERFACE_VRF_LOOPBACK);
}
+bool if_is_loopback_or_vrf(struct interface *ifp)
+{
+ if (if_is_loopback(ifp) || if_is_vrf(ifp))
+ return true;
+
+ return false;
+}
+
/* Does this interface support broadcast ? */
int if_is_broadcast(struct interface *ifp)
{
}
#endif /* SUNOS_5 */
-DEFUN (interface,
+DEFUN_NOSH (interface,
interface_cmd,
"interface IFNAME [vrf NAME]",
"Select an interface to configure\n"
return CMD_SUCCESS;
}
-DEFUN_NOSH (no_interface,
- no_interface_cmd,
- "no interface IFNAME [vrf NAME]",
- NO_STR
- "Delete a pseudo interface's configuration\n"
- "Interface's name\n"
- VRF_CMD_HELP_STR)
+DEFUN (no_interface,
+ no_interface_cmd,
+ "no interface IFNAME [vrf NAME]",
+ NO_STR
+ "Delete a pseudo interface's configuration\n"
+ "Interface's name\n"
+ VRF_CMD_HELP_STR)
{
int idx_vrf = 4;
const char *ifname = argv[2]->arg;
llts(ZEBRA_LLT_IEEE802154, "IEEE 802.15.4");
llts(ZEBRA_LLT_IEEE802154_PHY, "IEEE 802.15.4 Phy");
default:
- zlog_warn("Unknown value %d", llt);
+ flog_err(LIB_ERR_DEVELOPMENT, "Unknown value %d", llt);
return "Unknown type!";
#undef llts
}