summaryrefslogtreecommitdiffstats
path: root/sys/net
Commit message (Collapse)AuthorAgeFilesLines
* Reduce code duplication. This adds the function rt_check() to route.c.mdodd2003-03-027-116/+71
| | | | Approved by: sam (in principle)
* More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).des2003-03-023-6/+6
|
* Clean up whitespace, s/register //, refrain from strong urge to ANSIfy.des2003-03-023-112/+112
|
* uiomove-related caddr_t -> void * (just the low-hanging fruit)des2003-03-023-6/+6
|
* Make the network /dev entries use MAJOR_AUTO.mux2003-02-281-3/+1
|
* NODEVFS cleanup: remove calls to cdevsw_remove()phk2003-02-261-2/+0
|
* Back out M_* changes, per decision of the TRB.imp2003-02-1931-135/+135
| | | | Approved by: trb
* remove stray debugging printfsam2003-02-181-1/+0
| | | | Noted by: Kasper Steensgaard <steensgaard@person.dk>
* o Restore an interrupt priority level before return.maxim2003-02-171-0/+2
| | | | | | Submitted by: Roman Kurakin <rik@cronyx.ru> Reviewed by: joerg MFC after: 5 days
* Remove #include <sys/dkstat.h>phk2003-02-162-2/+0
|
* Do not do an assignment in a truth test (previous commit) or gcc gives apeter2003-02-121-1/+1
| | | | | | | | | warning which breaks builds. cc1: warnings being treated as errors src/sys/net/bridge.c: In function `bdg_forward': sys/net/bridge.c:931: warning: suggest parentheses around assignment used as truth value *** Error code 1
* PFIL_HOOKS optimization: check if at least one hook is present beforesam2003-02-111-2/+3
| | | | munging the IP header to pass to the hooks
* Make the radix tree code compilable in userland. Requested by ru.hsu2003-02-082-9/+15
| | | | Some style fixes requested by bde.
* A minor stylistic change to make it more clear to lint-like tools.phk2003-02-021-2/+2
|
* chase more of the MIN/MAX mess. *sigh*alfred2003-02-021-0/+1
|
* Consolidate MIN/MAX macros into one place (param.h).alfred2003-02-021-2/+0
| | | | Submitted by: Hiten Pandya <hiten@unixdaemons.com>
* - bpf is now working (tested with tcpdump)fjoe2003-01-301-9/+16
| | | | | | - fix promiscious mode MFC after: 3 days
* NODEVFS cleanup: unifdefphk2003-01-302-20/+0
|
* Avoid lock order reversal by expanding the scope of thehsu2003-01-281-0/+1
| | | | AF_INET radix tree lock to cover the ARP data structures.
* - add support for IPX (tested with mount -t nwfs and mars_nwe),fjoe2003-01-243-85/+161
| | | | | | | | | | | IP fast forwarding, SIOCGIFADDR, setting hardware address (not currently enabled in cm driver), multicasts (experimental) - add ARC_MAX_DATA, use IF_HANDOFF, remove arc_sprintf() and some unused variables - if_simloop logic is made more similar to ethernet - drop not ours packets early (if we are not in promiscous mode) Submitted by: mark tinguely (partially)
* Implement SIOCGIFMEDIA for vlan devices by passing the request to thefenner2003-01-221-0/+23
| | | | | | | | parent device, if there is a parent configured. Modify the result returned by the parent to indicate that the only supported media is the currently configured one. Reviewed by: brooks
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-2131-135/+135
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* o add BIOCGDLTLIST and BIOCSDLT ioctls to get the data link type listsam2003-01-202-4/+111
| | | | | | | | | | | | and set the link type for use by libpcap and tcpdump o move mtx unlock in bpfdetach up; it doesn't need to be held so long o change printf in bpf_detach to distinguish it from the same one in bpfsetdlt Note there are locking issues here related to ioctl processing; they have not been addressed here. Submitted by: Guy Harris <guy@alum.mit.edu> Obtained from: NetBSD (w/ locking modifications)
* accept short WEP keys for backward compatibilitysam2003-01-191-2/+1
|
* Originally when DEVFS was added, a global variable "devfs_present"phk2003-01-192-16/+18
| | | | | | | | | | | | was used to control code which were conditional on DEVFS' precense since this avoided the need for large-scale source pollution with #include "opt_geom.h" Now that we approach making DEVFS standard, replace these tests with an #ifdef to facilitate mechanical removal once DEVFS becomes non-optional. No functional change by this commit.
* fix ioctl handling for setting wep keyssam2003-01-191-4/+6
|
* sync with KAME to simplify rev 1.28's patch (no functional changes)suz2003-01-151-24/+41
| | | | | | Obtained from: KAME Reviewd by: fenner Approved by: re (jhb)
* 802.11 link layer support. This code implements the basic 802.11sam2003-01-152-77/+3830
| | | | | | | | | | | state machine to provide station and host ap functionality for drivers. More work will follow to split out the state machine and protocol support from the ioctl interfaces to ease portability/sharing with NetBSD and forthcoming ports to other systems. Reviewed by: imp Obtained from: NetBSD (originally)
* don't reference a pkthdr after M_MOVE_PKTHDR has "remove it"; insteadsam2003-01-061-2/+2
| | | | | | reference the pkthdr now in the destination of the move Sponsored by: Vernier Networks
* Fix alignment problems -- the embedded v4 address is guaranteed tofenner2003-01-051-15/+17
| | | | be only 16-bit aligned, so only do byte operations to compare with it.
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-012-3/+3
| | | | especially in troff files.
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/schweikh2002-12-301-1/+1
| | | | Add FreeBSD Id tag where missing.
* Correct mbuf packet header propagation. Previously, packet headerssam2002-12-301-10/+10
| | | | | | | | | | | | | | | | | | | | | | were sometimes propagated using M_COPY_PKTHDR which actually did something between a "move" and a "copy" operation. This is replaced by M_MOVE_PKTHDR (which copies the pkthdr contents and "removes" it from the source mbuf) and m_dup_pkthdr which copies the packet header contents including any m_tag chain. This corrects numerous problems whereby mbuf tags could be lost during packet manipulations. These changes also introduce arguments to m_tag_copy and m_tag_copy_chain to specify if the tag copy work should potentially block. This introduces an incompatibility with openbsd which we may want to revisit. Note that move/dup of packet headers does not handle target mbufs that have a cluster bound to them. We may want to support this; for now we watch for it with an assert. Finally, M_COPYFLAGS was updated to include M_FIRSTFRAG|M_LASTFRAG. Supported by: Vernier Networks Reviewed by: Robert Watson <rwatson@FreeBSD.org>
* Remove cdevw_add() calls, they are deprecated.phk2002-12-281-1/+0
|
* Remove useless local variable from raw_input().kbyanc2002-12-281-3/+0
| | | | | Sponsored by: NTT Multimedia Communications Labs MFC after: 3 days
* Oops, I misread the purpose of the NULL check in EH_RESTORE() iniedowse2002-12-271-2/+3
| | | | | | | | revision 1.62. It was checking for M_PREPEND() failing, not for the case of a NULL mbuf pointer being supplied to the macro. Back out that revision, and fix the NULL dereference by not calling EH_RESTORE() in the case where the mbuf pointer is NULL because the firewall rejected the packet.
* Fix a bug introduced by revision 1.59 that would cause an immediateiedowse2002-12-271-1/+1
| | | | NULL dereference if a bridged packet was rejected by ipfw.
* Long chain of calls starting with bridge_on(), going through IPv6, andhsu2002-12-271-1/+2
| | | | | ending up at ifa_ifwithdstaddr() could lead to a recursive lock of the ifnet list mutex.
* Disable radix node locking for sysctl until we fix the sysctl infrastructurehsu2002-12-261-5/+5
| | | | to not sleep.
* Typo in function name.ru2002-12-251-4/+4
|
* I'm not sure what was the problem at the time of revision 1.37ru2002-12-251-11/+0
| | | | | | | | when julian@ added it, but the commented out code had at least one bug -- not freeing the allocated mbuf. Anyway, this comment no longer applies as of revision 1.67, so remove it.
* Range-check the address family parameter passed in to the sysctl handler.hsu2002-12-251-0/+2
| | | | Submitted by: ru
* Revision 1.67 changes correspond to CSRG revision 8.3.1.1 changes.ru2002-12-251-1/+1
|
* If the caller of rtrequest*(RTM_DELETE, ...) asked for a copy ofru2002-12-252-19/+6
| | | | | | the entry being removed (ret_nrt != NULL), increment the entry's rt_refcnt like we do it for RTM_ADD and RTM_RESOLVE, rather than messing around with 1->0 transitions for rtfree() all over.
* A month after pst@ has committed his revision 1.8, it wasru2002-12-251-3/+6
| | | | incorporated by UCB as revision 8.5. Do a diff reduction.
* SMP locking for radix nodes.hsu2002-12-245-17/+66
|
* rn_walktree*() compute the next leaf before applying a functionru2002-12-231-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to current leaves because function may vanish the current node. If parent RTA_GENMASK route has a clone (a "cloning clone"), an rn_walktree_from() starting from parent will cause another walk starting from clone. If a function is either rt_fixdelete() or rt_fixchange(), this recursive walk may vanish the leaf that is remembered by an outer walk (the "next leaf" above), panicing a system when it resumes with an outer walk. The following script paniced my single-user mode booted system: : sysctl net.inet.ip.forwarding=1 : ipfw add 1 allow ip from any to any : ifconfig lo0 127.1 : route add -net 10 -genmask 255.255.255.0 127.1 : telnet 10.1 # rt_fixchange() panic : telnet 10.2 : telnet 10.1 : route delete -net 10 # rt_fixdelete() panic For the time being, avoid these races by disallowing recursive walks in rt_fixchange() and rt_fixdelete(). Also, make a slight optimization in the rtrequest(RTM_RESOLVE) case: there is no reason to call rt_fixchange() in this case. PR: kern/37606 MFC after: 5 days
* SMP locking for ifnet list.hsu2002-12-225-13/+58
|
* Swap the order of a free and a use of an ifaddr structure.hsu2002-12-201-1/+1
|
* o Untangle the confusion with the malloc flags {M_WAITOK, M_NOWAIT} andbmilekic2002-12-196-11/+10
| | | | | | | | | | the mbuf allocator flags {M_TRYWAIT, M_DONTWAIT}. o Fix a bpf_compat issue where malloc() was defined to just call bpf_alloc() and pass the 'canwait' flag(s) along. It's been changed to call bpf_alloc() but pass the corresponding M_TRYWAIT or M_DONTWAIT flag (and only one of those two). Submitted by: Hiten Pandya <hiten@unixdaemons.com> (hiten->commit_count++)
OpenPOWER on IntegriCloud