Skip to content

Commit

Permalink
Re-enable configuring cookies from config file
Browse files Browse the repository at this point in the history
Which was accidentally removed with the 4.11.1 release.
  • Loading branch information
wtoorop committed Jan 20, 2025
1 parent a2691cb commit 9061b2d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
8 changes: 8 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
20 January 2025: Willem
- code repository continues with 4.11.2 under development.
- Fix re-enable to configure dns-cookies from config file, which was
accidentally removed with the 4.11.1 release.

19 January 2025: Willem
- NSD 4.11.1 emergency quick-fix release

17 January 2025: Willem
- Fix #424: Stalled updates after corrupt transfer.

Expand Down
4 changes: 3 additions & 1 deletion doc/RELNOTES
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ NSD RELEASE NOTES

4.11.2
================

BUG FIXES:
- Fix re-enable to configure dns-cookies from config file, which was
accidentally removed with the 4.11.1 release.

4.11.1
================
Expand Down
10 changes: 6 additions & 4 deletions util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1189,21 +1189,23 @@ void reconfig_cookies(struct nsd* nsd, struct nsd_options* options)
/* Cookie secrets in the configuration file take precedence */
if(options->cookie_secret) {
#ifndef NDEBUG
ssize_t len = hex_pton(options->cookie_secret,
ssize_t len =
#endif
hex_pton(options->cookie_secret,
nsd->cookie_secrets[0].cookie_secret,
NSD_COOKIE_SECRET_SIZE);
/* Cookie length guaranteed in configparser.y */
assert(len == NSD_COOKIE_SECRET_SIZE);
#endif
nsd->cookie_count = 1;
if(options->cookie_staging_secret) {
#ifndef NDEBUG
len = hex_pton(options->cookie_staging_secret,
len =
#endif
hex_pton(options->cookie_staging_secret,
nsd->cookie_secrets[1].cookie_secret,
NSD_COOKIE_SECRET_SIZE);
/* Cookie length guaranteed in configparser.y */
assert(len == NSD_COOKIE_SECRET_SIZE);
#endif
nsd->cookie_count = 2;
}
/*************************************************************/
Expand Down

0 comments on commit 9061b2d

Please sign in to comment.