lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 3 Oct 2019 10:19:30 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     David Ahern <dsahern@...il.com>, David Ahern <dsahern@...nel.org>,
        davem@...emloft.net, jakub.kicinski@...ronome.com
Cc:     netdev@...r.kernel.org, rajendra.dendukuri@...adcom.com
Subject: Re: [PATCH net v2] ipv6: Handle race in addrconf_dad_work



On 10/3/19 9:32 AM, Eric Dumazet wrote:
> 

> 
> Still no luck for me :/
> 

One of the failing test was :

unshare -n
./traceroute_test.sh -I icmp


$ cat ./traceroute_test.sh
#!/bin/bash
#
# Test traceroute.
#
# This is a test to run traceroute with the given parameters. It sets up three
# containers, source, router, and destination, connected via two pairs of veth:
#
#  source veth0src<-->veth0rtr router veth1rtr<-->veth1dst destination
#
# Then it runs traceroutes from source to destination in the source container.

set -Euex

readonly src="src-$$"
readonly rtr="rtr-$$"
readonly dst="dst-$$"

readonly SRC_IP6='2002:a00:1::1/24'
readonly DST_IP6='2002:b00:1::1/24'
readonly RTR_SRC_IP6='2002:a00:1::2/24'
readonly RTR_DST_IP6='2002:b00:1::2/24'
readonly SRC_NET6='2002:a00::/24'
readonly DST_NET6='2002:b00::/24'
readonly SRC_IP4='10.0.1.1/24'
readonly DST_IP4='10.0.2.1/24'
readonly RTR_SRC_IP4='10.0.1.2/24'
readonly RTR_DST_IP4='10.0.2.2/24'

init() {
  ip netns add "${src}"
  ip netns add "${rtr}"
  ip netns add "${dst}"

  ip link add veth0rtr type veth peer name veth0src
  ip link add veth1rtr type veth peer name veth1dst
  ip link set veth0rtr netns "${rtr}"
  ip link set veth0src netns "${src}"
  ip link set veth1rtr netns "${rtr}"
  ip link set veth1dst netns "${dst}"
}

setup() {
  local -r NS="$1"
  local -r IF="$2"
  local -r IP4="$3"
  local -r IP6="$4"

  ip -n "${NS}" link set lo up

  ip -n "${NS}" link set "${IF}" up
  ip -n "${NS}" -4 addr add "${IP4}" dev "${IF}"
  ip -n "${NS}" -6 addr add "${IP6}" dev "${IF}" nodad
  ip netns exec "${NS}" sysctl net.ipv4.conf.all.forwarding=1
  ip netns exec "${NS}" sysctl net.ipv6.conf.all.forwarding=1
}

route() {
  ip -n "${src}" route add default via "${RTR_SRC_IP4%/*}"
  ip -n "${dst}" route add default via "${RTR_DST_IP4%/*}"

  ip -n "${rtr}" -6 route add "${SRC_NET6}" dev veth0rtr
  ip -n "${rtr}" -6 route add "${DST_NET6}" dev veth1rtr
  ip -n "${src}" -6 route add default dev veth0src
  ip -n "${dst}" -6 route add default dev veth1dst
  ip -n "${src}" -6 route add "${DST_NET6}" via "${RTR_SRC_IP6%/*}"
  ip -n "${dst}" -6 route add "${SRC_NET6}" via "${RTR_DST_IP6%/*}"
}

fini() {
  set +e

  # Run ping and ping6 to have reachability data in the logs, in case the
  # test fails. We want to know that whether a failure is casued because of
  # a regression for traceroute.
  ip netns exec "${src}" ping "${DST_IP4%/*}" -c 3
  ip netns exec "${src}" ping6 "${DST_IP6%/*}" -c 3

  ip netns del "${src}"
  ip netns del "${rtr}"
  ip netns del "${dst}"
}

chk_traceroute() {
  if [[ "$(grep '*' | wc -l)" != "0" ]]; then
    echo 'FAILED'
    exit 1
  fi
}

main() {
  trap fini EXIT

  init

  setup "${src}" veth0src "${SRC_IP4}" "${SRC_IP6}"
  setup "${dst}" veth1dst "${DST_IP4}" "${DST_IP6}"
  setup "${rtr}" veth0rtr "${RTR_SRC_IP4}" "${RTR_SRC_IP6}"
  setup "${rtr}" veth1rtr "${RTR_DST_IP4}" "${RTR_DST_IP6}"

  route

  sleep 1

  ip netns exec "${src}" traceroute "${DST_IP4%/*}" "$@" -4 -n -m 2 -z 1 | \
      chk_traceroute
  ip netns exec "${src}" traceroute "${DST_IP6%/*}" "$@" -6 -n -m 2 -z 1 | \
      chk_traceroute
  echo 'PASSED'
}

main "$@"; exit

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ