aboutsummaryrefslogtreecommitdiff
path: root/sys/netipx
Commit message (Collapse)AuthorAgeFilesLines
* Fix build problem introduced in r215368 MFC when IPX is enabled.Maxim Sobolev2010-11-161-2/+1
| | | | | | | Submitted by: des Notes: svn path=/stable/7/; revision=215400
* MFC r207554:Maxim Sobolev2010-11-161-1/+1
| | | | | | | | | | | | Add new tunable 'net.link.ifqmaxlen' to set default send interface queue length. The default value for this parameter is 50, which is quite low for many of today's uses and the only way to modify this parameter right now is to edit if_var.h file. Also add read-only sysctl with the same name, so that it's possible to retrieve the current value. Notes: svn path=/stable/7/; revision=215368
* Merge r185928 from head to stable/7:Robert Watson2009-02-061-0/+1
| | | | | | | | | | | Add missing "goto set_head" for SO_IPX_CHECKSUM; otherwise we fall through to the SO_HEADERS_ON_OUTPUT case and set that instead. Found with: Coverity Prevent(tm) Coverity ID: 3988 Notes: svn path=/stable/7/; revision=188226
* MFC an ABI compatible implementation of Multiple routing tables.Julian Elischer2008-07-241-1/+11
| | | | | | | | | | | See the commit message for http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/net/route.c version 1.129 (svn change # 178888) for more info. Obtained from: Ironport (Cisco Systems) Notes: svn path=/stable/7/; revision=180774
* Merge spx_usrreq.c:1.89 (r179410) from head to stable/7:Robert Watson2008-07-021-6/+3
| | | | | | | | Rather than m_free(dtom(si)) in spx_reass(), return (1) which causes the caller to free the mbuf without using dtom(). Notes: svn path=/stable/7/; revision=180188
* Merge spx_usrreq.c:1.88 (r179408) from head to stable/7:Robert Watson2008-07-021-6/+19
| | | | | | | | Correct minor comment typos, make white space use before block comments more consistent. Notes: svn path=/stable/7/; revision=180186
* Merge spx_usrreq.c:1.87 (r179332) from head to stable/7:Robert Watson2008-07-021-1/+1
| | | | | | | Avoid unnecessary one use of dtom(9) in spx_input(). Notes: svn path=/stable/7/; revision=180185
* Make tcpstates[] static, and make sure TCPSTATES is defined beforeDag-Erling Smørgrav2007-07-302-1/+2
| | | | | | | | | | | | <netinet/tcp_fsm.h> is included into any compilation unit that needs tcpstates[]. Also remove incorrect extern declarations and TCPDEBUG conditionals. This allows kernels both with and without TCPDEBUG to build, and unbreaks the tinderbox. Approved by: re (rwatson) Notes: svn path=/head/; revision=171656
* Include priv.h to pick up suser(9) definitions, missed in an earlierRobert Watson2007-06-131-0/+1
| | | | | | | | | commit. Warnings spotted by: kris Notes: svn path=/head/; revision=170689
* Remove IPX over IP tunneling support, which allows IPX routing over IPRobert Watson2007-06-135-569/+1
| | | | | | | | | | | | | tunnels, and was not MPSAFE. The code can be easily restored in the event that someone with an IPX over IP tunnel configuration can work with me to test patches. This removes one of five remaining consumers of NET_NEEDS_GIANT. Approved by: re (kensmith) Notes: svn path=/head/; revision=170664
* Use ANSI C function declarations throughout netipx.Robert Watson2007-05-1112-162/+88
| | | | | | | Remove 'register' use. Notes: svn path=/head/; revision=169463
* Reduce network stack oddness: implement .pru_sockaddr and .pru_peeraddrRobert Watson2007-05-113-6/+6
| | | | | | | | | | | protocol entry points using functions named proto_getsockaddr and proto_getpeeraddr rather than proto_setsockaddr and proto_setpeeraddr. While it's true that sockaddrs are allocated and set, the net effect is to retrieve (get) the socket address or peer address from a socket, not set it, so align names to that intent. Notes: svn path=/head/; revision=169462
* Build ipx_ip.c only if options IPXIP is defined. No functional change.Robert Watson2007-02-261-2/+0
| | | | Notes: svn path=/head/; revision=167015
* Fix a likely bug by adding what appears to be a missing break statementRobert Watson2007-02-261-0/+1
| | | | | | | | in the IPX over IP configuration ioctl: when changing the flags on a tunnel interface, return the generated error rather than always EINVAL. Notes: svn path=/head/; revision=167013
* Further style(9) for ipx_ip.Robert Watson2007-02-252-9/+7
| | | | Notes: svn path=/head/; revision=166958
* Improve ipx_ip.c's approximation of style(9).Robert Watson2007-02-251-95/+80
| | | | Notes: svn path=/head/; revision=166957
* Factor out UCB and my copyrights from copyrights of Mike Mitchell;Robert Watson2007-01-0819-20/+501
| | | | | | | | | | the former use a three-clause BSD license (per UCB authorization letter), whereas he uses a four-clause BSD license. MFC after: 3 days Notes: svn path=/head/; revision=165899
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningRobert Watson2006-11-062-6/+12
| | | | | | | | | | | | | | | | specific privilege names to a broad range of privileges. These may require some future tweaking. Sponsored by: nCircle Network Security, Inc. Obtained from: TrustedBSD Project Discussed on: arch@ Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri, Alex Lyashkov <umka at sevcity dot net>, Skip Ford <skip dot ford at verizon dot net>, Antoine Brodin <antoine dot brodin at laposte dot net> Notes: svn path=/head/; revision=164033
* Change semantics of socket close and detach. Add a new protocol switchRobert Watson2006-07-212-15/+43
| | | | | | | | | | | | | | | | | | | | | | function, pru_close, to notify protocols that the file descriptor or other consumer of a socket is closing the socket. pru_abort is now a notification of close also, and no longer detaches. pru_detach is no longer used to notify of close, and will be called during socket tear-down by sofree() when all references to a socket evaporate after an earlier call to abort or close the socket. This means detach is now an unconditional teardown of a socket, whereas previously sockets could persist after detach of the protocol retained a reference. This faciliates sharing mutexes between layers of the network stack as the mutex is required during the checking and removal of references at the head of sofree(). With this change, pru_detach can now assume that the mutex will no longer be required by the socket layer after completion, whereas before this was not necessarily true. Reviewed by: gnn Notes: svn path=/head/; revision=160549
* Make this compile without INVARIANTS.Olivier Houchard2006-04-111-0/+2
| | | | Notes: svn path=/head/; revision=157672
* Chance protocol switch method pru_detach() so that it returns voidRobert Watson2006-04-012-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | rather than an error. Detaches do not "fail", they other occur or the protocol flags SS_PROTOREF to take ownership of the socket. soclose() no longer looks at so_pcb to see if it's NULL, relying entirely on the protocol to decide whether it's time to free the socket or not using SS_PROTOREF. so_pcb is now entirely owned and managed by the protocol code. Likewise, no longer test so_pcb in other socket functions, such as soreceive(), which have no business digging into protocol internals. Protocol detach routines no longer try to free the socket on detach, this is performed in the socket code if the protocol permits it. In rts_detach(), no longer test for rp != NULL in detach, and likewise in other protocols that don't permit a NULL so_pcb, reduce the incidence of testing for it during detach. netinet and netinet6 are not fully updated to this change, which will be in an upcoming commit. In their current state they may leak memory or panic. MFC after: 3 months Notes: svn path=/head/; revision=157370
* Change protocol switch pru_abort() API so that it returns void ratherRobert Watson2006-04-012-12/+4
| | | | | | | | | | | | | | | | | than an int, as an error here is not meaningful. Modify soabort() to unconditionally free the socket on the return of pru_abort(), and modify most protocols to no longer conditionally free the socket, since the caller will do this. This commit likely leaves parts of netinet and netinet6 in a situation where they may panic or leak memory, as they have not are not fully updated by this commit. This will be corrected shortly in followup commits to these components. MFC after: 3 months Notes: svn path=/head/; revision=157366
* Add a simple netipx TODO list to the end of README, since there are aRobert Watson2006-03-271-0/+19
| | | | | | | | | | number of problems with netipx that I have not yet resolved, and I don't want them lost track of. MFC after: 1 month Notes: svn path=/head/; revision=157175
* Canonicalize copyright order in one more file that contains myRobert Watson2006-03-271-3/+4
| | | | | | | | | copyright. MFC after: 1 month Notes: svn path=/head/; revision=157170
* In spx_output(), use M_DONTWAIT instead of M_TRYWAIT, as we hold theRobert Watson2006-03-271-5/+6
| | | | | | | | | | | ipxpcb mutex. Contrary to the comment, even in 4.x this was unsafe, as parallel use of the socket by another process would result in pcb corruption if the mbuf allocation slept. MFC after: 1 month Notes: svn path=/head/; revision=157167
* In spx_input(), change a '&&' to a '||', as the spx trace code is ableRobert Watson2006-03-271-1/+1
| | | | | | | | | to handle a NULL 'cb' here. MFC after: 1 month Notes: svn path=/head/; revision=157164
* In spx_accept, assert ipxp != NULL, not == NULL.Robert Watson2006-03-261-1/+1
| | | | | | | MFC after: 1 month Notes: svn path=/head/; revision=157154
* In various SPX protocol entry points from the socket layer, checkRobert Watson2006-03-261-7/+53
| | | | | | | | | | | IPXP_DROPPED before continuing, and return EINVAL or ECONNRESET if it is flagged. It's unclear why each situation should be one or the other, but it is copied from netinet which has the same bugs. MFC after: 1 month Notes: svn path=/head/; revision=157153
* Add a new ipxpcb flag, IPXP_SPX, which is set on ipxpcb's to mark themRobert Watson2006-03-262-9/+15
| | | | | | | | | | | | | as belonging to SPX. This replaces the implicit assumption that the cb pointer for non-SPX pcb's will be NULL. This isn't required in TCP/IP as different pcb lists are maintained for different IP protocols; IPX stores all pcbs on the same global ipxpcb_list. Foot provided by: gnn MFC after: 1 month Notes: svn path=/head/; revision=157145
* Restore original formulation of SPX segment queue draining during SPXRobert Watson2006-03-261-1/+3
| | | | | | | | | PCB detach. MFC after: 1 month Notes: svn path=/head/; revision=157140
* Rework IPX/SPX socket and pcb reference model:Robert Watson2006-03-254-92/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Introduce invariant that all IPX/SPX sockets will have valid so_pcb pointers to ipxpcb structures, and that for SPX, the control block pointer will always be valid. Don't attempt to free the socket or pcb at various odd points, such as disconnect. - Add a new ipxpcb flag, IPXP_DROPPED, which will be set in place of freeing PCB's so that this invariant can be maintained. This flag is now checked instead of a NULL check in various socket protocol calls. - Introduce many assertions that this invariant holds. - Various pieces of code, such as the SPX timer code, no longer needs to jump through hoops in case it frees a PCB while running. - Break out ipx_pcbfree() from ipx_pcbdetach(). Likewise spx_pcbdetach(). - Comment on some SMP-related limitations to the SPX code. - Update copyrights. MFC after: 1 month Notes: svn path=/head/; revision=157128
* Restructure spx_attach() to properly free memory in the event that oneRobert Watson2006-03-251-21/+32
| | | | | | | | | | | | | of its allocations fails. Allocate the ipxp last so as to avoid having to free it if another allocation goes wrong. Normalize retrieval of ipxp and cb from socket in spx_sp_attach(), and add assertions. MFC after: 1 month Notes: svn path=/head/; revision=157127
* Don't bother restoring host byte order of mbuf fields when we're justRobert Watson2006-03-251-3/+0
| | | | | | | | | about to free the mbuf in the spx_input() error path. MFC after: 1 month Notes: svn path=/head/; revision=157126
* In spx_ctloutput(), acquire the ipxp lock around read operations,Robert Watson2006-03-251-15/+25
| | | | | | | | | | | especially reads of spx header structures, which will now be cached in the stack until they can be copied out after releasing the lock. Panic if a bad socket option direction is passed in by the caller. MFC after: 1 month Notes: svn path=/head/; revision=157125
* Slight style reformatting of spx_timers() comments; panic if anRobert Watson2006-03-251-10/+12
| | | | | | | | | unrecognized timer is passed into the function. MFC after: 1 month Notes: svn path=/head/; revision=157124
* Include kernel.h to get NET_NEEDS_GIANT() definition, which for someRobert Watson2006-03-241-0/+1
| | | | | | | | | | reason compiled fine here. I may be running with other include file changes locally. MFC after: 3 days Notes: svn path=/head/; revision=157104
* Clean up and style(9) SPX code prior to significant functional changesRobert Watson2006-03-242-215/+257
| | | | | | | | | | | | | | | | | being committed: - Wrap comments more evenly on right border. - Clean up braces. Also, along similar lines: - Assert some pointers are non-NULL before dereferencing them. - Remove one assertion that looks, on face value, poor. MFC after: 1 month Notes: svn path=/head/; revision=157094
* Protect spx_iss using its own mutex, spx_mtx, rather than piggy-backingRobert Watson2006-03-241-1/+11
| | | | | | | | | | on the global IPX mutex, which is not held at all necessary strategic points. MFC after: 1 month Notes: svn path=/head/; revision=157069
* Move definition of spxrexmtthresh to top of file with other globalRobert Watson2006-03-241-2/+1
| | | | | | | | | variables. MFC after: 1 month Notes: svn path=/head/; revision=157068
* Canonicalize, update copyright.Robert Watson2006-03-241-102/+52
| | | | | | | | | | Remove 'register'. Use ANSI prototypes, not K&R. MFC after: 1 month Notes: svn path=/head/; revision=157067
* Update copyright to 2006, comment on my contribution to this code in theRobert Watson2006-03-241-1/+4
| | | | | | | | | style of previous contributors. MFC after: 1 month Notes: svn path=/head/; revision=157066
* Comment that raw output filter code for IPX should run in a netisr so asRobert Watson2006-03-241-0/+4
| | | | | | | | | | to avoid recursing the socket code, as this input path can run in the call stack of an output path. MFC after: 1 month Notes: svn path=/head/; revision=157065
* When the kernel is compiled with options IPXIP, run the network stackRobert Watson2006-03-231-0/+2
| | | | | | | | | | | with Giant, as there is current unsafety in the IPX tunneled over IP code. There have been no reports of trouble, but there probably would be if anyone were running this code at high speed on SMP systems. MFC after: 3 days Notes: svn path=/head/; revision=157060
* Move spx_savesi from being a global variable to an automatically allocatedRobert Watson2006-03-232-3/+3
| | | | | | | | | | | variable on the spx_input() stack. It's not very large, and this will avoid parallelism issues when spx_input() runs in more than one thread at a time. MFC after: 1 month Notes: svn path=/head/; revision=157051
* Admit to ourselves that we don't actually implement pr_ctlinput() forRobert Watson2006-03-232-44/+2
| | | | | | | | | IPX or SPX, as the code in the implementing functions is essentially a no-op. Replace with a comment indicating we don't implement these currently. Notes: svn path=/head/; revision=157050
* In spx_attach() and spx_detach(), there is no need to check whether theRobert Watson2006-01-141-4/+0
| | | | | | | | | | | | ipxpcb is NULL or not: in attach it will be, and on detach it won't be. If for any reason these invariants don't hold true, panicking is a good idea. Noticed by: Coverity Prevent analysis tool MFC after: 3 days Notes: svn path=/head/; revision=154323
* Remove dead code associated with 'mcopy' in ipx_forward(): at no pointRobert Watson2006-01-131-26/+1
| | | | | | | | | | | | are the contents of the forwarded mbuf ever copied into mcopy, so there's no need to have mcopy, conditionally look at mcopy, or conditionally free it. Noticed by: Coverity Prevent analysis tool MFC after: 3 days Notes: svn path=/head/; revision=154320
* Include ip_options.h for IPX-IP encapsulation.Andre Oppermann2005-11-201-0/+1
| | | | | | | | Noticed by: Tinderbox Sponsored by: TCP/IP Optimization Fundraise 2005 Notes: svn path=/head/; revision=152638
* Use sparse initializers for "struct domain" and "struct protosw",Ruslan Ermilov2005-11-091-29/+46
| | | | | | | so they are easier to follow for the human being. Notes: svn path=/head/; revision=152242
* Retire MT_HEADER mbuf type and change its users to use MT_DATA.Andre Oppermann2005-11-022-4/+4
| | | | | | | | | | | | | | | Having an additional MT_HEADER mbuf type is superfluous and redundant as nothing depends on it. It only adds a layer of confusion. The distinction between header mbuf's and data mbuf's is solely done through the m->m_flags M_PKTHDR flag. Non-native code is not changed in this commit. For compatibility MT_HEADER is mapped to MT_DATA. Sponsored by: TCP/IP Optimization Fundraise 2005 Notes: svn path=/head/; revision=151967