diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2023-12-08 01:31:39 +1100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2023-12-27 19:29:45 +0100 |
commit | 5cada561863bb2bf95ef9bad6c18d6c306b82662 (patch) | |
tree | 8603261927408e269f4845e7a5879538de386659 /conf.c | |
parent | 24d1f6570b0b4ca09535d15d07511addc1e9c40f (diff) | |
download | passt-5cada561863bb2bf95ef9bad6c18d6c306b82662.tar passt-5cada561863bb2bf95ef9bad6c18d6c306b82662.tar.gz passt-5cada561863bb2bf95ef9bad6c18d6c306b82662.tar.bz2 passt-5cada561863bb2bf95ef9bad6c18d6c306b82662.tar.lz passt-5cada561863bb2bf95ef9bad6c18d6c306b82662.tar.xz passt-5cada561863bb2bf95ef9bad6c18d6c306b82662.tar.zst passt-5cada561863bb2bf95ef9bad6c18d6c306b82662.zip |
treewide: Avoid in_addr_t
IPv4 addresses can be stored in an in_addr_t or a struct in_addr. The
former is just a type alias to a 32-bit integer, so doesn't really give us
any type checking. Therefore we generally prefer the structure, since we
mostly want to treat IP address as opaque objects. Fix a few places where
we still use in_addr_t, but can just as easily use struct in_addr.
Note there are still some uses of in_addr_t in conf.c, but those are
justified: since they're doing prefix calculations, they actually need to
look at the internals of the address as an integer.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'conf.c')
0 files changed, 0 insertions, 0 deletions