diff options
author | Thomas Haller <thaller@redhat.com> | 2022-01-28 18:48:13 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-02-02 11:08:30 +0100 |
commit | d7a951b947c84c94f064b763408f1bc81da9d2fd (patch) | |
tree | a1fb04dda43aa6acc98498badd520f6ad4ecc2c6 | |
parent | f00980e5cae536d35e39e28e2b796de1d7f27f4c (diff) |
l3cfg: add comment to _acd_data_collect_tracks_data() about linear search
-rw-r--r-- | src/core/nm-l3cfg.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/nm-l3cfg.c b/src/core/nm-l3cfg.c index fc3b427894..1ac477275d 100644 --- a/src/core/nm-l3cfg.c +++ b/src/core/nm-l3cfg.c @@ -1334,6 +1334,15 @@ _acd_data_collect_tracks_data(const AcdData *acd_data, guint n = 0; guint i; + /* We do a simple search over all track-infos for the best, which determines + * our ACD state. That is, we prefer ACD disabled, and otherwise the + * shortest configured timeout. + * + * This linear search is probably fast enough, because we expect that each + * address/acd_data has few trackers. + * The alternative would be caching the best result, but that is more complicated, + * so not done. */ + for (i = 0; i < acd_data->info.n_track_infos; i++) { const NML3AcdAddrTrackInfo *acd_track = &acd_data->info.track_infos[i]; |