Deleted Added
full compact
mac_net.c (172930) mac_net.c (173018)
1/*-
2 * Copyright (c) 1999-2002 Robert N. M. Watson
3 * Copyright (c) 2001 Ilmar S. Habibulin
4 * Copyright (c) 2001-2004 Networks Associates Technology, Inc.
5 * Copyright (c) 2006 SPARTA, Inc.
6 * All rights reserved.
7 *
8 * This software was developed by Robert Watson and Ilmar Habibulin for the

--- 25 unchanged lines hidden (view full) ---

34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 * SUCH DAMAGE.
39 */
40
41#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1999-2002 Robert N. M. Watson
3 * Copyright (c) 2001 Ilmar S. Habibulin
4 * Copyright (c) 2001-2004 Networks Associates Technology, Inc.
5 * Copyright (c) 2006 SPARTA, Inc.
6 * All rights reserved.
7 *
8 * This software was developed by Robert Watson and Ilmar Habibulin for the

--- 25 unchanged lines hidden (view full) ---

34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 * SUCH DAMAGE.
39 */
40
41#include <sys/cdefs.h>
42__FBSDID("$FreeBSD: head/sys/security/mac/mac_net.c 172930 2007-10-24 19:04:04Z rwatson $");
42__FBSDID("$FreeBSD: head/sys/security/mac/mac_net.c 173018 2007-10-26 13:18:38Z rwatson $");
43
44#include "opt_mac.h"
45
46#include <sys/param.h>
47#include <sys/kernel.h>
48#include <sys/lock.h>
49#include <sys/malloc.h>
50#include <sys/mutex.h>

--- 254 unchanged lines hidden (view full) ---

305 BPFD_LOCK_ASSERT(d);
306
307 label = mac_mbuf_to_label(m);
308
309 MAC_PERFORM(bpfdesc_create_mbuf, d, d->bd_label, m, label);
310}
311
312void
43
44#include "opt_mac.h"
45
46#include <sys/param.h>
47#include <sys/kernel.h>
48#include <sys/lock.h>
49#include <sys/malloc.h>
50#include <sys/mutex.h>

--- 254 unchanged lines hidden (view full) ---

305 BPFD_LOCK_ASSERT(d);
306
307 label = mac_mbuf_to_label(m);
308
309 MAC_PERFORM(bpfdesc_create_mbuf, d, d->bd_label, m, label);
310}
311
312void
313mac_create_mbuf_linklayer(struct ifnet *ifp, struct mbuf *m)
313mac_mbuf_create_linklayer(struct ifnet *ifp, struct mbuf *m)
314{
315 struct label *label;
316
317 label = mac_mbuf_to_label(m);
318
319 MAC_IFNET_LOCK(ifp);
314{
315 struct label *label;
316
317 label = mac_mbuf_to_label(m);
318
319 MAC_IFNET_LOCK(ifp);
320 MAC_PERFORM(create_mbuf_linklayer, ifp, ifp->if_label, m, label);
320 MAC_PERFORM(mbuf_create_linklayer, ifp, ifp->if_label, m, label);
321 MAC_IFNET_UNLOCK(ifp);
322}
323
324void
325mac_ifnet_create_mbuf(struct ifnet *ifp, struct mbuf *m)
326{
327 struct label *label;
328

--- 161 unchanged lines hidden ---
321 MAC_IFNET_UNLOCK(ifp);
322}
323
324void
325mac_ifnet_create_mbuf(struct ifnet *ifp, struct mbuf *m)
326{
327 struct label *label;
328

--- 161 unchanged lines hidden ---