summaryrefslogtreecommitdiff
path: root/sys/nfs/nfs_syscalls.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-06-16 11:09:41 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-06-16 11:09:41 +0000
commit3a3f3f5b2a66fdcf27f621f80a6d0a6d22bfaace (patch)
tree173fe4df0244a96c60ce236617fe5b7c539ad2f1 /sys/nfs/nfs_syscalls.c
parent913f86006f0c78d29161101d7aad233f8f4668df (diff)
Store a unique ID, an interface index, rather than a pointer to the
receiving interface in the packet header of every mbuf. The interface pointer should now be retrieved when necessary with if_get(). If a NULL pointer is returned by if_get(), the interface has probably been destroy/removed and the mbuf should be freed. Such mechanism will simplify garbage collection of mbufs and limit problems with dangling ifp pointers. Tested by jmatthew@ and krw@, discussed with many. ok mikeb@, bluhm@, dlg@
Diffstat (limited to 'sys/nfs/nfs_syscalls.c')
-rw-r--r--sys/nfs/nfs_syscalls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/nfs/nfs_syscalls.c b/sys/nfs/nfs_syscalls.c
index 26db90feed0..c5a5478e525 100644
--- a/sys/nfs/nfs_syscalls.c
+++ b/sys/nfs/nfs_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_syscalls.c,v 1.100 2015/05/06 08:52:17 mpi Exp $ */
+/* $OpenBSD: nfs_syscalls.c,v 1.101 2015/06/16 11:09:40 mpi Exp $ */
/* $NetBSD: nfs_syscalls.c,v 1.19 1996/02/18 11:53:52 fvdl Exp $ */
/*
@@ -401,7 +401,7 @@ loop:
m = mreq;
m->m_pkthdr.len = siz;
- m->m_pkthdr.rcvif = NULL;
+ m->m_pkthdr.ph_ifidx = 0;
/* For stream protocols, prepend a Sun RPC Record Mark. */
if (sotype == SOCK_STREAM) {