summaryrefslogtreecommitdiffstats
path: root/dhcpcd.h
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-08-07 10:15:15 +0000
committerRoy Marples <roy@marples.name>2008-08-07 10:15:15 +0000
commite837a67042f3b3d128068214774d22d0657168ac (patch)
tree7a51910d9583905752a51980d6f05a881fbf8427 /dhcpcd.h
parent272d4bf457075709238ddfe5188276a7090c8827 (diff)
downloaddhcpcd-e837a67042f3b3d128068214774d22d0657168ac.tar.xz
Note that we encode the hostname according to RFC1035. As such, we can't use the system defined MAX hostname length.
Diffstat (limited to 'dhcpcd.h')
-rw-r--r--dhcpcd.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/dhcpcd.h b/dhcpcd.h
index c9a42e1c..068a65eb 100644
--- a/dhcpcd.h
+++ b/dhcpcd.h
@@ -41,6 +41,7 @@
#define DEFAULT_TIMEOUT 30
#define DEFAULT_LEASETIME 3600 /* 1 hour */
+#define HOSTNAME_MAX_LEN 254 /* Trailing NULL for FQDN */
#define CLASSID_MAX_LEN 48
#define CLIENTID_MAX_LEN 48
#define USERCLASS_MAX_LEN 255
@@ -87,7 +88,7 @@ struct options {
char script[PATH_MAX];
char pidfile[PATH_MAX];
- char hostname[MAXHOSTNAMELEN];
+ char hostname[HOSTNAME_MAX_LEN + 1];
int fqdn;
uint8_t classid[CLASSID_MAX_LEN + 1];
char clientid[CLIENTID_MAX_LEN + 1];