aboutgitcodebugslistschat
path: root/contrib/qemu
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2025-03-12 14:43:59 +1100
committerStefano Brivio <sbrivio@redhat.com>2025-03-14 23:40:23 +0100
commit96fe5548cb16fe2664ad121c2976048ccad6a1ab (patch)
treef5ecbc7cefab8fa3b964d7a2372897b636c84903 /contrib/qemu
parent78f1f0fdfc1831f2ca3a65c2cee98c44ff3c30ab (diff)
downloadpasst-96fe5548cb16fe2664ad121c2976048ccad6a1ab.tar
passt-96fe5548cb16fe2664ad121c2976048ccad6a1ab.tar.gz
passt-96fe5548cb16fe2664ad121c2976048ccad6a1ab.tar.bz2
passt-96fe5548cb16fe2664ad121c2976048ccad6a1ab.tar.lz
passt-96fe5548cb16fe2664ad121c2976048ccad6a1ab.tar.xz
passt-96fe5548cb16fe2664ad121c2976048ccad6a1ab.tar.zst
passt-96fe5548cb16fe2664ad121c2976048ccad6a1ab.zip
conf: Unify several paths in conf_ports()
In conf_ports() we have three different paths which actually do the setup of an individual forwarded port: one for the "all" case, one for the exclusions only case and one for the range of ports with possible exclusions case. We can unify those cases using a new helper which handles a single range of ports, with a bitmap of exclusions. Although this is slightly longer (largely due to the new helpers function comment), it reduces duplicated logic. It will also make future improvements to the tracking of port forwards easier. The new conf_ports_range_except() function has a pretty prodigious parameter list, but I still think it's an overall improvement in conceptual complexity. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'contrib/qemu')
0 files changed, 0 insertions, 0 deletions