diff options
author | Steven Barth <steven@midlink.org> | 2015-05-16 09:28:01 +0200 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2015-05-16 09:28:01 +0200 |
commit | 68042ddafe0e1a3498b6c7a57ec8d2d20f25650b (patch) | |
tree | 6f71f93f5962a8f6e83bae18d87ae746d42daea9 /src | |
parent | ce8b29ad74913c830cda1c7c537a665e41c7928b (diff) | |
download | odhcp6c-68042ddafe0e1a3498b6c7a57ec8d2d20f25650b.tar.gz |
Fix LW4over6 parameter handling
Diffstat (limited to 'src')
-rw-r--r-- | src/script.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/script.c b/src/script.c index db227d9..219d034 100644 --- a/src/script.c +++ b/src/script.c @@ -295,6 +295,8 @@ static void s46_to_env(enum odhcp6c_state state, const uint8_t *data, size_t len fprintf(fp, "dmr=%s/%d,", buf6, dmr->dmr_prefix6_len); } } + + fputc(' ', fp); } else if (state == STATE_S46_LW && otype == DHCPV6_OPT_S46_V4V6BIND && olen >= sizeof(struct dhcpv6_s46_v4v6bind)) { char buf4[INET_ADDRSTRLEN]; @@ -312,8 +314,8 @@ static void s46_to_env(enum odhcp6c_state state, const uint8_t *data, size_t len inet_ntop(AF_INET, &bind->ipv4_address, buf4, sizeof(buf4)); inet_ntop(AF_INET6, &in6, buf6, sizeof(buf6)); - fprintf(fp, "type=%s,ipv4address=%s,prefix6len=%d,ipv6prefix=%s,", - type, buf4, bind->bindprefix6_len, buf6); + fprintf(fp, "type=%s,prefix4len=32,prefix6len=%d,ipv4prefix=%s,ipv6prefix=%s,", + type, bind->bindprefix6_len, buf4, buf6); s46_to_env_portparams(&bind->bind_ipv6_prefix[prefix6len], olen - sizeof(*bind) - prefix6len, fp); @@ -324,9 +326,9 @@ static void s46_to_env(enum odhcp6c_state state, const uint8_t *data, size_t len fprintf(fp, "br=%s,", buf6); } } - } - fputc(' ', fp); + fputc(' ', fp); + } } fclose(fp); |