Content-Length: 309230 | pFad | http://github.com/liweitianux/dragonflybsd/commit/042d504ac55db834df57310d562ef98b2683560e

15 wg: Port #14: replace MPASS() macro with KKASSERT() · liweitianux/dragonflybsd@042d504 · GitHub
Skip to content

Commit 042d504

Browse files
committed
wg: Port DragonFlyBSD#14: replace MPASS() macro with KKASSERT()
1 parent d28d396 commit 042d504

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sys/net/wg/if_wg.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ wg_peer_destroy_all(struct wg_softc *sc)
489489
static void
490490
wg_peer_set_endpoint(struct wg_peer *peer, struct wg_endpoint *e)
491491
{
492-
MPASS(e->e_remote.r_sa.sa_family != 0);
492+
KKASSERT(e->e_remote.r_sa.sa_family != 0);
493493
if (memcmp(e, &peer->p_endpoint, sizeof(*e)) == 0)
494494
return;
495495

@@ -679,15 +679,15 @@ wg_socket_init(struct wg_softc *sc, in_port_t port)
679679
* udp_set_kernel_tunneling can only fail if there is already a tunneling function set.
680680
* This should never happen with a new socket.
681681
*/
682-
MPASS(rc == 0);
682+
KKASSERT(rc == 0);
683683
#endif
684684

685685
#ifdef INET6
686686
rc = socreate(AF_INET6, &so6, SOCK_DGRAM, IPPROTO_UDP, cred, curthread);
687687
if (rc)
688688
goto out;
689689
rc = udp_set_kernel_tunneling(so6, wg_input, NULL, sc);
690-
MPASS(rc == 0);
690+
KKASSERT(rc == 0);
691691
#endif
692692

693693
if (sc->sc_socket.so_user_cookie) {
@@ -1688,7 +1688,7 @@ wg_deliver_in(struct wg_peer *peer)
16881688
if (m->m_pkthdr.len == 0)
16891689
goto done;
16901690

1691-
MPASS(pkt->p_af == AF_INET || pkt->p_af == AF_INET6);
1691+
KKASSERT(pkt->p_af == AF_INET || pkt->p_af == AF_INET6);
16921692
pkt->p_mbuf = NULL;
16931693

16941694
m->m_pkthdr.rcvif = ifp;

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/liweitianux/dragonflybsd/commit/042d504ac55db834df57310d562ef98b2683560e

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy