Re: 120:sip-server option
Roy Marples
Fri Dec 09 19:47:17 2011
On Wed, 2011-12-07 at 14:55 +0100, Egil Hjelmeland wrote:
> Here is a patch against dhcpcd-5.2.12 which completes the 120 sip-server
> option support. I have tested it agains dnsmasq, both IP address lists
> and domain lists works.
Yoiks!
Looks like I broke sip server support since dhcpcd-3.3 and no-one
noticed.
http://roy.marples.name/projects/dhcpcd/changeset/3c44554477835c15450f89e685d2e0cb9d35624d
Hmmm, post commit I think there is an off by 1 error.
diff --git a/dhcp.c b/dhcp.c
index 450e4e7..fa8b02d 100644
--- a/dhcp.c
+++ b/dhcp.c
@@ -1269,7 +1269,7 @@ print_option(char *s, ssize_t len, int type, int
dl, cons
if ((tmp = decode_rfc3361(dl, data)) == NULL)
return -1;
l = strlen(tmp);
- print_string(s, len, l, (uint8_t *)tmp);
+ l = print_string(s, len, l - 1, (uint8_t *)tmp);
free(tmp);
return l;
}
Can you test if that works for you as well, based off the above commit?
Thanks
Roy
Archive administrator: postmaster@marples.name