mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 22:48:01 +02:00
all,trivial: include kernel versions and release dates in comments
This will make us stop worry how relevant are chunks of compat code with older kernels when deciding whether it's worth supporting/testing them. As if we actually were testing old kernels.
This commit is contained in:
parent
8670aacc7c
commit
1b3a0208d9
3 changed files with 12 additions and 8 deletions
|
|
@ -2146,7 +2146,7 @@ monotonic_timestamp_get (struct timespec *tp)
|
|||
break;
|
||||
case 2:
|
||||
/* fallback, return CLOCK_MONOTONIC. Kernels prior to 2.6.39
|
||||
* don't support CLOCK_BOOTTIME. */
|
||||
* (released on 18 May, 2011) don't support CLOCK_BOOTTIME. */
|
||||
err = clock_gettime (CLOCK_MONOTONIC, tp);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -304,6 +304,7 @@ _support_user_ipv6ll_detect (struct nlattr **tb)
|
|||
|
||||
nm_assert (_support_user_ipv6ll_still_undecided ());
|
||||
|
||||
/* IFLA_INET6_ADDR_GEN_MODE was added in kernel 3.17, dated 5 October, 2014. */
|
||||
supported = !!tb[IFLA_INET6_ADDR_GEN_MODE];
|
||||
_support_user_ipv6ll = supported ? 1 : -1;
|
||||
_LOG2D ("kernel-support: IFLA_INET6_ADDR_GEN_MODE: %s",
|
||||
|
|
@ -348,8 +349,11 @@ _support_kernel_extended_ifa_flags_detect (struct nl_msg *msg)
|
|||
|
||||
/* see if the nl_msg contains the IFA_FLAGS attribute. If it does,
|
||||
* we assume, that the kernel supports extended flags, IFA_F_MANAGETEMPADDR
|
||||
* and IFA_F_NOPREFIXROUTE (they were added together).
|
||||
**/
|
||||
* and IFA_F_NOPREFIXROUTE for IPv6. They were added together in kernel 3.14,
|
||||
* dated 30 March, 2014.
|
||||
*
|
||||
* For IPv4, IFA_F_NOPREFIXROUTE was added later, but there is no easy
|
||||
* way to detect kernel support. */
|
||||
support = !!nlmsg_find_attr (msg_hdr, sizeof (struct ifaddrmsg), IFA_FLAGS);
|
||||
_support_kernel_extended_ifa_flags = support ? 1 : -1;
|
||||
_LOG2D ("kernel-support: extended-ifa-flags: %s", support ? "detected" : "not detected");
|
||||
|
|
|
|||
|
|
@ -791,7 +791,7 @@ test_software_detect (gconstpointer user_data)
|
|||
* namespaced, the creation can fail if a macvtap in another namespace
|
||||
* has the same index. Try to detect this situation and skip already
|
||||
* used indexes.
|
||||
* http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=17af2bce88d31e65ed73d638bb752d2e13c66ced
|
||||
* The fix (17af2bce) is included kernel 4.7, dated 24 July, 2016.
|
||||
*/
|
||||
for (i = ifindex_parent + 1; i < ifindex_parent + 100; i++) {
|
||||
snprintf (buf, sizeof (buf), "/sys/class/macvtap/tap%d", i);
|
||||
|
|
@ -1728,8 +1728,8 @@ test_nl_bugs_veth (void)
|
|||
pllink_veth0 = nm_platform_link_get (NM_PLATFORM_GET, ifindex_veth0);
|
||||
g_assert (pllink_veth0);
|
||||
if (pllink_veth0->parent == 0) {
|
||||
/* pre-4.1 kernels don't support exposing the veth peer as IFA_LINK. skip the remainder
|
||||
* of the test. */
|
||||
/* Kernels prior to 4.1 dated 21 June, 2015 don't support exposing the veth peer
|
||||
* as IFA_LINK. skip the remainder of the test. */
|
||||
goto out;
|
||||
}
|
||||
g_assert_cmpint (pllink_veth0->parent, ==, ifindex_veth1);
|
||||
|
|
@ -2023,8 +2023,8 @@ test_netns_general (gpointer fixture, gconstpointer test_data)
|
|||
_sysctl_assert_eq (platform_1, "/proc/sys/net/ipv6/conf/dummy2b/disable_ipv6", NULL);
|
||||
_sysctl_assert_eq (platform_2, "/proc/sys/net/ipv6/conf/dummy2a/disable_ipv6", NULL);
|
||||
|
||||
/* older kernels (Ubuntu 12.04) don't support ethtool -i for dummy devices. Work around that and
|
||||
* skip asserts that are known to fail. */
|
||||
/* Kernels prior to 3.19 dated 8 February, 2015 don't support ethtool -i for dummy devices.
|
||||
* Work around that and skip asserts that are known to fail. */
|
||||
ethtool_support = nmtstp_run_command ("ethtool -i dummy1_ > /dev/null") == 0;
|
||||
if (ethtool_support) {
|
||||
g_assert (nmp_utils_ethtool_get_driver_info (nmtstp_link_get_typed (platform_1, 0, "dummy1_", NM_LINK_TYPE_DUMMY)->ifindex, &driver_info));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue