diff --git a/sysutils/pftop/files/patch-bpf_filter.c b/sysutils/pftop/files/patch-bpf_filter.c index 7c6855930263..bda75e514c76 100644 --- a/sysutils/pftop/files/patch-bpf_filter.c +++ b/sysutils/pftop/files/patch-bpf_filter.c @@ -1,13 +1,13 @@ ---- bpf_filter.c.orig 2016-09-12 16:50:11.454297000 +0200 -+++ bpf_filter.c 2016-09-12 16:43:28.150188000 +0200 -@@ -143,8 +143,8 @@ +--- bpf_filter.c.orig 2022-06-07 16:20:35 UTC ++++ bpf_filter.c +@@ -143,8 +143,8 @@ bpf_filter(pc, p, wirelen, buflen) */ u_int bpf_filter(pc, p, wirelen, buflen) - struct bpf_insn *pc; - u_char *p; + const struct bpf_insn *pc; + const u_char *p; u_int wirelen; u_int buflen; { diff --git a/sysutils/pftop/files/patch-bpf_image.c b/sysutils/pftop/files/patch-bpf_image.c index d2a8d3bfade6..2f5ce5e7fd24 100644 --- a/sysutils/pftop/files/patch-bpf_image.c +++ b/sysutils/pftop/files/patch-bpf_image.c @@ -1,11 +1,11 @@ ---- bpf_image.c.orig 2016-09-12 16:51:21.704680000 +0200 -+++ bpf_image.c 2016-09-12 16:43:28.038646000 +0200 -@@ -36,7 +36,7 @@ +--- bpf_image.c.orig 2022-06-07 16:20:35 UTC ++++ bpf_image.c +@@ -36,7 +36,7 @@ bpf_image(p, n) char * bpf_image(p, n) - struct bpf_insn *p; + const struct bpf_insn *p; int n; { int v; diff --git a/sysutils/pftop/files/patch-pftop.c b/sysutils/pftop/files/patch-pftop.c index 537c1daa3d06..83fe44673db5 100644 --- a/sysutils/pftop/files/patch-pftop.c +++ b/sysutils/pftop/files/patch-pftop.c @@ -1,43 +1,43 @@ ---- pftop.c.orig 2007-11-07 01:36:46.000000000 -0500 -+++ pftop.c 2008-05-16 15:57:12.000000000 -0400 -@@ -1486,7 +1486,13 @@ +--- pftop.c.orig 2023-09-29 17:36:57 UTC ++++ pftop.c +@@ -1663,7 +1663,13 @@ print_rule(struct pf_rule *pr) print_fld_size(FLD_BYTES, pr->bytes); #endif print_fld_uint(FLD_RULE, pr->nr); - print_fld_str(FLD_DIR, pr->direction == PF_OUT ? "Out" : "In"); + if (pr->direction == PF_IN) + print_fld_str(FLD_DIR, "In"); + else if (pr->direction == PF_OUT) + print_fld_str(FLD_DIR, "Out"); + else + print_fld_str(FLD_DIR, "Any"); + if (pr->quick) print_fld_str(FLD_QUICK, "Quick"); -@@ -1570,10 +1576,10 @@ +@@ -1747,10 +1753,10 @@ print_rule(struct pf_rule *pr) #ifdef HAVE_RULE_UGID if (pr->uid.op) tb_print_ugid(pr->uid.op, pr->uid.uid[0], pr->uid.uid[1], - "user", UID_MAX); + "user", UINT_MAX); if (pr->gid.op) tb_print_ugid(pr->gid.op, pr->gid.gid[0], pr->gid.gid[1], - "group", GID_MAX); + "group", UINT_MAX); #endif if (pr->flags || pr->flagset) { -@@ -1765,7 +1771,12 @@ - strerror(errno)); - return (-1); +@@ -1952,7 +1958,12 @@ pfctl_update_qstats(struct pf_altq_node **root, int *i + ret = -1; + break; } +#ifdef PFALTQ_FLAG_IF_REMOVED + if (pa.altq.qid > 0 && + !(pa.altq.local_flags & PFALTQ_FLAG_IF_REMOVED)) { +#else if (pa.altq.qid > 0) { +#endif pq.nr = nr; pq.ticket = pa.ticket; pq.buf = &qstats; diff --git a/sysutils/pftop/files/patch-sf-scanner.l b/sysutils/pftop/files/patch-sf-scanner.l index 94d9e2d856af..47c443d2a8bc 100644 --- a/sysutils/pftop/files/patch-sf-scanner.l +++ b/sysutils/pftop/files/patch-sf-scanner.l @@ -1,11 +1,11 @@ ---- sf-scanner.l.orig 2007-11-07 07:34:18.000000000 +0100 -+++ sf-scanner.l 2008-04-01 17:03:25.853268641 +0200 -@@ -233,7 +233,7 @@ +--- sf-scanner.l.orig 2022-06-07 16:20:35 UTC ++++ sf-scanner.l +@@ -233,7 +233,7 @@ rnr|rulenum return RNR; size_t len = strlen(yytext) * 4 + 1; char *v = malloc(len); if (v != NULL) - strnvis(v, yytext, len, 0); + strvis(v, yytext, 0); sf_error("illegal token: %s", v); free(v); }