summaryrefslogtreecommitdiffstats
path: root/sys/net
Commit message (Collapse)AuthorAgeFilesLines
* Back out my lats commit of locking down a socket, it conflicts with hsu's work.tanimura2002-05-313-25/+3
| | | | Requested by: hsu
* Ensure that packet counts are always reset to 0 whensilby2002-05-311-0/+1
| | | | | | | | a route is cloned. Previously, they took on the count of their parent route (which was sometimes nonzero.) Submitted by: Andre Oppermann <oppermann@pipeline.ch> MFC after: 5 days
* Add one copy of crc32() and crc32_tab[] in libkern, and remove it two otherphk2002-05-291-0/+4
| | | | | | | places. Comment out crc32 related definitions in zlib.h, we don't seem to have the corresponding code in our kernel.
* Make discard devices clonable and unloadable. Also, change thebrooks2002-05-251-15/+57
| | | | interface name from ds# to disc#.
* Move all unit number management cloned interfaces into the cloningbrooks2002-05-257-39/+47
| | | | | | | | code. The reverts the API change which made the <if>_clone_destory() functions return an int instead of void bringing us into closer alignment with NetBSD. Reviewed by: net (a long time ago)
* Fix warning; remove unused arg that was passed through uninitialized.peter2002-05-241-2/+2
|
* Include <sys.systm.h> for the declaration of some atomic functions -- don'tbde2002-05-221-0/+1
| | | | depend on namespace pollution in <sys/mutex.h>.
* Avoid exposing struct if_clone and the sys/queue.h macros to userlandiedowse2002-05-201-0/+4
| | | | | | programs by restricting these to the case where _KERNEL is defined. Reviewed by: brooks (ages ago)
* Lock down a socket, milestone 1.tanimura2002-05-203-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Add a mutex (sb_mtx) to struct sockbuf. This protects the data in a socket buffer. The mutex in the receive buffer also protects the data in struct socket. o Determine the lock strategy for each members in struct socket. o Lock down the following members: - so_count - so_options - so_linger - so_state o Remove *_locked() socket APIs. Make the following socket APIs touching the members above now require a locked socket: - sodisconnect() - soisconnected() - soisconnecting() - soisdisconnected() - soisdisconnecting() - sofree() - soref() - sorele() - sorwakeup() - sotryfree() - sowakeup() - sowwakeup() Reviewed by: alfred
* More s/file system/filesystem/gtrhodes2002-05-161-1/+1
|
* Add ipfw hooks to ether_demux() and ether_output_frame().luigi2002-05-131-0/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ipfw processing of frames at layer 2 can be enabled by the sysctl variable net.link.ether.ipfw=1 Consider this feature experimental, because right now, the firewall is invoked in the places indicated below, and controlled by the sysctl variables listed on the right. As a consequence, a packet can be filtered from 1 to 4 times depending on the path it follows, which might make a ruleset a bit hard to follow. I will add an ipfw option to tell if we want a given rule to apply to ether_demux() and ether_output_frame(), but we have run out of flags in the struct ip_fw so i need to think a bit on how to implement this. to upper layers | | +----------->-----------+ ^ V [ip_input] [ip_output] net.inet.ip.fw.enable=1 | | ^ V [ether_demux] [ether_output_frame] net.link.ether.ipfw=1 | | +->- [bdg_forward]-->---+ net.link.ether.bridge_ipfw=1 ^ V | | to devices
* Fix logic inversion bug.kbyanc2002-05-111-2/+2
|
* Fix a misplaced break statement within a switch that accidentally madejoerg2002-05-101-1/+1
| | | | | | | | | | it into an "#ifdef INET6" block. This caused a (harmless but annoying) EINVAL return value to be sent even though the operation completed successfully. PR: kern/37786 Submitted by: Ari Suutari <ari.suutari@syncrontech.com>,David Malone <dwmalone@maths.tcd.ie> MFC after: 1 day
* Cleanup the interface to ip_fw_chk, two of the input argumentsluigi2002-05-091-36/+34
| | | | | | | | | | | | | | | were totally useless and have been removed. ip_input.c, ip_output.c: Properly initialize the "ip" pointer in case the firewall does an m_pullup() on the packet. Remove some debugging code forgotten long ago. ip_fw.[ch], bridge.c: Prepare the grounds for matching MAC header fields in bridged packets, so we can have 'etherfw' functionality without a lot of kernel and userland bloat.
* Roll my own min() (named ISO88025_MIN() so as to not cause conflicts) sokbyanc2002-05-081-2/+4
| | | | | | that this header may be included from userland where min() may not be declared (or worse, declared differently). I open to alternative solutions.
* Move ISO88025 source routing information into sockaddr_dl's sdl_datakbyanc2002-05-073-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | field. This returns the sdl_data field to a variable-length field. More importantly, this prevents a easily-reproduceable data-corruption bug when the interface name plus the hardware address exceed the sdl_data field's original 12 byte limit. However, token-ring interfaces may still overflow the new sdl_data field's 46 byte limit if the interface name exceeds 6 characters (since 6 characters for interface name plus 6 for hardware address plus 34 for source routing = the size of sdl_data). Further refinements could overcome this limitation but would break binary compatibility; this commit only addresses fixing the bug for commonly-occuring cases without breaking binary compatibility with the intention that the functionality can be MFC'ed to -stable. See message ID's (both send to -arch): 20020421013332.F87395-100000@gateway.posi.net 20020430181359.G11009-300000@gateway.posi.net for a more thorough description of the bug addressed and how to reproduce it. Approved by: silence on -arch and -net Sponsored by: NTT Multimedia Communications Labs MFC after: 1 week
* MFOpenBSD: ibss and ibss-master.imp2002-05-071-0/+4
| | | | | | | | | | | | | ibss is the modern ad-hoc mode. ibss-master is the same, except that it creates the ibss network. This distinction is necessary because some supported cards (symbol) support the former without supporting the latter. A seprate commit will introduce a demo-adhoc mode so that we can disentwingle the multiple, mutually exclusive meandings of adhoc in the present state of affairs. Submitted by: jhay
* Minor style nitimp2002-05-071-1/+1
|
* Make funsetown() take a 'struct sigio **' so that the locking canalfred2002-05-063-3/+3
| | | | | | | | | | | | | | | | be done internally. Ensure that no one can fsetown() to a dying process/pgrp. We need to check the process for P_WEXIT to see if it's exiting. Process groups are already safe because there is no such thing as a pgrp zombie, therefore the proctree lock completely protects the pgrp from having sigio structures associated with it after it runs funsetownlst. Add sigio lock to witness list under proctree and allproc, but over proc and pgrp. Seigo Tanimura helped with this.
* Redo the sigio locking.alfred2002-05-014-7/+3
| | | | | | | | | | | Turn the sigio sx into a mutex. Sigio lock is really only needed to protect interrupts from dereferencing the sigio pointer in an object when the sigio itself is being destroyed. In order to do this in the most unintrusive manner change pgsigio's sigio * argument into a **, that way we can lock internally to the function.
* "pointers are not permitted as case values", so force the macros to ints.obrien2002-05-011-2/+2
|
* Revert the change of #includes in sys/filedesc.h and sys/socketvar.h.tanimura2002-04-302-8/+14
| | | | | | | | | | Requested by: bde Since locking sigio_lock is usually followed by calling pgsigio(), move the declaration of sigio_lock and the definitions of SIGIO_*() to sys/signalvar.h. While I am here, sort include files alphabetically, where possible.
* Move us yet closer to IFM_* definitions in NetBSD.phk2002-04-291-42/+42
|
* Follow NetBSD and s/IFM_1000_TX/IFM_1000_T/phk2002-04-281-2/+2
|
* Add a global sx sigio_lock to protect the pointer to the sigio objecttanimura2002-04-271-1/+3
| | | | | | | | | | of a socket. This avoids lock order reversal caused by locking a process in pgsigio(). sowakeup() and the callers of it (sowwakeup, soisconnected, etc.) now require sigio_lock to be locked. Provide sowwakeup_locked(), soisconnected_locked(), and so on in case where we have to modify a socket and wake up a process atomically.
* just merged cosmetic changes from KAME to ease sync between KAME and FreeBSD.suz2002-04-198-22/+78
| | | | | | | (based on freebsd4-snap-20020128) Reviewed by: ume MFC after: 1 week
* Cosmetical change: remove empty line to reduce diffs to RELENG_4fjoe2002-04-141-1/+0
|
* Add hostap 802.11 media type.imp2002-04-121-0/+2
| | | | From wi_hostap stuff by Thomas Skibo
* Add two more IEEE80211 defines for status.imp2002-04-111-0/+2
|
* Swap a bzero for an M_ZERO. Borris approved this ages ago, butdwmalone2002-04-101-2/+1
| | | | | | | the hard drive with the patch on it went south before I committed it. Approved by: bp
* Add missing 'struct ifreq ifr;' that was forgotten in the last commit.peter2002-04-101-0/+1
|
* fixed a kernel crash when enabling multicast on vlan interfacesuz2002-04-101-4/+9
| | | | | | | owing to a NULL argument to vlan_ioctl() at if_allmulti(). Reviewed by: ume MFC after: 1 week
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-045-11/+12
| | | | | | | most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64
* Replace (deprecated ?) FREE() macro with direct calls to free()luigi2002-04-048-22/+22
|
* Fix incorrect m_free - m_freem() usage.luigi2002-04-041-3/+2
|
* Fix a couple of incorrect m_free() vs. m_freem() usages and related issues.luigi2002-04-043-31/+20
| | | | Reviewed-by: brooks
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-019-26/+30
| | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@
* Make `route add -inet6 default ::1 -ifp gif0' work actually.ume2002-04-011-5/+1
| | | | | | The change between 1.13 and 1.14 is specific to AF_INET. MFC after: 1 week
* - Merge the pdq driver (if_fpa and if_fea) from NetBSD.mdodd2002-03-292-6/+11
| | | | | Among other things this gets us ifmedia support. - Update fddi_ifattach() to take an additional argument.
* - Define fddibroadcastaddr in if_fddisubr.c.mdodd2002-03-292-5/+108
| | | | - Add fddi_ifdetach() and fddi_ioctl().
* - Use ifp->if_broadcastaddr when possible.mdodd2002-03-291-4/+2
| | | | - Remove unnecessary preprocessor conditional.
* - Add a comment.mdodd2002-03-291-2/+4
| | | | | - Whitespace. - Remove forgotten duplicate assignments in fddi_ifattach().
* - Update interface statistics on error conditions.mdodd2002-03-291-13/+50
| | | | | | | - Make sure the interface is UP and RUNNING in fddi_input(). - Reorder and comment packet tests in fddi_input(). - Call if_attach() in fddi_ifattach(). - Test for a valid return from ifaddr_byindex().
* - Whitespace changes.mdodd2002-03-291-8/+17
| | | | | | - Formatting. - Use macro, not magic numbers. - Move a dropanyway label in fddi_input() to end of function.
* Back a small part of the last patch.mdodd2002-03-291-3/+3
|
* - Simplify first arg of nd6_storelladdr().mdodd2002-03-291-15/+29
| | | | | | | - Use struct fddi_header where appropriate. - Use bcopy() rather than memcpy(). - Use FDDI_ADDR_LEN macro instead of ETHER_ADDR_LEN macro. - Add loadable module support.
* - Use net/fddi.h rather than netinet/if_fddi.h.mdodd2002-03-291-21/+21
| | | | | | - Use FDDI_ADDR_LEN rather than a magic number or a sizeof(). - Hide distracting sizeof() behind FDDI_HDR_LEN macro. - Don't use sizeof(struct llc) in areas where we mean LLC_SNAPFRAMELEN.
* Sync defines with NetBSD.mdodd2002-03-291-13/+30
| | | | Define FDDI_ADDR_LEN and use it.
* Remove unnecessary LLC defines and use the standard ones.mdodd2002-03-291-16/+6
|
* - style(9) fixes for 'return'.mdodd2002-03-291-22/+21
| | | | | - retire RTALLOC1 and ARPRESOLVE macros. - use IFP2AC to hide discracting casts.
OpenPOWER on IntegriCloud