summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/if.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/if.c b/lib/if.c
index 6b551a9fa..67e2d366c 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -656,7 +656,8 @@ DEFUN_NOSH (interface,
int idx_ifname = 1;
int idx_vrf = 3;
const char *ifname = argv[idx_ifname]->arg;
- const char *vrfname = (argc > 2) ? argv[idx_vrf]->arg : NULL;
+ const char *vrfname =
+ (argc > 2) ? argv[idx_vrf]->arg : VRF_DEFAULT_NAME;
struct interface *ifp;
vrf_id_t vrf_id = VRF_DEFAULT;
@@ -681,7 +682,8 @@ DEFUN_NOSH (interface,
#endif /* SUNOS_5 */
if (!ifp) {
- vty_out(vty, "%% interface %s not in %s\n", ifname, vrfname);
+ vty_out(vty, "%% interface %s not in %s vrf\n", ifname,
+ vrfname);
return CMD_WARNING_CONFIG_FAILED;
}
VTY_PUSH_CONTEXT(INTERFACE_NODE, ifp);