Skip to content

Commit cb624a4

Browse files
mlelstvmlelstv
authored andcommitted
Collect compiler marks for decompilation.
Fixes PR 58884
1 parent c2d18a9 commit cb624a4

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

usr.sbin/npf/npfctl/npf_show.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
*/
3535

3636
#include <sys/cdefs.h>
37-
__RCSID("$NetBSD: npf_show.c,v 1.33 2023/08/01 20:09:12 andvar Exp $");
37+
__RCSID("$NetBSD: npf_show.c,v 1.34 2025/01/27 07:54:30 mlelstv Exp $");
3838

3939
#include <sys/socket.h>
4040
#define __FAVOR_BSD
@@ -378,7 +378,7 @@ scan_marks(npf_conf_info_t *ctx, const struct mark_keyword_mapent *mk,
378378
*/
379379
ctx->curmark = m;
380380
assert(BM_COUNT < (sizeof(uint64_t) * CHAR_BIT));
381-
ctx->seen_marks = UINT64_C(1) << m;
381+
ctx->seen_marks |= UINT64_C(1) << m;
382382
assert(mk->fwords == nwords);
383383

384384
if (mk->printfn) {
@@ -499,6 +499,7 @@ npfctl_print_filter(npf_conf_info_t *ctx, nl_rule_t *rl)
499499
/*
500500
* BPF filter criteria described by the byte-code marks.
501501
*/
502+
ctx->seen_marks = 0;
502503
for (unsigned i = 0; i < __arraycount(mark_keyword_map); i++) {
503504
const struct mark_keyword_mapent *mk = &mark_keyword_map[i];
504505
scan_marks(ctx, mk, marks, mlen);

0 commit comments

Comments
 (0)