diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-06-16 11:09:41 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-06-16 11:09:41 +0000 |
commit | 3a3f3f5b2a66fdcf27f621f80a6d0a6d22bfaace (patch) | |
tree | 173fe4df0244a96c60ce236617fe5b7c539ad2f1 /sys/nfs/nfs_subs.c | |
parent | 913f86006f0c78d29161101d7aad233f8f4668df (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_subs.c')
-rw-r--r-- | sys/nfs/nfs_subs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c index 7fb7eb5d560..59ecd4acee4 100644 --- a/sys/nfs/nfs_subs.c +++ b/sys/nfs/nfs_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_subs.c,v 1.127 2015/04/17 04:43:21 guenther Exp $ */ +/* $OpenBSD: nfs_subs.c,v 1.128 2015/06/16 11:09:40 mpi Exp $ */ /* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */ /* @@ -626,7 +626,7 @@ nfsm_rpchead(struct nfsreq *req, struct ucred *cr, int auth_type) } mb->m_pkthdr.len += authsiz + 10 * NFSX_UNSIGNED; - mb->m_pkthdr.rcvif = NULL; + mb->m_pkthdr.ph_ifidx = 0; } /* |