Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Feb 2023 02:54:21 GMT
From:      Cy Schubert <cy@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 40455909e124 - stable/13 - network.subr: Fix infinite loop
Message-ID:  <202302010254.3112sLKa006338@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by cy:

URL: https://cgit.FreeBSD.org/src/commit/?id=40455909e124f41ba4b25194ed9991a1b71dce79

commit 40455909e124f41ba4b25194ed9991a1b71dce79
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2022-12-14 21:41:10 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2023-02-01 02:53:11 +0000

    network.subr: Fix infinite loop
    
    When setting up carp tunnel, using a password consisting of only the
    characters used as hexadecimal characters, i.e. abc-def, there will be
    an infinite loop in the shell function ifalias_af_common_handler().
    To circumvent this we test for " pass ".
    
    PR:             268378
    Reported by:    jyoung15@gmail.com
    Differential Revision:  https://reviews.freebsd.org/D37748
    
    (cherry picked from commit e3e57edf4aac05d041ca55ff2f008c6109ef88d5)
---
 libexec/rc/network.subr | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libexec/rc/network.subr b/libexec/rc/network.subr
index 76a5b94bc408..29ac06daefb2 100644
--- a/libexec/rc/network.subr
+++ b/libexec/rc/network.subr
@@ -1049,6 +1049,9 @@ ifalias_af_common_handler()
 	# Process the last component if any.
 	if [ -n "${_tmpargs}" ]; then
 		case $_tmpargs in
+		${_af}[[:space:]]pass[[:space:]]*)
+			${IFCONFIG_CMD} $_if $_tmpargs $_action && _ret=0
+		;;
 		${_af}[[:space:]]*[0-9a-fA-F]-*)
 			ifalias_af_common_handler $_if $_af $_action \
 			`ifalias_expand_addr $_af $_action ${_tmpargs#${_af}[[:space:]]}`



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302010254.3112sLKa006338>