Page MenuHomeFreeBSD

network.subr: Fix infinite loop
ClosedPublic

Authored by cy on Dec 19 2022, 7:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 29 2023, 7:26 PM
Unknown Object (File)
Dec 26 2023, 12:01 PM
Unknown Object (File)
Dec 20 2023, 7:16 AM
Unknown Object (File)
Dec 5 2023, 11:51 PM
Unknown Object (File)
Nov 26 2023, 12:12 AM
Unknown Object (File)
Nov 23 2023, 6:43 PM
Unknown Object (File)
Nov 23 2023, 6:39 PM
Unknown Object (File)
Nov 23 2023, 8:15 AM

Details

Summary

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 ".

See PR/268378 for details.

This patch now includes globally replacing

\

with

[[:space]]

as suggested by eugen@.

Test Plan

Tested by PR submitter and by myself

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

cy requested review of this revision.Dec 19 2022, 7:07 PM

May I suggest to use

[[:space:]]

instead of

\

?

Just like clone_up() does it already.

May I suggest to use

[[:space:]]

instead of

\

?

Just like clone_up() does it already.

Good idea. This change of course will need two commits then. One to fix the other lines in the case structure. The second to add this patch. I'll resubmit both commits as one patch to this review.

cy edited the summary of this revision. (Show Details)

This new diff incorporates eugen@'s suggestion to use :space by replacing all "\ " with ":space" and fixing the original bug. This is two commits in my local repo.

cy edited the summary of this revision. (Show Details)
In D37748#859180, @cy wrote:

May I suggest to use

[[:space:]]

instead of

\

?

Just like clone_up() does it already.

Good idea. This change of course will need two commits then. One to fix the other lines in the case structure. The second to add this patch. I'll resubmit both commits as one patch to this review.

Not a good idea. :space is a bashism not supported by Bourne. I'll replace the \[\[:space\]\] with "\ ".

In D37748#859193, @cy wrote:
In D37748#859180, @cy wrote:

May I suggest to use

[[:space:]]

instead of

\

?

Just like clone_up() does it already.

Good idea. This change of course will need two commits then. One to fix the other lines in the case structure. The second to add this patch. I'll resubmit both commits as one patch to this review.

Not a good idea. :space is a bashism not supported by Bourne. I'll replace the \[\[:space\]\] with "\ ".

My mistake. I used the bashism instead of the Bourne supported syntax.

This uses the correct Bourne syntax instead of the bashism syntax. Sorry for the spam.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 2 2023, 6:21 PM
This revision was automatically updated to reflect the committed changes.