.description = "FRR has detected a error from using a vital system call and has probably\nalready exited",
.suggestion = "Ensure permissions are correct for FRR and FRR user and groups are correct\nAdditionally check that system resources are still available"
},
+ {
+ .code = LIB_ERR_VTY,
+ .title = "VTY subsystem Error",
+ .description = "FRR has detected a problem with the specified configuration file",
+ .suggestion = "Ensure configuration file exists and has correct permissions for operations\nAdditionally ensure that all config lines are correct as well",
+ },
{
.code = END_FERR,
}
#include "network.h"
#include "libfrr.h"
#include "frrstr.h"
+#include "lib_errors.h"
#include <arpa/telnet.h>
#include <termios.h>
nl = strchr(vty->error_buf, '\n');
if (nl)
*nl = '\0';
- zlog_err("ERROR: %s on config line %u: %s", message, line_num,
- vty->error_buf);
+ zlog_ferr(LIB_ERR_VTY,
+ "ERROR: %s on config line %u: %s", message, line_num,
+ vty->error_buf);
}
vty_close(vty);
zlog_warn(
"WARNING: using backup configuration file!");
else {
- zlog_err("can't open configuration file [%s]",
- config_file);
+ zlog_ferr(LIB_ERR_VTY,
+ "can't open configuration file [%s]",
+ config_file);
exit(1);
}
}
"WARNING: using backup configuration file!");
fullpath = config_default_dir;
} else {
- zlog_err("can't open configuration file [%s]",
- config_default_dir);
+ zlog_ferr(LIB_ERR_VTY,
+ "can't open configuration file [%s]",
+ config_default_dir);
goto tmp_free_and_out;
}
} else