Change in openvpn[master]: t_client.sh.in: Check whether addresses are in "tentative" state
A message that is not in the archive (sent off-list or not yet received): gerrit.1787928357000.I07b373851175d865abdb1513f90655b3fa31d5fa@gerrit.openvpn.net
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1882?usp=email
to review the following change.
Change subject: t_client.sh.in: Check whether addresses are in "tentative" state
......................................................................
t_client.sh.in: Check whether addresses are in "tentative" state
We see this sometimes with IPv6 addresses (especially in t_server context). Make sure we wait until the tentative state is removed. Otherwise we might get spurious failures on comparing state.
---
M tests/t_client.sh.in
1 file changed, 17 insertions(+), 0 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/82/1882/1
tests/t_client.sh.in +17 -0
@@ -264,6 +264,20 @@ } # ---------------------------------------------------------- +# check ifconfig output on whether some address is in "tentative" state +# repeats calling get_ifconfig_route until it does not +# arg1: log file +check_tentative_state() +{ + logfile="$1" + while grep -q tentative $logfile; do + output "waiting for tentative state to end" + sleep 1 + get_ifconfig_route >$logfile + done +} + +# ---------------------------------------------------------- # check ifconfig # arg1: "4" or "6" -> for message # arg2: IPv4/IPv6 address that must show up in out of "get_ifconfig_route"
@@ -392,6 +406,7 @@ output "save pre-openvpn ifconfig + route" get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route_pre.txt + check_tentative_state $LOGDIR/$SUF:ifconfig_route_pre.txt output "\nrun pre-openvpn ping tests - targets must not be reachable..." run_ping_tests 4 want_fail "$ping4_hosts"
@@ -498,6 +513,7 @@ # compare whether anything changed in ifconfig/route setup? output "save ifconfig+route" get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route.txt + check_tentative_state $LOGDIR/$SUF:ifconfig_route.txt if [ "$expect_ifconfig4" = "-" ]; then output "skip ifconfig+route check"
@@ -535,6 +551,7 @@ output "\nsave post-openvpn ifconfig + route..." get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route_post.txt + check_tentative_state $LOGDIR/$SUF:ifconfig_route_post.txt output -n "compare pre- and post-openvpn ifconfig + route..." if diff $LOGDIR/$SUF:ifconfig_route_pre.txt \
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1882?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I07b373851175d865abdb1513f90655b3fa31d5fa
Gerrit-Change-Number: 1882
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Attention is currently required from: flichtenheld, plaisthos.
razvanc has posted comments on this change by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1882?usp=email )
Change subject: t_client.sh.in: Check whether addresses are in "tentative" state
......................................................................
Patch Set 1:
(1 comment)
File tests/t_client.sh.in:
http://gerrit.openvpn.net/c/openvpn/+/1882/comment/98f5c54e_87c3b0c0?usp=email :
PS1, Line 277: done
Probably unlikely to happen, but since this is unbounded it could theoretically hang.
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1882?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I07b373851175d865abdb1513f90655b3fa31d5fa
Gerrit-Change-Number: 1882
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-CC: razvanc <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]>
Gerrit-Comment-Date: Sun, 30 Aug 2026 16:21:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Attention is currently required from: flichtenheld, plaisthos.
cron2 has posted comments on this change by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1882?usp=email )
Change subject: t_client.sh.in: Check whether addresses are in "tentative" state
......................................................................
Patch Set 1:
(1 comment)
File tests/t_client.sh.in:
http://gerrit.openvpn.net/c/openvpn/+/1882/comment/3d8d15b5_b422f033?usp=email :
PS1, Line 277: done
Quoted 1 line
Probably unlikely to happen, but since this is unbounded it could theoretically hang.
good catch. Indeed, we should error out if this happens for longer than something - maybe 30 seconds? I've seen IPv6 get stuck in tentative state on FreeBSD, and we should not hang.
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1882?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I07b373851175d865abdb1513f90655b3fa31d5fa
Gerrit-Change-Number: 1882
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: cron2 <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-CC: razvanc <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]>
Gerrit-Comment-Date: Sun, 30 Aug 2026 17:28:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: razvanc <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Attention is currently required from: flichtenheld, plaisthos.
razvanc has posted comments on this change by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1882?usp=email )
Change subject: t_client.sh.in: Check whether addresses are in "tentative" state
......................................................................
Patch Set 1: Code-Review-1
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1882?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I07b373851175d865abdb1513f90655b3fa31d5fa
Gerrit-Change-Number: 1882
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-Reviewer: razvanc <[email protected]>
Gerrit-CC: cron2 <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]>
Gerrit-Comment-Date: Wed, 16 Sep 2026 14:03:06 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Attention is currently required from: Arne Schwabe, Frank Lichtenheld, Răzvan Cojocaru.
Hello Arne Schwabe, Răzvan Cojocaru,
I'd like you to reexamine a change. Please visit
https://gerrit.openvpn.net/c/openvpn/+/1882?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review-1 by Răzvan Cojocaru
Change subject: t_client.sh.in: Check whether addresses are in "tentative" state
......................................................................
t_client.sh.in: Check whether addresses are in "tentative" state
We see this sometimes with IPv6 addresses (especially in t_server context). Make sure we wait until the tentative state is removed. Otherwise we might get spurious failures on comparing state.
---
M tests/t_client.sh.in
1 file changed, 33 insertions(+), 0 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/82/1882/2
tests/t_client.sh.in +33 -0
@@ -264,6 +264,27 @@ } # ---------------------------------------------------------- +# check ifconfig output on whether some address is in "tentative" state +# repeats calling get_ifconfig_route until it does not +# arg1: log file +check_tentative_state() +{ + logfile="$1" + network_tentative_check=0 + while grep -q tentative $logfile; do + output "waiting for tentative state to end ($network_tentative_check)" + if [ "$network_tentative_check" -ge 30 ]; then + fail "network interface stuck in tentative state" + return 1 + fi + sleep 1 + network_tentative_check=$((network_tentative_check + 1)) + get_ifconfig_route >$logfile + done + return 0 +} + +# ---------------------------------------------------------- # check ifconfig # arg1: "4" or "6" -> for message # arg2: IPv4/IPv6 address that must show up in out of "get_ifconfig_route"
@@ -392,6 +413,10 @@ output "save pre-openvpn ifconfig + route" get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route_pre.txt + if ! check_tentative_state $LOGDIR/$SUF:ifconfig_route_pre.txt; then + printf "$outbuf" + exit 1 + fi output "\nrun pre-openvpn ping tests - targets must not be reachable..." run_ping_tests 4 want_fail "$ping4_hosts"
@@ -498,6 +523,10 @@ # compare whether anything changed in ifconfig/route setup? output "save ifconfig+route" get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route.txt + if ! check_tentative_state $LOGDIR/$SUF:ifconfig_route.txt; then + printf "$outbuf" + exit 1 + fi if [ "$expect_ifconfig4" = "-" ]; then output "skip ifconfig+route check"
@@ -535,6 +564,10 @@ output "\nsave post-openvpn ifconfig + route..." get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route_post.txt + if ! check_tentative_state $LOGDIR/$SUF:ifconfig_route_post.txt; then + printf "$outbuf" + exit 1 + fi output -n "compare pre- and post-openvpn ifconfig + route..." if diff $LOGDIR/$SUF:ifconfig_route_pre.txt \
--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/1882?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I07b373851175d865abdb1513f90655b3fa31d5fa
Gerrit-Change-Number: 1882
Gerrit-PatchSet: 2
Gerrit-Owner: Frank Lichtenheld <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-Reviewer: Răzvan Cojocaru <[email protected]>
Gerrit-CC: Gert Doering <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Răzvan Cojocaru <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
Gerrit-Attention: Frank Lichtenheld <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Attention is currently required from: Arne Schwabe, Gert Doering, Răzvan Cojocaru.
Frank Lichtenheld has posted comments on this change by Frank Lichtenheld. ( https://gerrit.openvpn.net/c/openvpn/+/1882?usp=email )
Change subject: t_client.sh.in: Check whether addresses are in "tentative" state
......................................................................
Patch Set 2:
(1 comment)
File tests/t_client.sh.in:
https://gerrit.openvpn.net/c/openvpn/+/1882/comment/da21a0dc_9e447718?usp=email :
PS1, Line 277: done
Quoted 1 line
good catch. […]
Done
--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/1882?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I07b373851175d865abdb1513f90655b3fa31d5fa
Gerrit-Change-Number: 1882
Gerrit-PatchSet: 2
Gerrit-Owner: Frank Lichtenheld <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-Reviewer: Răzvan Cojocaru <[email protected]>
Gerrit-CC: Gert Doering <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Răzvan Cojocaru <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
Gerrit-Attention: Gert Doering <[email protected]>
Gerrit-Comment-Date: Fri, 09 Oct 2026 14:50:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Răzvan Cojocaru <[email protected]>
Comment-In-Reply-To: Gert Doering <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Attention is currently required from: Arne Schwabe, Frank Lichtenheld, Gert Doering.
Răzvan Cojocaru has posted comments on this change by Frank Lichtenheld. ( https://gerrit.openvpn.net/c/openvpn/+/1882?usp=email )
Change subject: t_client.sh.in: Check whether addresses are in "tentative" state
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/1882?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I07b373851175d865abdb1513f90655b3fa31d5fa
Gerrit-Change-Number: 1882
Gerrit-PatchSet: 2
Gerrit-Owner: Frank Lichtenheld <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-Reviewer: Răzvan Cojocaru <[email protected]>
Gerrit-CC: Gert Doering <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
Gerrit-Attention: Gert Doering <[email protected]>
Gerrit-Attention: Frank Lichtenheld <[email protected]>
Gerrit-Comment-Date: Fri, 09 Oct 2026 15:05:28 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
PATCH v2 1/1 t_client.sh.in: Check whether addresses are in "tentative" state
In reply to a message not in the archiveWe see this sometimes with IPv6 addresses (especially in t_server context). Make sure we wait until the tentative state is removed. Otherwise we might get spurious failures on comparing state.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1882
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1882
This mail reflects revision 2 of this Change.
Acked-by according to Gerrit (reflected above):
Razvan Cojocaru <[email protected]>
tests/t_client.sh.in +33 -0
@@ -264,6 +264,27 @@ } # ---------------------------------------------------------- +# check ifconfig output on whether some address is in "tentative" state +# repeats calling get_ifconfig_route until it does not +# arg1: log file +check_tentative_state() +{ + logfile="$1" + network_tentative_check=0 + while grep -q tentative $logfile; do + output "waiting for tentative state to end ($network_tentative_check)" + if [ "$network_tentative_check" -ge 30 ]; then + fail "network interface stuck in tentative state" + return 1 + fi + sleep 1 + network_tentative_check=$((network_tentative_check + 1)) + get_ifconfig_route >$logfile + done + return 0 +} + +# ---------------------------------------------------------- # check ifconfig # arg1: "4" or "6" -> for message # arg2: IPv4/IPv6 address that must show up in out of "get_ifconfig_route"
@@ -392,6 +413,10 @@ output "save pre-openvpn ifconfig + route" get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route_pre.txt + if ! check_tentative_state $LOGDIR/$SUF:ifconfig_route_pre.txt; then + printf "$outbuf" + exit 1 + fi output "\nrun pre-openvpn ping tests - targets must not be reachable..." run_ping_tests 4 want_fail "$ping4_hosts"
@@ -498,6 +523,10 @@ # compare whether anything changed in ifconfig/route setup? output "save ifconfig+route" get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route.txt + if ! check_tentative_state $LOGDIR/$SUF:ifconfig_route.txt; then + printf "$outbuf" + exit 1 + fi if [ "$expect_ifconfig4" = "-" ]; then output "skip ifconfig+route check"
@@ -535,6 +564,10 @@ output "\nsave post-openvpn ifconfig + route..." get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route_post.txt + if ! check_tentative_state $LOGDIR/$SUF:ifconfig_route_post.txt; then + printf "$outbuf" + exit 1 + fi output -n "compare pre- and post-openvpn ifconfig + route..." if diff $LOGDIR/$SUF:ifconfig_route_pre.txt \
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
PATCH v2 1/1 t_client.sh.in: Check whether addresses are in "tentative" state
In reply to a message not in the archiveFrom: Frank Lichtenheld <[email protected]>
We see this sometimes with IPv6 addresses (especially in t_server context). Make sure we wait until the tentative state is removed. Otherwise we might get spurious failures on comparing state.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1882
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1882
This mail reflects revision 2 of this Change.
Acked-by according to Gerrit (reflected above):
Razvan Cojocaru <[email protected]>
tests/t_client.sh.in +33 -0
@@ -264,6 +264,27 @@ } # ---------------------------------------------------------- +# check ifconfig output on whether some address is in "tentative" state +# repeats calling get_ifconfig_route until it does not +# arg1: log file +check_tentative_state() +{ + logfile="$1" + network_tentative_check=0 + while grep -q tentative $logfile; do + output "waiting for tentative state to end ($network_tentative_check)" + if [ "$network_tentative_check" -ge 30 ]; then + fail "network interface stuck in tentative state" + return 1 + fi + sleep 1 + network_tentative_check=$((network_tentative_check + 1)) + get_ifconfig_route >$logfile + done + return 0 +} + +# ---------------------------------------------------------- # check ifconfig # arg1: "4" or "6" -> for message # arg2: IPv4/IPv6 address that must show up in out of "get_ifconfig_route"
@@ -392,6 +413,10 @@ output "save pre-openvpn ifconfig + route" get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route_pre.txt + if ! check_tentative_state $LOGDIR/$SUF:ifconfig_route_pre.txt; then + printf "$outbuf" + exit 1 + fi output "\nrun pre-openvpn ping tests - targets must not be reachable..." run_ping_tests 4 want_fail "$ping4_hosts"
@@ -498,6 +523,10 @@ # compare whether anything changed in ifconfig/route setup? output "save ifconfig+route" get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route.txt + if ! check_tentative_state $LOGDIR/$SUF:ifconfig_route.txt; then + printf "$outbuf" + exit 1 + fi if [ "$expect_ifconfig4" = "-" ]; then output "skip ifconfig+route check"
@@ -535,6 +564,10 @@ output "\nsave post-openvpn ifconfig + route..." get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route_post.txt + if ! check_tentative_state $LOGDIR/$SUF:ifconfig_route_post.txt; then + printf "$outbuf" + exit 1 + fi output -n "compare pre- and post-openvpn ifconfig + route..." if diff $LOGDIR/$SUF:ifconfig_route_pre.txt \
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
[Openvpn-devel] [PATCH applied] Re: t_client.sh.in: Check whether addresses are in tentative state
I do not have a scenario where I can reliably trigger this problem right now, but I do have seen test fails with IPv6 ping on TAP interfaces that ended up being "the address is not usable yet, because stuck in tentative state" - which is not OpenVPN's fault, so this patch hopefully makes the underlying problem more visible (not just "ping failed, guess why!").
Your patch has been applied to the master and release/2.7 branch ("test infrastructure improvements").
commit e2548f6e3b7f9ed3d24020319117b17f30743656 (master) commit 2630e656467fba36d25af258041320804aa44a7d (release/2.7)
Author: Frank Lichtenheld Date: Fri Oct 9 19:04:52 2026 +0200
t_client.sh.in: Check whether addresses are in tentative state
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1882
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg39810.html
--
kind regards,
Gert Doering
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Gert Doering has uploaded a new patch set (#3) to the change originally created by Frank Lichtenheld. ( https://gerrit.openvpn.net/c/openvpn/+/1882?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by Răzvan Cojocaru
Change subject: t_client.sh.in: Check whether addresses are in "tentative" state
......................................................................
t_client.sh.in: Check whether addresses are in "tentative" state
We see this sometimes with IPv6 addresses (especially in t_server context). Make sure we wait until the tentative state is removed. Otherwise we might get spurious failures on comparing state.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1882
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg39810.html
---
M tests/t_client.sh.in
1 file changed, 33 insertions(+), 0 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/82/1882/3
tests/t_client.sh.in +33 -0
@@ -264,6 +264,27 @@ } # ---------------------------------------------------------- +# check ifconfig output on whether some address is in "tentative" state +# repeats calling get_ifconfig_route until it does not +# arg1: log file +check_tentative_state() +{ + logfile="$1" + network_tentative_check=0 + while grep -q tentative $logfile; do + output "waiting for tentative state to end ($network_tentative_check)" + if [ "$network_tentative_check" -ge 30 ]; then + fail "network interface stuck in tentative state" + return 1 + fi + sleep 1 + network_tentative_check=$((network_tentative_check + 1)) + get_ifconfig_route >$logfile + done + return 0 +} + +# ---------------------------------------------------------- # check ifconfig # arg1: "4" or "6" -> for message # arg2: IPv4/IPv6 address that must show up in out of "get_ifconfig_route"
@@ -392,6 +413,10 @@ output "save pre-openvpn ifconfig + route" get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route_pre.txt + if ! check_tentative_state $LOGDIR/$SUF:ifconfig_route_pre.txt; then + printf "$outbuf" + exit 1 + fi output "\nrun pre-openvpn ping tests - targets must not be reachable..." run_ping_tests 4 want_fail "$ping4_hosts"
@@ -498,6 +523,10 @@ # compare whether anything changed in ifconfig/route setup? output "save ifconfig+route" get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route.txt + if ! check_tentative_state $LOGDIR/$SUF:ifconfig_route.txt; then + printf "$outbuf" + exit 1 + fi if [ "$expect_ifconfig4" = "-" ]; then output "skip ifconfig+route check"
@@ -535,6 +564,10 @@ output "\nsave post-openvpn ifconfig + route..." get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route_post.txt + if ! check_tentative_state $LOGDIR/$SUF:ifconfig_route_post.txt; then + printf "$outbuf" + exit 1 + fi output -n "compare pre- and post-openvpn ifconfig + route..." if diff $LOGDIR/$SUF:ifconfig_route_pre.txt \
--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/1882?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I07b373851175d865abdb1513f90655b3fa31d5fa
Gerrit-Change-Number: 1882
Gerrit-PatchSet: 3
Gerrit-Owner: Frank Lichtenheld <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-Reviewer: Răzvan Cojocaru <[email protected]>
Gerrit-CC: Gert Doering <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Gert Doering has submitted this change. ( https://gerrit.openvpn.net/c/openvpn/+/1882?usp=email )
Change subject: t_client.sh.in: Check whether addresses are in "tentative" state
......................................................................
t_client.sh.in: Check whether addresses are in "tentative" state
We see this sometimes with IPv6 addresses (especially in t_server context). Make sure we wait until the tentative state is removed. Otherwise we might get spurious failures on comparing state.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1882
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg39810.html
---
M tests/t_client.sh.in
1 file changed, 33 insertions(+), 0 deletions(-)
tests/t_client.sh.in +33 -0
@@ -264,6 +264,27 @@ } # ---------------------------------------------------------- +# check ifconfig output on whether some address is in "tentative" state +# repeats calling get_ifconfig_route until it does not +# arg1: log file +check_tentative_state() +{ + logfile="$1" + network_tentative_check=0 + while grep -q tentative $logfile; do + output "waiting for tentative state to end ($network_tentative_check)" + if [ "$network_tentative_check" -ge 30 ]; then + fail "network interface stuck in tentative state" + return 1 + fi + sleep 1 + network_tentative_check=$((network_tentative_check + 1)) + get_ifconfig_route >$logfile + done + return 0 +} + +# ---------------------------------------------------------- # check ifconfig # arg1: "4" or "6" -> for message # arg2: IPv4/IPv6 address that must show up in out of "get_ifconfig_route"
@@ -392,6 +413,10 @@ output "save pre-openvpn ifconfig + route" get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route_pre.txt + if ! check_tentative_state $LOGDIR/$SUF:ifconfig_route_pre.txt; then + printf "$outbuf" + exit 1 + fi output "\nrun pre-openvpn ping tests - targets must not be reachable..." run_ping_tests 4 want_fail "$ping4_hosts"
@@ -498,6 +523,10 @@ # compare whether anything changed in ifconfig/route setup? output "save ifconfig+route" get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route.txt + if ! check_tentative_state $LOGDIR/$SUF:ifconfig_route.txt; then + printf "$outbuf" + exit 1 + fi if [ "$expect_ifconfig4" = "-" ]; then output "skip ifconfig+route check"
@@ -535,6 +564,10 @@ output "\nsave post-openvpn ifconfig + route..." get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route_post.txt + if ! check_tentative_state $LOGDIR/$SUF:ifconfig_route_post.txt; then + printf "$outbuf" + exit 1 + fi output -n "compare pre- and post-openvpn ifconfig + route..." if diff $LOGDIR/$SUF:ifconfig_route_pre.txt \
--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/1882?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I07b373851175d865abdb1513f90655b3fa31d5fa
Gerrit-Change-Number: 1882
Gerrit-PatchSet: 3
Gerrit-Owner: Frank Lichtenheld <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-Reviewer: Răzvan Cojocaru <[email protected]>
Gerrit-CC: Gert Doering <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel