summaryrefslogtreecommitdiff
path: root/sys/net/if_vlan.c
AgeCommit message (Collapse)Author
2006-03-25allow bpf(4) to ignore packets based on their direction (inbound orDamien Miller
outbound), using a new BIOCSDIRFILT ioctl; guidance, feedback and ok canacar@
2006-03-04With the exception of two other small uncommited diffs this movesBrad Smith
the remainder of the network stack from splimp to splnet. ok miod@
2006-02-09add an interface detach hook and use it with the vlan(4) driver. thisReyk Floeter
fixes a possible crash if the parent interface has been destroyed (like vlan on trunk) before destroying the vlan interface. ok brad@
2006-01-05Make it possible to set a default vlan priority for vlan interfaces.Esben Norby
ok claudio@ brad@
2006-01-04Remove redundant calls to bpfdetach.Can Erkin Acar
ok brad@
2005-10-23Rework of multicast deletion code for vlan(4) and trunk(4).Marco Pfatschbacher
The previous code could wrongly delete multicast groups on the parent interface. Now we forward only remembered delete requests. OK mcbride, mickey.
2005-07-31Introduce bpf_mtap_af and bpf_mtap_hdr to be used when passing a mbuf chainChristopher Pascoe
to bpf with either an address family or other header added. These helpers only allocate a much smaller struct m_hdr on the stack when needed, rather than leaving 256 byte struct mbufs on the stack in deep call paths. Also removes a fair bit of duplicated code. commit now, tune after deraadt@
2005-07-19Remove vlan_input_tag() since all four drivers that used it have beenCamiel Dobbelaar
reworked to not strip vlan tags in hardware anymore. ok brad henning jason
2005-07-18Use M_PREPEND to take advantage of any slack leading space in the mbuf.Camiel Dobbelaar
ok markus jason henning brad
2005-06-07Run vlan_input before bridge_input, and change vlan_input to notCamiel Dobbelaar
consume vlan frames that no vlan interface wants, so they can still be bridged. This way, the bridge can bridge encapsulated frames _and_ bridge between vlan interfaces. ok henning markus
2005-05-27only access if_linkstatehooks inside splnet.Marco Pfatschbacher
with pascoe@
2005-04-25Use ETHERTYPE_VLAN.Brad Smith
2005-04-24Use the IANA assignment IFT_L2VLAN.Brad Smith
From FreeBSD/NetBSD Tested by camield@ and Alexey E. Suslikov <cruel at texnika dot com dot ua> ok camield@
2005-04-20Make vlan(4) aware of its physical interface link state.Marco Pfatschbacher
Changes are reported to userland and to other interfaces sitting on top of us. OK henning@, camield@ Tested by camield@ and Alexey E. Suslikov
2005-04-18If the parent interface is not IFF_RUNNING, do not call its start function.Brad Smith
This prevent a variety of fun panics. From NetBSD
2005-04-18revert a change in the previous commit to appease henning@ for the timeBrad Smith
being.. - Set the interface speed back to zero after ether_ifattach(). RFC 2863 says: "For a sub-layer which has no concept of bandwidth, [ifSpeed] should be zero."
2005-04-17- In vlan_input()/vlan_input_tag(), always mask off all but the VLIDBrad Smith
bits from tags extracted from received frames. (Some drivers may already do this masking internally, but doing it here doesn't hurt and insures consistency.) - In vlan_ioctl(), don't let the user set a VLAN ID value with anything besides the VLID bits set, otherwise we will have trouble matching an interface in vlan_input() later. - Set the interface speed back to zero after ether_ifattach(). RFC 2863 says: "For a sub-layer which has no concept of bandwidth, [ifSpeed] should be zero." - Do not call if_down() on a parent interface if it's already down. From FreeBSD Tested by camield@ and Alexey E. Suslikov <cruel at texnika dot com dot ua> ok camield@
2005-03-25increment the right counter on error.Brad Smith
2004-10-09sizeof(struct ether_header) -> ETHER_HDR_LENBrad Smith
ok mcbride@
2004-03-27wrap if_down() in splimp; tholo ran into splassert, miod tholo okTheo de Raadt
2004-02-12from camield:Henning Brauer
se hash instead of linked list to speed up tag to vlan interface mapping ok markus@ and myself
2003-12-16return error in ifc_destroy; ok deraadt, itojun, cedric, hshoexerMarkus Friedl
2003-12-06u_int8_t variable can't be > 255; pointed out by Mr. GCC3.Alexander Yurchenko
ok millert@
2003-12-03add support for ifconfig clone/destroy; ok henning deraadtMarkus Friedl
2003-08-15change arguments to suser. suser now takes the process, and a flagsTed Unangst
argument. old cred only calls user suser_ucred. this will allow future work to more flexibly implement the idea of a root process. looks like something i saw in freebsd, but a little different. use of suser_ucred vs suser in file system code should be looked at again, for the moment semantics remain unchanged. review and input from art@ testing and further review miod@
2003-08-14m_copyback()'s 4th arg is const void *, nuke (caddr_t) casts.Jason Wright
2003-07-25%lu for u_long argJason Wright
2003-05-13nuke common: ifnet_addrsJason Wright
2003-05-03string fixes; tedu okTheo de Raadt
2003-05-03just as a safety measure, set m_flags to 0 for mbufs allocated on stack.Jun-ichiro itojun Hagino
dhartmei ok
2003-03-24Tree patches from c.pascoe at itee dot uq dot edu dot au:Jason Wright
- mask of vlan tag to ensure upper bit isn't present from hardware - avoid mbuf leak on error - make sure sizeof(ether_header) bytes are present in the firest mbuf before passing it up to ether_input()
2003-02-01from Chris Pascoe <c.pascoe@itee.uq.edu.au>:Chris Cappuccio
Fix multicast bug; internal multicast members' list was not initialized correctly. Also, begin to make vlan less ether specific - TR and FDDI could also be supported.
2003-01-07remove the altq classifier code which is replaced by pf and no longer used.Kenjiro Cho
ok henning@, deraadt@
2002-06-12import of netbsd's vlan multicast codeChris Cappuccio
this works better than what we have now, although i have not been able to extensively test it. several folks thought it should be added
2002-03-24deref of NULL in out of mbuf situation, ok jason@Niklas Hallqvist
2002-02-13Be -really- careful not to modify the payload when replacing the ethernetJason Wright
header with the 802.1Q header. The reason for this is if_vlan is called by the bridge (via if_start). It cannot modify the mbuf because it might be shared copy.
2001-12-11Use queue.h macros.Jason Wright
2001-10-05Fix bug in if_vlan which could cause crashes in timeouts and 'ifconfig -a'Dale Rahn
ok niklas@
2001-10-01Make number of vlan interfaces configurable from UKC.Niklas Hallqvist
ok jason@, chris@, deraadt@
2001-09-01Inherit baudrate from parent. Now MRTG will show vlan interfaces ;)Chris Cappuccio
2001-08-03Use IFCAP_VLAN_MTU and IFCAP_VLAN_HWTAGGING capabilities:Chris Cappuccio
LINK0 disappears; we now set IFCAP_VLAN_HWTAGGING at ifnet->if_capabilities in the Ethernet driver for cards/drivers which support hardware tagging. MTU ambiguity disppears; we now set IFCAP_VLAN_MTU in the Ethernet driver when we know the chip will not truncate/discard vlan-sized frames. Only allow the MTU to be changed within the scope of the parent interface's MTU. (Here we also take into account IFCAP_VLAN_MTU) Propagate hardware-assisted IP/TCP/UDP checksumming flags to the vlan interface if the card supports hardware tagging (from NetBSD)
2001-06-27introduce the ALTQ queue macros into sys/net files.Kenjiro Cho
the new model removes direct references to the fields in ifp->if_snd, and defines the following macros to manipulate ifp->if_snd. IFQ_ENQUEUE(ifq, m, pktattr, err) IFQ_DEQUEUE(ifq, m) IFQ_POLL(ifq, m) IFQ_PURGE(ifq) IFQ_IS_EMPTY(ifq) the new model also enforces some rules regarding how to use these macros. details are descrined in http://www.csl.sony.co.jp/~kjc/software/altq-new-design.txt
2001-06-27Get rid of M_COPY_* macros; either use M_MOVE_* or M_DUP_*, dependingAngelos D. Keromytis
on how macros should be treated. Code by fgsch@, ok by me and itojun@
2001-06-25No need to double-clear the mbuf flags and tags.Angelos D. Keromytis
2001-06-24- redefine vlan_input_tag to take mbuf * and tag onlyJason Wright
- call ether_input_mbuf() instead of ether_input() - most work done by fgsch
2001-06-23Ok, when cards with vlan hw tagging are used in bridged configurationsJason Wright
and the tag doesn't match a child interface, reinsert the tag and call ether_input() so that bridges can still function.
2001-06-23Use standard defined macros to access inner ifnet data structure members.Aaron Campbell
2001-06-22KNFTheo de Raadt
2001-05-27Initialize old mbuf chain head tags.Angelos D. Keromytis
2001-03-30increase ierrors if m_pullup fails in vlan_input(); pointed out by chris@Jason Wright