HomeFreeBSD

pf: use an enum for packet direction in divert tag

Description

pf: use an enum for packet direction in divert tag

The benefit is that in the debugger you will see PF_DIVERT_MTAG_DIR_IN
instead of 1 when looking at a structure. And compilation time failure
if anybody sets it to a wrong value. Using "port" instead of "ndir" when
assigning a port improves readability of code.

Suggested by: glebius
MFC after: 3 weeks
X-MFC-With: fabf705f4b

(cherry picked from commit c1146e6ad67fb866c2472a1cbe5609fd939fd5ef)

Details

Provenance
kpAuthored on Oct 20 2023, 7:13 AM
Parents
rG2f3f9c9d54bb: pf: fix pf divert-to loop
Branches
Unknown
Tags
Unknown