Prepare for rtableid being included in struct pfsync_state where it will be int32_t. Make variables which will be set to and from it the same width.
Sponsored by: InnoGames GmbH
Differential D40013
pf: Standardize rtableid vegeta_tuxpowered.net on May 8 2023, 8:47 PM. Authored by Tags None Referenced Files
Details
Prepare for rtableid being included in struct pfsync_state where it will be int32_t. Make variables which will be set to and from it the same width. Sponsored by: InnoGames GmbH
Diff Detail
Event TimelineComment Actions The new kernel code uses uint32_t as the table id, I’m curious why do you want to have rtableid signef. Comment Actions The rtableid variable is signed in pf. You can see it being assigned value of -1 for the default rule in pf_ioctl.c and for each rule by pfctl unless a specific value is set. Then in pf_test_rule() and a few other places M_SETFIB(); is called only if the value is >= 0. That makes 0 a valid value which can be set and -1 the default meaning don't set rtableid. |