]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
inpcb: Restore some NULL checks of credential pointers
authorMark Johnston <markj@FreeBSD.org>
Wed, 7 Feb 2024 14:43:25 +0000 (09:43 -0500)
committerMark Johnston <markj@FreeBSD.org>
Fri, 9 Feb 2024 23:12:49 +0000 (18:12 -0500)
commit3e6382c1eda5ea4451a64ec69fd8a92f621aca55
tree63a4ec5550bd51553c54e58a587999e08f9dcbd8
parentdbc87c1ebde93b67533bdd7815141c49a1040084
inpcb: Restore some NULL checks of credential pointers

At least one out-of-tree port (net-mgmt/ng_ipacct) depends on being able
to call in_pcblookup_local() with cred == NULL, so the MFC of commit
ac1750dd143e ("inpcb: Remove NULL checks of credential references")
broke compatibility.

Restore a subset of the NULL checks to avoid breaking the module in the
13.3 release.  This is a direct commit to stable/13.

PR: 276868
Approved by: re (cperciva)

(cherry picked from commit fe8df7ed1aae444a09361c080d52bfcb6aaae64f)
sys/netinet/in_pcb.c
sys/netinet6/in6_pcb.c