Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/usr.sbin/npf/npfctl



Module Name:    src
Committed By:   martin
Date:           Wed Jun 11 09:24:52 UTC 2025

Modified Files:
        src/usr.sbin/npf/npfctl: npf_parse.y

Log Message:
NPF variables of type NPFVAR_NUM are only ever retrieved as
uint32_t values in npfvar_expand_number(). It makes no sense
to store them as unsigned long values (sizeof(yylval.num))
internally.

Besides the code in npfvar_expand_number() did not properly retrieve
values if sizeof(unsigned long) > sizeof(uint32_t), e.g. on sparc64
it picked the wrong 4 bytes and always returned 0.

So use uint32_t to create the value, saving memory and fixing a bug.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/usr.sbin/npf/npfctl/npf_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index