diff options
Diffstat (limited to 'lib/vrf.c')
-rw-r--r-- | lib/vrf.c | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -489,8 +489,8 @@ void vrf_init(int (*create)(struct vrf *), int (*enable)(struct vrf *), /* The default VRF always exists. */ default_vrf = vrf_get(VRF_DEFAULT, VRF_DEFAULT_NAME); if (!default_vrf) { - flog_err(LIB_ERR_VRF_START, - "vrf_init: failed to create the default VRF!"); + flog_err(EC_LIB_VRF_START, + "vrf_init: failed to create the default VRF!"); exit(1); } if (vrf_is_backend_netns()) { @@ -505,8 +505,8 @@ void vrf_init(int (*create)(struct vrf *), int (*enable)(struct vrf *), /* Enable the default VRF. */ if (!vrf_enable(default_vrf)) { - flog_err(LIB_ERR_VRF_START, - "vrf_init: failed to enable the default VRF!"); + flog_err(EC_LIB_VRF_START, + "vrf_init: failed to enable the default VRF!"); exit(1); } @@ -576,7 +576,7 @@ int vrf_socket(int domain, int type, int protocol, vrf_id_t vrf_id, ret = vrf_switch_to_netns(vrf_id); if (ret < 0) - flog_err_sys(LIB_ERR_SOCKET, "%s: Can't switch to VRF %u (%s)", + flog_err_sys(EC_LIB_SOCKET, "%s: Can't switch to VRF %u (%s)", __func__, vrf_id, safe_strerror(errno)); if (ret > 0 && interfacename && vrf_default_accepts_vrf(type)) { @@ -590,7 +590,7 @@ int vrf_socket(int domain, int type, int protocol, vrf_id_t vrf_id, save_errno = errno; ret2 = vrf_switchback_to_initial(); if (ret2 < 0) - flog_err_sys(LIB_ERR_SOCKET, + flog_err_sys(EC_LIB_SOCKET, "%s: Can't switchback from VRF %u (%s)", __func__, vrf_id, safe_strerror(errno)); errno = save_errno; @@ -631,7 +631,7 @@ int vrf_handler_create(struct vty *vty, const char *vrfname, vrfname, VRF_NAMSIZ); else flog_warn( - LIB_WARN_VRF_LENGTH, + EC_LIB_VRF_LENGTH, "%% VRF name %s invalid: length exceeds %d bytes\n", vrfname, VRF_NAMSIZ); return CMD_WARNING_CONFIG_FAILED; @@ -961,13 +961,13 @@ int vrf_getaddrinfo(const char *node, const char *service, ret = vrf_switch_to_netns(vrf_id); if (ret < 0) - flog_err_sys(LIB_ERR_SOCKET, "%s: Can't switch to VRF %u (%s)", + flog_err_sys(EC_LIB_SOCKET, "%s: Can't switch to VRF %u (%s)", __func__, vrf_id, safe_strerror(errno)); ret = getaddrinfo(node, service, hints, res); save_errno = errno; ret2 = vrf_switchback_to_initial(); if (ret2 < 0) - flog_err_sys(LIB_ERR_SOCKET, + flog_err_sys(EC_LIB_SOCKET, "%s: Can't switchback from VRF %u (%s)", __func__, vrf_id, safe_strerror(errno)); errno = save_errno; @@ -980,7 +980,7 @@ int vrf_ioctl(vrf_id_t vrf_id, int d, unsigned long request, char *params) ret = vrf_switch_to_netns(vrf_id); if (ret < 0) { - flog_err_sys(LIB_ERR_SOCKET, "%s: Can't switch to VRF %u (%s)", + flog_err_sys(EC_LIB_SOCKET, "%s: Can't switch to VRF %u (%s)", __func__, vrf_id, safe_strerror(errno)); return 0; } @@ -988,7 +988,7 @@ int vrf_ioctl(vrf_id_t vrf_id, int d, unsigned long request, char *params) saved_errno = errno; ret = vrf_switchback_to_initial(); if (ret < 0) - flog_err_sys(LIB_ERR_SOCKET, + flog_err_sys(EC_LIB_SOCKET, "%s: Can't switchback from VRF %u (%s)", __func__, vrf_id, safe_strerror(errno)); errno = saved_errno; @@ -1002,13 +1002,13 @@ int vrf_sockunion_socket(const union sockunion *su, vrf_id_t vrf_id, ret = vrf_switch_to_netns(vrf_id); if (ret < 0) - flog_err_sys(LIB_ERR_SOCKET, "%s: Can't switch to VRF %u (%s)", + flog_err_sys(EC_LIB_SOCKET, "%s: Can't switch to VRF %u (%s)", __func__, vrf_id, safe_strerror(errno)); ret = sockunion_socket(su); save_errno = errno; ret2 = vrf_switchback_to_initial(); if (ret2 < 0) - flog_err_sys(LIB_ERR_SOCKET, + flog_err_sys(EC_LIB_SOCKET, "%s: Can't switchback from VRF %u (%s)", __func__, vrf_id, safe_strerror(errno)); errno = save_errno; |