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, Nov 28, 9:32 AM
Unknown Object (File)
Tue, Nov 26, 12:08 AM
Unknown Object (File)
Sat, Nov 23, 10:06 PM
Unknown Object (File)
Nov 14 2024, 1:21 AM
Unknown Object (File)
Nov 13 2024, 5:06 AM
Unknown Object (File)
Nov 5 2024, 8:17 AM
Unknown Object (File)
Oct 2 2024, 1:17 PM
Unknown Object (File)
Sep 23 2024, 10:53 PM
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