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
F169973958: D57010.diff
Thu, Sep 3, 3:48 AM
F169944213: D57010.id178301.diff
Thu, Sep 3, 1:28 AM
F169944093: D57010.id177871.diff
Thu, Sep 3, 1:28 AM
F169913205: D57010.diff
Wed, Sep 2, 11:01 PM
F169804518: D57010.id.diff
Wed, Sep 2, 3:07 PM
Unknown Object (File)
Wed, Sep 2, 10:23 AM
Unknown Object (File)
Wed, Sep 2, 9:35 AM
Unknown Object (File)
Tue, Sep 1, 10:38 PM

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

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
765

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

766

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.