Skip to content

Commit

Permalink
DHCP6: Remove leading space from delegated_dhcp6_prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
rsmarples committed Mar 28, 2024
1 parent f1cf924 commit 0ab1dfa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/dhcp6.c
Original file line number Diff line number Diff line change
Expand Up @@ -4254,6 +4254,7 @@ dhcp6_env(FILE *fp, const char *prefix, const struct interface *ifp,
#ifndef SMALL
const struct dhcp6_state *state;
const struct ipv6_addr *ap;
bool first;
#endif

if (m == NULL)
Expand Down Expand Up @@ -4355,10 +4356,13 @@ dhcp6_env(FILE *fp, const char *prefix, const struct interface *ifp,
return 1;
if (fprintf(fp, "%s_delegated_dhcp6_prefix=", prefix) == -1)
return -1;
first = true;
TAILQ_FOREACH(ap, &state->addrs, next) {
if (ap->delegating_prefix == NULL)
continue;
if (ap != TAILQ_FIRST(&state->addrs)) {
if (first)
first = false;
else {
if (fputc(' ', fp) == EOF)
return -1;
}
Expand Down

0 comments on commit 0ab1dfa

Please sign in to comment.