diff --git a/src/nm-core-utils.c b/src/nm-core-utils.c index 5b3cc72a1f..b20653838d 100644 --- a/src/nm-core-utils.c +++ b/src/nm-core-utils.c @@ -2558,14 +2558,7 @@ _get_property_path (const char *ifname, ipv6 ? IPV6_PROPERTY_DIR : IPV4_PROPERTY_DIR, ifname, property); - - /* Ubuntu: don't assert, but log about the inconsistent size. */ - if (len > sizeof (path) - 1) { - nm_log_warn (LOGD_CORE, - "IPv6 property path is too long: '" - IPV6_PROPERTY_DIR "%s/%s'", - ifname, property); - } + g_assert (len < sizeof (path) - 1); return path; } @@ -2629,15 +2622,9 @@ NM_ASSERT_VALID_PATH_COMPONENT (const char *name) nm_log_err (LOGD_CORE, "Failed asserting path component: %s%s%s", NM_PRINT_FMT_QUOTED (name, "\"", name, "\"", "(null)")); - - /* Ubuntu: Don't outright fail, just return the name again. It's - * logged as being invalid, which is enough. - * There is a use of slashes in paths for oFono modems, which are - * actually valid paths to refer to an oFono modem, just don't map to - * anything on the filesystem. The following calls to sysctl paths can - * (and will) fail, but that's fine. - */ - return name; + g_error ("FATAL: Failed asserting path component: %s%s%s", + NM_PRINT_FMT_QUOTED (name, "\"", name, "\"", "(null)")); + g_assert_not_reached (); } gboolean