diff options
author | hsu <hsu@FreeBSD.org> | 2002-12-22 05:35:03 +0000 |
---|---|---|
committer | hsu <hsu@FreeBSD.org> | 2002-12-22 05:35:03 +0000 |
commit | 82e1e3bab0d3abe1018a0b56559c154485f2f676 (patch) | |
tree | d0f9ee7e6f9d8014e6f8f94ab6965e85c268792e /sys/netgraph/ng_source.c | |
parent | 2afef11c570b7b725c3145fc710f8dcd8d7ed4e0 (diff) | |
download | FreeBSD-src-82e1e3bab0d3abe1018a0b56559c154485f2f676.zip FreeBSD-src-82e1e3bab0d3abe1018a0b56559c154485f2f676.tar.gz |
SMP locking for ifnet list.
Diffstat (limited to 'sys/netgraph/ng_source.c')
-rw-r--r-- | sys/netgraph/ng_source.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netgraph/ng_source.c b/sys/netgraph/ng_source.c index b2e976c..78525e8 100644 --- a/sys/netgraph/ng_source.c +++ b/sys/netgraph/ng_source.c @@ -481,10 +481,12 @@ ng_source_store_output_ifp(sc_p sc, struct ng_mesg *msg) * way of verifying if_index is valid since if_indexlim is * local to if_attach() */ + IFNET_RLOCK(); TAILQ_FOREACH(ifp, &ifnet, if_link) { if (ifp->if_index == if_index) break; } + IFNET_RUNLOCK(); if (ifp == NULL) { printf("%s: can't find interface %d\n", __FUNCTION__, if_index); |