Page MenuHomeFreeBSD

sbin/ipfw: Allow tablearg as hostname
ClosedPublic

Authored by donner on May 11 2021, 8:26 AM.
Tags
None
Referenced Files
F132671476: D30208.id.diff
Sat, Oct 18, 10:38 PM
F132668522: D30208.id89009.diff
Sat, Oct 18, 10:04 PM
Unknown Object (File)
Sat, Oct 4, 6:06 AM
Unknown Object (File)
Sun, Sep 21, 7:40 PM
Unknown Object (File)
Sep 6 2025, 11:26 AM
Unknown Object (File)
Sep 5 2025, 7:10 AM
Unknown Object (File)
Jul 13 2025, 7:34 AM
Unknown Object (File)
Jul 12 2025, 11:03 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable