diff options
| author | Álvaro Fernández Rojas | 2025-12-09 21:34:43 +0000 |
|---|---|---|
| committer | Álvaro Fernández Rojas | 2025-12-09 21:34:50 +0000 |
| commit | 24b70c5c2ff06a021e079e9f157cba6165aeab8a (patch) | |
| tree | bc1c79b72c49fff99569e7cd9ef29eda118df439 | |
| parent | 5203ad13954c28377fc4f0ffb7bfd2cf501303bb (diff) | |
| download | odhcpd-24b70c5c2ff06a021e079e9f157cba6165aeab8a.tar.gz | |
Revert "statefiles: fix escape sequence for broken hostname output"
This reverts commit c29aa70914988e09774fc5f49565e8ca88526050.
See https://github.com/openwrt/odhcpd/pull/340#issuecomment-3633182512
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
| -rw-r--r-- | src/statefiles.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/statefiles.c b/src/statefiles.c index 9e774ee..0ce2a2e 100644 --- a/src/statefiles.c +++ b/src/statefiles.c @@ -480,7 +480,7 @@ static void statefiles_write_state6(struct write_ctxt *ctxt, struct dhcpv6_lease fprintf(ctxt->fp, "# %s %s %x %s%s %" PRId64 " %" PRIx64 " %" PRIu8, ctxt->iface->ifname, duidbuf, ntohl(lease->iaid), - lease->hostname_valid ? "" : "broken\x20", + lease->hostname_valid ? "" : "broken\\x20", lease->hostname ? lease->hostname : "-", (lease->valid_until > ctxt->now ? (int64_t)(lease->valid_until - ctxt->now + ctxt->wall_time) : @@ -516,7 +516,7 @@ static void statefiles_write_state4(struct write_ctxt *ctxt, struct dhcpv4_lease "# %s %s ipv4 %s%s %" PRId64 " %x 32 %s/32\n", ctxt->iface->ifname, ether_ntoa((struct ether_addr *)lease->hwaddr), - lease->hostname_valid ? "" : "broken\x20", + lease->hostname_valid ? "" : "broken\\x20", lease->hostname ? lease->hostname : "-", (lease->valid_until > ctxt->now ? (int64_t)(lease->valid_until - ctxt->now + ctxt->wall_time) : |