diff options
author | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2024-01-01 18:47:03 +0000 |
---|---|---|
committer | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2024-01-01 18:47:03 +0000 |
commit | 159567461e483cb1e1ab08fe9a545b99fd539e5e (patch) | |
tree | 97e787b27b325120a0355f998f92373d7e79aea5 /sys | |
parent | 6b26b6d984e6ab54f8a8fb7fedd1821d8e29adb3 (diff) |
Call if_counters_alloc() before if_attach().
ok bluhm sashan
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if_gif.c | 4 | ||||
-rw-r--r-- | sys/net/if_mpe.c | 4 | ||||
-rw-r--r-- | sys/net/if_mpip.c | 4 | ||||
-rw-r--r-- | sys/net/if_wg.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index 4aa1cc77ebc..ebaa30e7806 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gif.c,v 1.136 2023/12/23 10:52:54 bluhm Exp $ */ +/* $OpenBSD: if_gif.c,v 1.137 2024/01/01 18:47:02 mvs Exp $ */ /* $KAME: if_gif.c,v 1.43 2001/02/20 08:51:07 itojun Exp $ */ /* @@ -174,9 +174,9 @@ gif_clone_create(struct if_clone *ifc, int unit) ifp->if_type = IFT_GIF; ifp->if_softc = sc; + if_counters_alloc(ifp); if_attach(ifp); if_alloc_sadl(ifp); - if_counters_alloc(ifp); #if NBPFILTER > 0 bpfattach(&ifp->if_bpf, ifp, DLT_LOOP, sizeof(uint32_t)); diff --git a/sys/net/if_mpe.c b/sys/net/if_mpe.c index a72347b4c3c..9f26a901188 100644 --- a/sys/net/if_mpe.c +++ b/sys/net/if_mpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mpe.c,v 1.104 2023/12/23 10:52:54 bluhm Exp $ */ +/* $OpenBSD: if_mpe.c,v 1.105 2024/01/01 18:47:02 mvs Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@spootnik.org> @@ -117,9 +117,9 @@ mpe_clone_create(struct if_clone *ifc, int unit) sc->sc_dead = 0; + if_counters_alloc(ifp); if_attach(ifp); if_alloc_sadl(ifp); - if_counters_alloc(ifp); #if NBPFILTER > 0 bpfattach(&ifp->if_bpf, ifp, DLT_LOOP, sizeof(u_int32_t)); diff --git a/sys/net/if_mpip.c b/sys/net/if_mpip.c index 8daac934664..761a1fe5a20 100644 --- a/sys/net/if_mpip.c +++ b/sys/net/if_mpip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mpip.c,v 1.18 2023/12/23 10:52:54 bluhm Exp $ */ +/* $OpenBSD: if_mpip.c,v 1.19 2024/01/01 18:47:02 mvs Exp $ */ /* * Copyright (c) 2015 Rafael Zalamena <rzalamena@openbsd.org> @@ -120,8 +120,8 @@ mpip_clone_create(struct if_clone *ifc, int unit) ifp->if_mtu = 1500; ifp->if_hardmtu = 65535; - if_attach(ifp); if_counters_alloc(ifp); + if_attach(ifp); if_alloc_sadl(ifp); #if NBPFILTER > 0 diff --git a/sys/net/if_wg.c b/sys/net/if_wg.c index a55fba2afde..dcd50255fad 100644 --- a/sys/net/if_wg.c +++ b/sys/net/if_wg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wg.c,v 1.34 2023/12/23 10:52:54 bluhm Exp $ */ +/* $OpenBSD: if_wg.c,v 1.35 2024/01/01 18:47:02 mvs Exp $ */ /* * Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. @@ -2691,9 +2691,9 @@ wg_clone_create(struct if_clone *ifc, int unit) ifp->if_type = IFT_WIREGUARD; ifp->if_rtrequest = p2p_rtrequest; + if_counters_alloc(ifp); if_attach(ifp); if_alloc_sadl(ifp); - if_counters_alloc(ifp); #if NBPFILTER > 0 bpfattach(&ifp->if_bpf, ifp, DLT_LOOP, sizeof(uint32_t)); |