Page MenuHomeFreeBSD

network.subr: Fix infinite loop
ClosedPublic

Authored by cy on Dec 19 2022, 7:07 PM.
Tags
None
Referenced Files
F102585268: D37748.diff
Thu, Nov 14, 10:01 AM
Unknown Object (File)
Sat, Nov 2, 5:50 PM
Unknown Object (File)
Sat, Nov 2, 5:50 PM
Unknown Object (File)
Sat, Nov 2, 5:50 PM
Unknown Object (File)
Sat, Nov 2, 5:41 PM
Unknown Object (File)
Sat, Nov 2, 4:46 AM
Unknown Object (File)
Sat, Nov 2, 4:46 AM
Unknown Object (File)
Sat, Oct 26, 8:26 PM

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.