mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 12:10:10 +01:00
core: add FIXME(release-blocker) comments for match.kernel-command-line behavior
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/431#note_490830
This commit is contained in:
parent
755c3af915
commit
b7a2e73bd2
2 changed files with 23 additions and 1 deletions
|
|
@ -6099,6 +6099,28 @@ check_connection_compatible (NMDevice *self, NMConnection *connection, GError **
|
|||
proc_cmdline_i++;
|
||||
}
|
||||
|
||||
/* FIXME(release-blocker): match.interface-name and match.driver have the meaning,
|
||||
* that any of the matches may yield success. For match.kernel-command-line, we
|
||||
* do here that all must match. This inconsistency is undesired.
|
||||
*
|
||||
* 1) improve gtk-doc documentation explaining how these options match.
|
||||
*
|
||||
* 2) possibly unify the behavior so that kernel-command-line behaves like other
|
||||
* matches (and ANY may match). Note that this would be contrary to systemd's
|
||||
* Conditions, which by default requires that ALL conditions match (AND). We
|
||||
* should be consistent within our match options, and not with systemd here.
|
||||
*
|
||||
* 2b) Note that systemd supports special token like "=|", to indicate that
|
||||
* ANY behavior. If we want, we could also introduce two special prefixes
|
||||
* "&..." and "|...", to support either. It's slightly complicated how
|
||||
* these work in combinations with "!".
|
||||
* Unless we fully decide what we do about this, NMSettingMatch.verify() should
|
||||
* reject matches that start with '&' or '|', because these will be reserved for
|
||||
* future use.
|
||||
*
|
||||
* 3) while fixing this, this code should move to a separate function so we
|
||||
* can unit test the match of kernel command lines.
|
||||
*/
|
||||
if ( pos_patterns
|
||||
&& !found) {
|
||||
/* positive patterns configured but no match */
|
||||
|
|
|
|||
|
|
@ -2780,7 +2780,7 @@ again:
|
|||
if (G_UNLIKELY (!proc_cmdline)) {
|
||||
gs_free const char **split = NULL;
|
||||
|
||||
/* TODO: support quotation, like systemd's proc_cmdline_extract_first().
|
||||
/* FIXME(release-blocker): support quotation, like systemd's proc_cmdline_extract_first().
|
||||
* For that, add a new NMUtilsStrsplitSetFlags flag. */
|
||||
split = nm_utils_strsplit_set_full (nm_utils_proc_cmdline (),
|
||||
NM_ASCII_WHITESPACES,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue