Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Feb 2022 10:46:06 GMT
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: c428292cb376 - stable/13 - libpfctl: fix pfctl_kill_states()
Message-ID:  <202202181046.21IAk6E7043353@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kp:

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

commit c428292cb3768d913eda6d546ece59379b6277d5
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2022-01-31 17:31:53 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2022-02-18 10:14:59 +0000

    libpfctl: fix pfctl_kill_states()
    
    735748f30a changed the output of the states so that the creator id
    endianness would be consistent. This means that we need to convert the
    host endianness creatorid back to big-endian before we give it to the
    kernel.
    
    MFC after:      3 weeks
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    
    (cherry picked from commit 6f47a72d8ebf444641bda192b33eb217c9013811)
---
 lib/libpfctl/libpfctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c
index e77bdee93deb..61fce7d743f6 100644
--- a/lib/libpfctl/libpfctl.c
+++ b/lib/libpfctl/libpfctl.c
@@ -758,7 +758,7 @@ pfctl_nv_add_state_cmp(nvlist_t *nvl, const char *name,
 	nv = nvlist_create(0);
 
 	nvlist_add_number(nv, "id", cmp->id);
-	nvlist_add_number(nv, "creatorid", cmp->creatorid);
+	nvlist_add_number(nv, "creatorid", htonl(cmp->creatorid));
 	nvlist_add_number(nv, "direction", cmp->direction);
 
 	nvlist_add_nvlist(nvl, name, nv);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202202181046.21IAk6E7043353>