Page MenuHomeFreeBSD

Fix ipfw/dnctl detection
ClosedPublic

Authored by meka_tilda.center on Nov 18 2022, 5:00 AM.
Tags
None
Referenced Files
F102417540: D37431.diff
Tue, Nov 12, 12:07 AM
Unknown Object (File)
Mon, Oct 28, 7:56 PM
Unknown Object (File)
Oct 2 2024, 9:02 PM
Unknown Object (File)
Oct 2 2024, 8:10 PM
Unknown Object (File)
Oct 2 2024, 5:09 PM
Unknown Object (File)
Oct 2 2024, 5:16 AM
Unknown Object (File)
Oct 2 2024, 4:39 AM
Unknown Object (File)
Oct 1 2024, 5:24 AM
Subscribers

Details

Summary

This diff fixes ipfw/dnctl detection. The bug it fixes is that running "dnctl" vs "/sbin/dnctl" gives different results.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

It looks like patch does two different things. That really needs to be two separate commits. One to add the dnctl startup script, and one to fix the dnctl/ipfw detection.

sbin/ipfw/main.c
685

That catches a problem, but I believe the usual way of fixing this is with basename(3).
That'll be a lot simpler than this string manipulation.

BASENAME(3)             FreeBSD Library Functions Manual             BASENAME(3)

NAME
     basename – extract the base portion of a pathname

SYNOPSIS
     #include <libgen.h>

     char *
     basename(char *path);

DESCRIPTION
     The basename() function returns the last component from the pathname
     pointed to by path, deleting any trailing ‘/’ characters.
meka_tilda.center retitled this revision from Fix ipfw/dnctl detection and add dnctl rc.d service to Fix ipfw/dnctl detection.
meka_tilda.center edited the summary of this revision. (Show Details)
This revision was not accepted when it landed; it landed in state Needs Review.Nov 22 2022, 9:41 AM
Closed by commit rG3599da158e39: ipfw: Fix ipfw/dnctl detection (authored by meka_tilda.center, committed by kp). · Explain Why
This revision was automatically updated to reflect the committed changes.