diff options
author | Thomas Haller <thaller@redhat.com> | 2020-02-18 13:03:50 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-02-18 13:23:50 +0100 |
commit | eb74d5f65f4403214071196d4673cbfdd8d27012 (patch) | |
tree | 59adb7097de6041fcbb0b1b681cedf26e7f39b0d | |
parent | 82fb8b00b49f9f4ed9a6b709aea28c45037d194b (diff) | |
download | NetworkManager-eb74d5f65f4403214071196d4673cbfdd8d27012.tar.gz |
shared/trivial: add code comment to nm_utils_ifname_valid_kernel()
-rw-r--r-- | shared/nm-glib-aux/nm-shared-utils.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/shared/nm-glib-aux/nm-shared-utils.c b/shared/nm-glib-aux/nm-shared-utils.c index 2ea1a57de3..aad16a7d00 100644 --- a/shared/nm-glib-aux/nm-shared-utils.c +++ b/shared/nm-glib-aux/nm-shared-utils.c @@ -4053,6 +4053,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")); |