git: 0143a6bb7f63 - main - pf: fix set_prio after nv conversion

From: Kristof Provost <kp_at_FreeBSD.org>
Date: Mon, 14 Feb 2022 23:04:20 UTC
The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=0143a6bb7f634c5984b34db1834313bdb47e6ccd

commit 0143a6bb7f634c5984b34db1834313bdb47e6ccd
Author:     Franco Fichtner <franco@opnsense.org>
AuthorDate: 2022-02-14 19:26:39 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2022-02-14 21:51:10 +0000

    pf: fix set_prio after nv conversion
    
    Reviewed by:    kp
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D34266
---
 sys/netpfil/pf/pf_nv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/netpfil/pf/pf_nv.c b/sys/netpfil/pf/pf_nv.c
index b4b844c4edd5..f3a28bf770b1 100644
--- a/sys/netpfil/pf/pf_nv.c
+++ b/sys/netpfil/pf/pf_nv.c
@@ -626,7 +626,7 @@ pf_nvrule_to_krule(const nvlist_t *nvl, struct pf_krule *rule)
 	PFNV_CHK(pf_nvuint8(nvl, "flush", &rule->flush));
 	PFNV_CHK(pf_nvuint8(nvl, "prio", &rule->prio));
 
-	PFNV_CHK(pf_nvuint8_array(nvl, "set_prio", &rule->prio, 2, NULL));
+	PFNV_CHK(pf_nvuint8_array(nvl, "set_prio", rule->set_prio, 2, NULL));
 
 	if (nvlist_exists_nvlist(nvl, "divert")) {
 		const nvlist_t *nvldivert = nvlist_get_nvlist(nvl, "divert");
@@ -809,7 +809,7 @@ pf_krule_to_nvrule(struct pf_krule *rule)
 	nvlist_add_number(nvl, "flush", rule->flush);
 	nvlist_add_number(nvl, "prio", rule->prio);
 
-	pf_uint8_array_nv(nvl, "set_prio", &rule->prio, 2);
+	pf_uint8_array_nv(nvl, "set_prio", rule->set_prio, 2);
 
 	tmp = pf_divert_to_nvdivert(rule);
 	if (tmp == NULL)