From c5950d7c6025923891254cd66b095b943e6d02d8 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 21 Apr 2015 13:08:35 -0400 Subject: [PATCH] vty: Avoid printing "ip (null)" in the saved config file --- src/vty_interface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vty_interface.c b/src/vty_interface.c index 38f7053..d5884f9 100644 --- a/src/vty_interface.c +++ b/src/vty_interface.c @@ -263,7 +263,8 @@ static void write_msc(struct vty *vty, struct msc_connection *msc) vty_out(vty, " msc %d%s", msc->nr, VTY_NEWLINE); vty_out(vty, " description %s%s", name, VTY_NEWLINE); vty_out(vty, " mode %s%s", msc_mode(msc), VTY_NEWLINE); - vty_out(vty, " ip %s%s", msc->ip, VTY_NEWLINE); + if (msc->ip) + vty_out(vty, " ip %s%s", msc->ip, VTY_NEWLINE); vty_out(vty, " port %d%s", msc->port, VTY_NEWLINE); vty_out(vty, " token %s%s", msc->token, VTY_NEWLINE); vty_out(vty, " dscp %d%s", msc->dscp, VTY_NEWLINE);