[chrony-dev] [Git][chrony/chrony][master] 3 commits: conf: fix sourcedir reloading to not multiply sources

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


Title: GitLab

Miroslav Lichvar pushed to branch master at chrony / chrony

Commits:

  • cacd64bf
    by Miroslav Lichvar at 2025-06-03T11:41:12+02:00
    conf: fix sourcedir reloading to not multiply sources
    
    The sourcedir reload triggered by the chronyc "reload sources"
    command incorrectly assumed that NSR_AddSourceByName() can return
    only the NSR_Success status when a source is added. It ignored the
    NSR_UnresolvedName status returned for a source whose name needs to
    be resolved after the call (i.e. not specified with an IP address)
    and added the source again, effectively multiplying it if the name
    can be resolved to a different IP address.
    
    Fix the code to check for the NSR_UnresolvedName status to correctly
    determine whether the source was already added before and should not be
    added again.
    
    Reported-by: MichaelR <MichaelR42@xxxxxxxxxx>
    Fixes: 916ed70c4a81 ("conf: save source status in sourcedir reload")
    
  • 2c6cbde0
    by Miroslav Lichvar at 2025-06-03T13:28:46+02:00
    test: add 149-sourcedir test
    
  • c900dff3
    by Miroslav Lichvar at 2025-06-03T15:42:05+02:00
    test: fix tests for disabled cmdmon
    

6 changed files:



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/