aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 9f0b0630c616..6e71f67db37a 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -197,9 +197,9 @@ ifnet_byindex(u_short idx)
INIT_VNET_NET(curvnet);
struct ifnet *ifp;
- IFNET_RLOCK();
+ IFNET_WLOCK();
ifp = V_ifindex_table[idx].ife_ifnet;
- IFNET_RUNLOCK();
+ IFNET_WUNLOCK();
return (ifp);
}
@@ -218,9 +218,9 @@ ifaddr_byindex(u_short idx)
{
struct ifaddr *ifa;
- IFNET_RLOCK();
+ IFNET_WLOCK();
ifa = ifnet_byindex(idx)->if_addr;
- IFNET_RUNLOCK();
+ IFNET_WUNLOCK();
return (ifa);
}