Skip to content

Commit

Permalink
DYNDNS: force nsupdate as unconditional_online_cb
Browse files Browse the repository at this point in the history
This is to trigger an update for every (eligible) netlink event.

This hardly a real solution, more like a test.
  • Loading branch information
alexey-tikhonov committed Jan 16, 2025
1 parent c6294f5 commit 3b43e34
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/providers/be_ptask.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,16 @@ errno_t be_ptask_create(TALLOC_CTX *mem_ctx,

if (flags & BE_PTASK_OFFLINE_DISABLE) {
/* install offline and online callbacks */
ret = be_add_online_cb(task, be_ctx, be_ptask_online_cb, task, NULL);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
"Unable to install online callback [%d]: %s\n",
ret, sss_strerror(ret));
goto done;
if (strcmp(name, "Dyndns update") == 0) {
be_add_unconditional_online_cb(task, be_ctx, be_ptask_online_cb, task, NULL);
} else {
ret = be_add_online_cb(task, be_ctx, be_ptask_online_cb, task, NULL);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
"Unable to install online callback [%d]: %s\n",
ret, sss_strerror(ret));
goto done;
}
}

ret = be_add_offline_cb(task, be_ctx, be_ptask_offline_cb, task, NULL);
Expand Down

0 comments on commit 3b43e34

Please sign in to comment.