[Bug 268378] parsing error in network.subr can result in infinite loop on bootup

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 14 Dec 2022 18:57:59 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268378

--- Comment #1 from jyoung15@gmail.com ---
Comment on attachment 238789
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=238789
network.subr ifalias_af_common_handler patch

>--- /etc/network.subr   2022-12-13 22:55:03.480523000 -0500
>+++ /etc/network.subr   2022-12-14 12:24:00.168988000 -0500
>@@ -1047,14 +1047,11 @@
>                esac
>        done
>        # Process the last component if any.
>-       if [ -n "$_tmpargs}" ]; then
>-               case $_tmpargs in
>-               ${_af}\ *[0-9a-fA-F]-*)
>+       if [ -n "$_tmpargs" ]; then
>+               if expr "$_tmpargs" : ${_af}' \{1,\}[0-9a-fA-F.:]\{1,\}-[0-9a-fA-F.:]\{1,\}/[0-9]\{1,\}' >/dev/null 2>&1; then
>                        ifalias_af_common_handler $_if $_af $_action \
>                        `ifalias_expand_addr $_af $_action ${_tmpargs#${_af}\ }`
>-               ;;
>-               ${_af}\ *)
>+               elif expr "$_tmpargs" : "${_af} " >/dev/null 2>&1; then
>                        ${IFCONFIG_CMD} $_if $_tmpargs $_action && _ret=0
>-               ;;
>-               esac
>+               fi
>        fi
>
>        return $_ret

-- 
You are receiving this mail because:
You are the assignee for the bug.