summaryrefslogtreecommitdiffstats
path: root/sys/net
Commit message (Collapse)AuthorAgeFilesLines
* o Move ifcr_count sanity check up and reject negative values before wemaxim2005-02-241-6/+3
| | | | | | | | | | panic at kmem_alloc() via malloc(9). PR: kern/77748 Submitted by: Wojciech A. Koszek OK'ed by: brooks Security: local DoS, a sample code in the PR. MFC after: 3 days
* Fix long lines in comment introduced in previous commit.glebius2005-02-241-5/+6
|
* the rt parameter to ifa_rtrequest callbacks should always be non-null;sam2005-02-244-10/+4
| | | | | | eliminate grauitous ptr checks that follow ptr deref's Noticed by: Coverity Prevent analysis tool
* eliminate dead code and collapse the remaindersam2005-02-231-3/+1
| | | | | Noticed by: Coverity Prevent analysis tool Reviewed by: rwatson
* Typo in comment.glebius2005-02-221-1/+1
|
* When prepending an LCC SNAP header to an atalk outgoing ethernet packet,rwatson2005-02-221-1/+1
| | | | | | | allocate the additional mbuf (if needed) using a non-sleeping memory allocation. MFC after: 7 days
* - In if_link_state_change() extract function body from if-block, to improveglebius2005-02-221-19/+25
| | | | | | | | readability. - Call carp_carpdev_state() from if_link_state_change() if interface has associated CARP interface. Sponsored by: Rambler
* Add CARP (Common Address Redundancy Protocol), which allows multipleglebius2005-02-225-1/+53
| | | | | | | | | | | | | hosts to share an IP address, providing high availability and load balancing. Original work on CARP done by Michael Shalayeff, with many additions by Marco Pfatschbacher and Ryan McBride. FreeBSD port done solely by Max Laier. Patch by: mlaier Obtained from: OpenBSD (mickey, mcbride)
* Allocate the M_VLANTAG m_pkthdr flag, and use it to indicate thatru2005-02-183-7/+9
| | | | | | | | | | | | | | | | a packet has VLAN mbuf tag attached. This is faster to check than m_tag_locate(), and allows us to use the tags in non-vlan(4) VLAN producers. The first argument to VLAN_OUTPUT_TAG() is now unused but retained for backward compatibility. While here, embellish a fix in rev. 1.174 of if_ethersubr.c -- it now checks for packets with VLAN (mbuf) tags, and it should now be possible to bridge(4) on vlan(4)'s whose parent interfaces support VLAN decapsulation in hardware. Reviewed by: sam
* Check for non-NULL ac_netgraph field in interface arpcom, instead ofglebius2005-02-141-4/+4
| | | | | | checking global presence of ng_ether(4). Reviewed by: ru
* If no vlan(4) interfaces are configured for the interface, and theru2005-02-141-3/+10
| | | | | | | | | driver did VLAN decapsulation in hardware, we were passing a frame as if it came for the parent (non-VLAN) interface. Stop this from happening. Reminded by: glebius Security: This could pose a security risk in some setups
* Validate ifc->ifc_len before submitting its incarnation to sbuf_new,delphij2005-02-121-0/+4
| | | | | | | | | which will finally lead to kernel panic. Security: This prevents a local (root-launched) DoS Submitted by: Wojciech A. Koszek [dunstan at freebsd czest pl] PR: 77421 MFC After: 1 week
* Make a bunch of malloc types static.phk2005-02-101-1/+1
| | | | Found by: src/tools/tools/kernxref
* Log changes of link state.glebius2005-01-301-0/+3
| | | | Reviewed by: rwatson
* Acquire the raw_cb mutex around LIST_REMOVE() of a raw socket controlrwatson2005-01-241-0/+2
| | | | | | | block from the global raw socket list. Submitted by: Roselyn Lee <rosel at verniernetworks dot com> MFC after: 1 week
* Fix spelling in a comment.yar2005-01-241-1/+1
|
* Reduce the global name space pollution.yar2005-01-231-2/+2
| | | | The cloner structure isn't referenced by name outside this file.
* - Reduce number of arguments passed to dummynet_io(), we already have cookieglebius2005-01-162-3/+2
| | | | | in struct ip_fw_args itself. - Remove redundant &= 0xffff from dummynet_io().
* Remove ip_fw.h and ip_dummynet.h from includes.glebius2005-01-151-2/+0
|
* o Clean up interface between ip_fw_chk() and its callers:glebius2005-01-142-7/+11
| | | | | | | | | | | | | | | | - ip_fw_chk() returns action as function return value. Field retval is removed from args structure. Action is not flag any more. It is one of integer constants. - Any action-specific cookies are returned either in new "cookie" field in args structure (dummynet, future netgraph glue), or in mbuf tag attached to packet (divert, tee, some future action). o Convert parsing of return value from ip_fw_chk() in ipfw_check_{in,out}() to a switch structure, so that the functions are more readable, and a future actions can be added with less modifications. Approved by: andre MFC after: 2 months
* Fix a typo in a comment that may be confusing if one doesn't reallykeramida2005-01-111-1/+1
| | | | | check what the code does. Separators are spaces, commas or tabs; not '*' characters (as one may assume by reading the old comment).
* don't see NBPFILTER.ume2005-01-111-2/+0
|
* remove HAVE_OLD_BPF part.ume2005-01-111-20/+0
|
* we are not OLD_BPF system.ume2005-01-111-1/+0
|
* fix typo.ume2005-01-111-1/+1
|
* This change adds reliability for Ethernet trunks built with ng_one2many:glebius2005-01-081-0/+6
| | | | | | | | | | - Introduce another ng_ether(4) callback ng_ether_link_state_p, which is called from if_link_state_change(), every time link is changed. - In ng_ether_link_state() send netgraph control message notifying of link state change to a node connected to "lower" hook. Reviewed by: sam MFC after: 2 weeks
* /* -> /*- for license, minor formatting changesimp2005-01-0773-75/+90
|
* Add FR support to sppp (MFCronyx).rik2004-12-283-14/+685
| | | | | | | | | | Silence on: net@, current@, hackers@. No objections: joerg Requested by: by many (mostly Cronyx) users for a long long time. MFC after: 10 days PR: kern/21771, kern/66348
* Fix mbuf leak.pjd2004-12-271-1/+3
| | | | | Submitted by: Johnny Eriksson <bygg@cafax.se> MFC after: 5 days
* Include fcntl.hphk2004-12-221-2/+3
| | | | | | Include selinfo.h (don't rely on vnode.h to do so) Check O_NONBLOCK instead of IO_NELAY Don't include vnode.h
* Don't include filedesc.hphk2004-12-221-3/+3
| | | | | | | Include fcntl.h Include selinfo.h (don't rely on vnode.h to do so) Check O_NONBLOCK instead of IO_NDELAY Don't include vnode.h
* Include fcntl.hphk2004-12-221-3/+3
| | | | | | | Check O_NONBLOCK instead of IO_NDELAY Include uio.h Don't include vnode.h Don't include filedesc.h
* Check O_NONBLOCK instead of IO_NDELAY.phk2004-12-221-2/+1
| | | | Don't include <sys/vnode.h>
* don't try to recurse on the bpf lock.. kqueue already locks the bpf lockjmg2004-12-171-2/+1
| | | | | | | now... Submitted by: Ed Maste of Sandvine Inc. MFC after: 1 week
* Kill double inclusion for <netinet/in.h> and <netinet/in_systm.h>.rik2004-12-141-2/+0
|
* Make sppp MPSAFE.rik2004-12-122-112/+237
| | | | | | | MPSAFE could be turned off by IFF_NEEDSGIANT. Silence on: net@, current@, hackers@. No objections: joerg
* Cleanup link state change notification:sam2004-12-082-0/+27
| | | | | o add new if_link_state_change routine that deals with link state changes o change mii to use if_link_state_change
* Don't require a device to be marked up when issuing BIOCSETIF.sam2004-12-081-4/+3
|
* Implement the check I was talking about in the previous message already.mlaier2004-11-301-4/+4
| | | | | | | | | | | | | | | | | Introduce domain_init_status to keep track of the init status of the domains list (surprise). 0 = uninitialized, 1 = initialized/unpopulated, 2 = initialized/done. Higher values can be used to support late addition of domains which right now "works", but is potential dangerous. I choose to only give a warning when doing so. Use domain_init_status with if_attachdomain[1]() to ensure that we have a complete domains list when we init the if_afdata array. Store the current value of domain_init_status in if_afdata_initialized. This way we can update if_afdata after a new protocol has been added (once that is allowed). Submitted by: se (with changes) Reviewed by: julian, glebius, se PR: kern/73321 (partly)
* Assign if_broadcastaddr to NULL not 0 in if_attach().rwatson2004-11-231-8/+10
| | | | | | | | | | | Printf() a warning if if_attachdomain() is called more than once on an interface to generate some noise on mailing lists when this occurs. Fix up style in if_start(), where spaces crept in instead of tabs at some point. MFC after: 1 week MFC note: Not the printf().
* sync comment on IFF_OACTIVE with reality.. IFF_OACTIVE is set when thejmg2004-11-171-1/+1
| | | | | | | hardware cannot take anymore packets, and so will supress the calling of the device's if_start method... Submitted by: bde
* Remove the #if 0 wrapping around !ALTQ stuff that can't be used due to ABImlaier2004-11-091-34/+0
| | | | stability anyway.
* Initialize struct pr_userreqs in new/sparse style and fill in commonphk2004-11-082-10/+20
| | | | | | default elements in net_init_domain(). This makes it possible to grep these structures and see any bogosities.
* Don't abuse tp->t_sc in sl(4) either.cognet2004-11-071-6/+15
|
* Don't abuse tp->t_sc, as it is now used by tty drivers.cognet2004-11-073-13/+26
| | | | | | This fixes the panic that occurs when using ppp(4) Reported and tested by: Yann Berthier (yb at sainte-barbe dot org)
* Utilize m_uiotombuf() in device write method, instead of home-grownglebius2004-10-312-70/+18
| | | | | | | | implementation. This also gives a performance improvement, because m_uiotombuf() utilizes clusters. Approved by: julian (mentor) MFC after: 1 month
* Move if_handoff() from an inline in if_var.h to a function to if.crwatson2004-10-302-24/+27
| | | | | | | | | in orden to harden the ABI for 5.x; this will permit us to modify the locking in the ifnet packet dispatch without requiring drivers to be recompiled. MFC after: 3 days Discussed at: EuroBSDCon Developer's Summit
* Add additional "spare" fields to 'struct ifnet' in order to improverwatson2004-10-301-0/+5
| | | | | | | | the resistance of the network driver ABI to changes that will be required as we optimize locking. MFC after: 3 days Discussed at: Developer Summit
* use NULL instead of 0 when casting/comparing w/ a pointer...jmg2004-10-251-2/+2
|
* Define IFF_LOCKGIANT() and IFF_UNLOCKGIANT() macros, which conditionallyrwatson2004-10-192-2/+40
| | | | | | | | | acquire Giant if the passed interface has IFF_NEEDSGIANT set on it. Modify calls into (ifp)->if_ioctl() in if.c to use these macros in order to ensure that Giant is held. MFC after: 3 days Bumped into by: jmg
OpenPOWER on IntegriCloud