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
F168230633: D57010.id.diff
Thu, Aug 27, 1:51 AM
F168226943: D57010.id178198.diff
Thu, Aug 27, 1:17 AM
F168208440: D57010.id177874.diff
Wed, Aug 26, 9:56 PM
F168206209: D57010.diff
Wed, Aug 26, 9:35 PM
Unknown Object (File)
Thu, Aug 13, 2:37 AM
Unknown Object (File)
Thu, Aug 13, 12:29 AM
Unknown Object (File)
Wed, Aug 12, 2:12 AM
Unknown Object (File)
Tue, Aug 11, 11:25 PM

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.