Page MenuHomeFreeBSD

sbin/ipfw: Allow tablearg as hostname
ClosedPublic

Authored by donner on May 11 2021, 8:26 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 19, 10:36 AM
Unknown Object (File)
Wed, Mar 18, 8:27 PM
Unknown Object (File)
Sat, Mar 14, 3:18 PM
Unknown Object (File)
Wed, Mar 11, 5:59 PM
Unknown Object (File)
Sat, Mar 7, 12:06 PM
Unknown Object (File)
Mon, Mar 2, 4:10 AM
Unknown Object (File)
Sat, Feb 28, 6:43 PM
Unknown Object (File)
Feb 8 2026, 4:24 AM
Subscribers

Details

Summary

Hostnames starting with "tablearg" are considered as a functional
argument instead of a literal.

Reported by: ae

Test Plan

The binary was supplied with some printf before and after the
transformation:

$ ipfw add fwd 0.0.0.0 from any to 'table(1)'
>>> 0.0.0.0 <<<
>>> 0.0.0.0 <<<

$ ipfw add fwd tablearg from any to 'table(1)'
>>> tablearg <<<
>>> 0.0.0.0 <<<

$ ipfw add fwd table,80 from any to 'table(1)'
>>> table,80 <<<
>>> table,80 <<<

$ ipfw add fwd tablearg,80 from any to 'table(1)'
>>> tablearg,80 <<<
>>> 0.0.0.0,80 <<<

$ ipfw add fwd tableargs.test from any to 'table(1)'
>>> tableargs.test <<<
>>> tableargs.test <<<

$ ipfw add fwd tablearg.local:80 from any to 'table(1)'
>>> tablearg.local:80 <<<
>>> tablearg.local:80 <<<

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 39115
Build 36004: arc lint + arc unit