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, Jun 14, 12:56 AM
Unknown Object (File)
Sat, Jun 13, 11:46 PM
Unknown Object (File)
Fri, Jun 12, 1:10 AM
Unknown Object (File)
Fri, Jun 5, 2:28 PM
Unknown Object (File)
Fri, Jun 5, 2:24 PM
Unknown Object (File)
Fri, Jun 5, 12:15 PM
Unknown Object (File)
Fri, Jun 5, 12:11 PM
Unknown Object (File)
Fri, Jun 5, 5:23 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.