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:   Sun, 16 Dec 2018 21:21:18 +0100
From:   Petr Vorel <pvorel@...e.cz>
To:     Luca Boccassi <bluca@...ian.org>
Cc:     netdev@...r.kernel.org, stephen@...workplumber.org,
        petr.vorel@...il.com
Subject: Re: [PATCH iproute2 v2 4/4] testsuite: remove gre kmods if the test
 loads them

Hi Luca,

Reviewed-by: Petr Vorel <pvorel@...e.cz>
LGTM, but I'd suggest 2 small changes (see bellow).

> +++ b/testsuite/tests/ip/tunnel/add_tunnel.t

>  TUNNEL_NAME="tunnel_test_ip"
I'd put KMODS here:
KMODS="ip6_gre ip6_tunnel ip_gre ip_tunnel gre"

The reason is maintenance of this script - maybe one day there will be other
modules needed to be added, take this list as a configuration (which is usually
in shell scripts in the top).
BTW Maintenance was reason why I didn't like duplicity in modules you had in v1.

> +# unload kernel modules to remove dummy interfaces only if they were not in use beforehand
> +KMODS_REMOVE=
As a side effect, this could be lower case (showing it's not a configuration
variable, but just normal variable).

> +# note that checkbashism reports command -v, but dash supports it and it's POSIX 2008 compliant
> +if command -v lsmod >/dev/null 2>&1 && command -v rmmod >/dev/null 2>&1; then
> +    KMODS="ip6_gre ip6_tunnel ip_gre ip_tunnel gre"
> +    for i in $KMODS; do
> +        lsmod | grep -q "^$i" || KMODS_REMOVE="$KMODS_REMOVE $i";
> +    done
> +fi
> +
>  ts_log "[Testing add/del tunnels]"

>  ts_ip "$0" "Add GRE tunnel over IPv4" tunnel add name $TUNNEL_NAME mode gre local 1.1.1.1 remote 2.2.2.2
> @@ -12,3 +22,6 @@ ts_ip "$0" "Del GRE tunnel over IPv4" tunnel del $TUNNEL_NAME
>  ts_ip "$0" "Add GRE tunnel over IPv6" tunnel add name $TUNNEL_NAME mode ip6gre local dead:beef::1 remote dead:beef::2
>  ts_ip "$0" "Del GRE tunnel over IPv6" tunnel del $TUNNEL_NAME

> +for mod in $KMODS_REMOVE; do
> +    sudo rmmod "$mod"
> +done

Kind regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ