route_t *route = NULL;
route_t *new_route = NULL;
route_t *old_route = NULL;
- char newhostname[HOSTNAME_MAX_LEN] = {0};
- char curhostname[HOSTNAME_MAX_LEN] = {0};
+ char newhostname[MAXHOSTNAMELEN] = {0};
+ char curhostname[MAXHOSTNAMELEN] = {0};
if (! options || ! iface || ! dhcp)
return -1;
}
break;
case 'h':
- if (strlen (optarg) > HOSTNAME_MAX_LEN) {
+ if (strlen (optarg) > sizeof (options.hostname)) {
logger (LOG_ERR, "`%s' too long for HostName string, max is %d",
- optarg, HOSTNAME_MAX_LEN);
+ optarg, sizeof (options.hostname));
exit (EXIT_FAILURE);
} else
strlcpy (options.hostname, optarg, sizeof (options.hostname));
#define CLASS_ID_MAX_LEN 48
#define CLIENT_ID_MAX_LEN 48
-#define HOSTNAME_MAX_LEN 255
-#define USERCLASS_MAX_LEN 255
+#define USERCLASS_MAX_LEN 255
typedef struct options_t {
char interface[IF_NAMESIZE];
- char hostname[HOSTNAME_MAX_LEN];
+ char hostname[MAXHOSTNAMELEN];
int fqdn;
char classid[CLASS_ID_MAX_LEN];
char clientid[CLIENT_ID_MAX_LEN];