From: Steven Barth Date: Thu, 8 May 2014 09:06:32 +0000 (+0200) Subject: softwire: fix DMR parsing X-Git-Tag: debian/1.1+git20160131-1~63 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=19b89e91989e466a6657b07ee33961dbad99cc8e;p=odhcp6c.git softwire: fix DMR parsing --- diff --git a/src/script.c b/src/script.c index 13ac562..9325085 100644 --- a/src/script.c +++ b/src/script.c @@ -281,6 +281,7 @@ static void s46_to_env(enum odhcp6c_state state, const uint8_t *data, size_t len fprintf(fp, "br=%s,", buf6); } else if (state == STATE_S46_MAPT && otype == DHCPV6_OPT_S46_DMR && olen >= sizeof(struct dhcpv6_s46_dmr)) { + dmr = (struct dhcpv6_s46_dmr*)odata; memset(&in6, 0, sizeof(in6)); size_t prefix6len = dmr->dmr_prefix6_len; prefix6len = (prefix6len % 8 == 0) ? prefix6len / 8 : prefix6len / 8 + 1;