Page MenuHomeFreeBSD

Fix ipfw/dnctl detection
ClosedPublic

Authored by meka_tilda.center on Fri, Nov 18, 5:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 30, 5:57 PM
Unknown Object (File)
Wed, Nov 30, 5:57 PM
Unknown Object (File)
Wed, Nov 30, 5:56 PM
Unknown Object (File)
Wed, Nov 30, 5:56 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.Tue, Nov 22, 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.