Commit 1b3a0208 authored by Lubomir Rintel's avatar Lubomir Rintel 🥕 Committed by Thomas Haller

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.
parent 8670aacc
......@@ -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));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment