softwire: fix DMR parsing
authorSteven Barth <steven@midlink.org>
Thu, 8 May 2014 09:06:32 +0000 (11:06 +0200)
committerSteven Barth <steven@midlink.org>
Thu, 8 May 2014 09:06:32 +0000 (11:06 +0200)
src/script.c

index 13ac562..9325085 100644 (file)
@@ -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;