Content-Length: 309224 | pFad | http://github.com/liweitianux/dragonflybsd/commit/6c9ab66bab01beee5e8220b8cf3e6dcad78af296

A7 wg: Port #14: replace MPASS() macro with KKASSERT() · liweitianux/dragonflybsd@6c9ab66 · GitHub
Skip to content

Commit 6c9ab66

Browse files
committed
wg: Port DragonFlyBSD#14: replace MPASS() macro with KKASSERT()
1 parent c050537 commit 6c9ab66

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
@@ -490,7 +490,7 @@ wg_peer_destroy_all(struct wg_softc *sc)
490490
static void
491491
wg_peer_set_endpoint(struct wg_peer *peer, struct wg_endpoint *e)
492492
{
493-
MPASS(e->e_remote.r_sa.sa_family != 0);
493+
KKASSERT(e->e_remote.r_sa.sa_family != 0);
494494
if (memcmp(e, &peer->p_endpoint, sizeof(*e)) == 0)
495495
return;
496496

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

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

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

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

16951695
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/6c9ab66bab01beee5e8220b8cf3e6dcad78af296

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy