Page MenuHomeFreeBSD

Fix ipfw/dnctl detection
ClosedPublic

Authored by meka_tilda.center on Nov 18 2022, 5:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 2, 9:02 PM
Unknown Object (File)
Wed, Oct 2, 8:10 PM
Unknown Object (File)
Wed, Oct 2, 5:09 PM
Unknown Object (File)
Wed, Oct 2, 5:16 AM
Unknown Object (File)
Wed, Oct 2, 4:39 AM
Unknown Object (File)
Tue, Oct 1, 5:24 AM
Unknown Object (File)
Mon, Sep 30, 11:59 PM
Unknown Object (File)
Mon, Sep 30, 4:31 PM
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 Not Applicable
Unit
Tests Not Applicable

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.