]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Attempt to fix FQDN encoding.
authorRoy Marples <roy@marples.name>
Wed, 6 Aug 2008 21:37:34 +0000 (21:37 +0000)
committerRoy Marples <roy@marples.name>
Wed, 6 Aug 2008 21:37:34 +0000 (21:37 +0000)
dhcp.c

diff --git a/dhcp.c b/dhcp.c
index 58d1628b68465c63edf840312cb1921db8783210..1ad19c0327fef64d6a475962cbcbaef0a6bc3f2e 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -834,7 +834,7 @@ make_message(struct dhcp_message **message,
                        } else {
                                /* Draft IETF DHC-FQDN option (81) */
                                *p++ = DHCP_FQDN;
-                               *p++ = options->hostname[0] + 4;
+                               *p++ = options->hostname[0] + 5;
                                /*
                                 * Flags: 0000NEOS
                                 * S: 1 => Client requests Server to update
@@ -859,6 +859,7 @@ make_message(struct dhcp_message **message,
                                                *p++ = (uint8_t) *c;
                                        c++;
                                }
+                               *d = p - d - 1;
                                *p++ = 0;
                        }
                }