Introduce support for Mandatory Access Control and extensible

kernel access control.

When generating an IGMP message, invoke a MAC entry point to permit
the MAC framework to label its mbuf appropriately for the target
interface.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
This commit is contained in:
Robert Watson 2002-07-31 16:46:56 +00:00
parent 19527d3e22
commit 0ec4b12334
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=101091

View File

@ -49,8 +49,11 @@
* MULTICAST Revision: 3.5.1.4
*/
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/mac.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/socket.h>
@ -447,6 +450,9 @@ igmp_sendpkt(inm, type, addr)
return;
m->m_pkthdr.rcvif = loif;
#ifdef MAC
mac_create_mbuf_linklayer(inm->inm_ifp, m);
#endif
m->m_pkthdr.len = sizeof(struct ip) + IGMP_MINLEN;
MH_ALIGN(m, IGMP_MINLEN + sizeof(struct ip));
m->m_data += sizeof(struct ip);