Page MenuHomeFreeBSD

sbin/ipfw: fix parsing error in nat config port_range
ClosedPublic

Authored by terehovv_mail.ru on May 15 2026, 9:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 20, 9:50 AM
Unknown Object (File)
Sat, Sep 19, 7:01 PM
Unknown Object (File)
Thu, Sep 17, 1:09 AM
Unknown Object (File)
Sun, Sep 13, 1:07 AM
Unknown Object (File)
Sat, Sep 12, 11:57 AM
Unknown Object (File)
Fri, Sep 11, 5:56 PM
Unknown Object (File)
Thu, Sep 10, 9:12 PM
Unknown Object (File)
Tue, Sep 8, 8:42 AM

Diff Detail

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

Event Timeline

Fix tests for nat:ipfw_portalias

Added set -e to the test script to ensure it is correct

Code is fine, some finishing touches are needed.

sbin/ipfw/nat.c
771

I would use base = 0 here, no reason to limit port range to be in decimal form.

772

ipfw.8 must be changed to reflect port range limits:

port_range lower-upper
        Set the aliasing ports between the ranges given.  Upper port has
        to be greater than lower.

Update ipfw.8 man page
Update strtol() to use base = 0

This revision is now accepted and ready to land.May 20 2026, 1:55 PM
This revision was automatically updated to reflect the committed changes.