From 82237a3344b6db40d620b7d4434d279c080a387c Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 18 Feb 2020 13:03:50 +0100 Subject: [PATCH] shared/trivial: add code comment to nm_utils_ifname_valid_kernel() (cherry picked from commit eb74d5f65f4403214071196d4673cbfdd8d27012) --- shared/nm-glib-aux/nm-shared-utils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shared/nm-glib-aux/nm-shared-utils.c b/shared/nm-glib-aux/nm-shared-utils.c index e75d7fa5fe..d47c465c62 100644 --- a/shared/nm-glib-aux/nm-shared-utils.c +++ b/shared/nm-glib-aux/nm-shared-utils.c @@ -3995,6 +3995,10 @@ nm_utils_ifname_valid_kernel (const char *name, GError **error) { int i; + /* This function follows kernel's interface validation + * function dev_valid_name() in net/core/dev.c. + */ + if (!name) { g_set_error_literal (error, NM_UTILS_ERROR, NM_UTILS_ERROR_UNKNOWN, _("interface name is missing"));