summaryrefslogtreecommitdiff
path: root/sys/netinet6
Commit message (Collapse)AuthorAgeFilesLines
* __FreeBSD__ is not a compiler constant. We must useHajimu UMEMOTO2002-05-311-1/+1
| | | | | | | | | __FreeBSD_version here. Submitted by: rwatson Notes: svn path=/head/; revision=97676
* Back out my lats commit of locking down a socket, it conflicts with hsu's work.Seigo Tanimura2002-05-317-151/+38
| | | | | | | Requested by: hsu Notes: svn path=/head/; revision=97658
* o Conditionalize sections for POSIX.1-2001 compatibility.Mike Barcroft2002-05-231-31/+49
| | | | | | | | | | | | | o Use POSIX spelling for types, where possible. o Define size_t in the __BSD_VISIBLE case (this isn't really needed for standards conformance, but follows the tradition of not requiring <sys/types.h> as a prerequisite). o Use _BYTE_ORDER and friends instead of BYTE_ORDER and friends, since there may not be enough pollution in order for the latter to work. o Add an XXX note about the missing IPPROTO_IPV6 macro. Notes: svn path=/head/; revision=97181
* Lock down a socket, milestone 1.Seigo Tanimura2002-05-207-38/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=96972
* Recent zlib does not like Z_FLUSH at the end of inflate().Hajimu UMEMOTO2002-05-121-4/+7
| | | | | | | | | | Reported by: quak@mydiax.ch Obtained from: KAME MFC after: 2 days and approved by re Notes: svn path=/head/; revision=96457
* Revised MLD-related definitionsHajimu UMEMOTO2002-05-062-53/+54
| | | | | | | | | | | | | | | - Used mld_xxx and MLD_xxx instead of mld6_xxx and MLD6_xxx according to the official defintions in rfc2292bis (macro definitions for backward compatibility were provided) - Changed the first member of mld_hdr{} from mld_hdr to mld_icmp6_hdr to avoid name space conflict in C++ This change makes ports/net/pchar compilable again under -CURRENT. Obtained from: KAME Notes: svn path=/head/; revision=96116
* Revert the change of #includes in sys/filedesc.h and sys/socketvar.h.Seigo Tanimura2002-04-304-35/+47
| | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=95759
* Correct timer management (deprecated) in nd6_timer.Hajimu UMEMOTO2002-04-241-2/+3
| | | | | | | | Obtained from: KAME MFC after: 3 days Notes: svn path=/head/; revision=95395
* just merged cosmetic changes from KAME to ease sync between KAME and FreeBSD.SUZUKI Shinsuke2002-04-1938-339/+375
| | | | | | | | | | (based on freebsd4-snap-20020128) Reviewed by: ume MFC after: 1 week Notes: svn path=/head/; revision=95023
* Unconditionalize the definition of INET_ADDRSTRLEN andMike Barcroft2002-04-101-2/+0
| | | | | | | | INET6_ADDRSTRLEN. Doing this helps expose bogus redefinitions in 3rd party software. Notes: svn path=/head/; revision=94357
* Use <net/fddi.h> rather than <netinet/if_fddi.h>.Matthew N. Dodd2002-04-061-1/+1
| | | | Notes: svn path=/head/; revision=93920
* Change callers of mtx_init() to pass in an appropriate lock type name. InJohn Baldwin2002-04-041-1/+1
| | | | | | | | | | 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 Notes: svn path=/head/; revision=93818
* Change the suser() API to take advantage of td_ucred as well as do aJohn Baldwin2002-04-018-12/+16
| | | | | | | | | | | | | | | 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@ Notes: svn path=/head/; revision=93593
* In nd6_lookup(), check if rt_llinfo is non-NULL to avoid returning anHajimu UMEMOTO2002-04-011-4/+9
| | | | | | | | | | entry that has the LLINFO flag but is not a neighbor cache entry. Obtained from: KAME MFC after: 1 week Notes: svn path=/head/; revision=93539
* Fix cached route problem.Hajimu UMEMOTO2002-03-291-0/+1
| | | | | | | | | Submitted by: Keiichi SHIMA <keiichi@iij.ad.jp> (KAME) Reviewed by: JINMEI Tatuya <jinmei@isl.rdc.toshiba.co.jp> (KAME) MFC after: 1 week Notes: svn path=/head/; revision=93388
* double m_free() - not critical. from niklas@openbsdHajimu UMEMOTO2002-03-291-3/+1
| | | | | | | | Obtained from: KAME MFC after: 1 week Notes: svn path=/head/; revision=93364
* Corrected arguments to key_allocsa called fromHajimu UMEMOTO2002-03-252-7/+11
| | | | | | | | | | | {esp6, ah6}_ctlinput. Previous ones were uninitialized auto variables, which were completely bogus. Obtained from: KAME MFC after: 1 week Notes: svn path=/head/; revision=93133
* 3rd arg to bcmp() was wrong. From: David Wang <dsw@juniper.net>Hajimu UMEMOTO2002-03-251-1/+1
| | | | | | | | Obtained from: KAME MFC after: 1 week Notes: svn path=/head/; revision=93128
* Remove references to vm_zone.h and switch over to the new uma API.Jeff Roberson2002-03-201-2/+2
| | | | Notes: svn path=/head/; revision=92767
* Pacify gcc-3.1.Peter Wemm2002-03-191-2/+1
| | | | Notes: svn path=/head/; revision=92733
* Remove duplicate extern declarations to silence warnings.Alfred Perlstein2002-03-194-9/+0
| | | | Notes: svn path=/head/; revision=92716
* put an extern for ip6_protox in here where it is only used for kernel compilingDarren Reed2002-03-191-0/+1
| | | | Notes: svn path=/head/; revision=92700
* put an extern for inet6sw in here and make it active only for kernel compilingDarren Reed2002-03-191-0/+4
| | | | Notes: svn path=/head/; revision=92699
* o Add INET_ADDRSTRLEN and INET6_ADDRSTRLEN defines to <arpa/inet.h>Mike Barcroft2002-03-101-0/+2
| | | | | | | | | | for POSIX.1-2001 conformance. o Add magic to <netinet/in.h> and <netinet6/in6.h> to prevent redefining INET_ADDRSTRLEN and INET6_ADDRSTRLEN. o Add a note about missing typedefs in <arpa/inet.h>. Notes: svn path=/head/; revision=91984
* - use des_ecb3_encrypt().Hajimu UMEMOTO2002-03-051-11/+9
| | | | | | | | | | - style: added spaces after /* and before */ Obtained from: KAME MFC after: 2 weeks Notes: svn path=/head/; revision=91713
* Oops, now, encription and decription are separate function.Hajimu UMEMOTO2002-03-051-2/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=91712
* - Speedup 3DES by using assembly code for i386.Hajimu UMEMOTO2002-03-051-2/+2
| | | | | | | | | | - Sync des/blowfish to more recent openssl. Obtained from: KAME/NetBSD MFC after: 2 weeks Notes: svn path=/head/; revision=91671
* - In nd6_rtrequest(), ignored a route when it is created by cloning andHajimu UMEMOTO2002-02-281-0/+21
| | | | | | | | | | | | | is not a neighbor. see comments for the detailed reason. - Rejected the process of nd6_rtrequest() when the request is RESOLVE and the interface does not need neighbor caches. Obtained from: KAME MFC After: 1 week Notes: svn path=/head/; revision=91491
* Fix another boatload of warnings (missing include) and a cosmeticPeter Wemm2002-02-282-0/+4
| | | | | | | -Wuninitialized warning. Notes: svn path=/head/; revision=91453
* Introduce a version field to `struct xucred' in place of one of theDima Dorfman2002-02-271-5/+1
| | | | | | | | | | | | | | | spares (the size of the field was changed from u_short to u_int to reflect what it really ends up being). Accordingly, change users of xucred to set and check this field as appropriate. In the kernel, this is being done inside the new cru2x() routine which takes a `struct ucred' and fills out a `struct xucred' according to the former. This also has the pleasant sideaffect of removing some duplicate code. Reviewed by: rwatson Notes: svn path=/head/; revision=91354
* Fix warnings caused by discarding const.Alfred Perlstein2002-02-276-9/+11
| | | | | | | Hairy Eyeball At: peter Notes: svn path=/head/; revision=91346
* Fix warnings in the gif(4) driver so it compiles with -Werror.Brooks Davis2002-02-261-2/+1
| | | | Notes: svn path=/head/; revision=91327
* o Move NTOHL() and associated macros into <sys/param.h>. These areMike Barcroft2002-02-182-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | deprecated in favor of the POSIX-defined lowercase variants. o Change all occurrences of NTOHL() and associated marcros in the source tree to use the lowercase function variants. o Add missing license bits to sparc64's <machine/endian.h>. Approved by: jake o Clean up <machine/endian.h> files. o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>. o Remove prototypes for non-existent bswapXX() functions. o Include <machine/endian.h> in <arpa/inet.h> to define the POSIX-required ntohl() family of functions. o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>, and <sys/param.h>. o Prepend underscores to the ntohl() family to help deal with complexities associated with having MD (asm and inline) versions, and having to prevent exposure of these functions in other headers that happen to make use of endian-specific defines. o Create weak aliases to the canonical function name to help deal with third-party software forgetting to include an appropriate header. o Remove some now unneeded pollution from <sys/types.h>. o Add missing <arpa/inet.h> includes in userland. Tested on: alpha, i386 Reviewed by: bde, jake, tmm Notes: svn path=/head/; revision=90868
* Corrected an argument to in6_pcbnotify().Hajimu UMEMOTO2002-02-041-2/+3
| | | | | | | | Obtained from: KAME MFC after: 1 week Notes: svn path=/head/; revision=90199
* - Check the address family of a cached destination, in case ofHajimu UMEMOTO2002-01-211-1/+4
| | | | | | | | | | sharing the cache with IPv4. - Check if the cached route is up in in6_selectsrc(). Obtained from: KAME Notes: svn path=/head/; revision=89623
* Initialise the intrq_present fields at runtime, not link time. This allowsMike Smith2002-01-081-1/+1
| | | | | | | | | us to load protocols at runtime, and avoids the use of common variables. Also fix the ip6_intrq assignment so that it works at all. Notes: svn path=/head/; revision=89069
* Staticise the fw chain.Mike Smith2002-01-081-1/+1
| | | | Notes: svn path=/head/; revision=89067
* Back out cometic changes. This is for easily syncing with KAME in other BSDs.Munechika SUMIKAWA2001-12-171-5/+5
| | | | Notes: svn path=/head/; revision=88069
* Update to C99, s/__FUNCTION__/__func__/,David E. O'Brien2001-12-101-1/+1
| | | | | | | also don't use ANSI string concatenation. Notes: svn path=/head/; revision=87599
* - Replace M_WAIT with M_TRYWAIT since the M_WAIT flag is deprecated.Andrew R. Reiter2001-12-091-1/+1
| | | | | | | Spotted by: bde Notes: svn path=/head/; revision=87565
* fixed the cast128 calculation with a short cipher key length.Hajimu UMEMOTO2001-11-271-1/+2
| | | | | | | | | | the memory was overridden when the key length was less than 16 bytes. Obtained from: KAME MFC after: 1 week Notes: svn path=/head/; revision=86975
* Introduce a syncache, which enables FreeBSD to withstand a SYN floodJonathan Lemon2001-11-221-1/+1
| | | | | | | | | | DoS in an improved fashion over the existing code. Reviewed by: silby (in a previous iteration) Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=86764
* Give struct socket structures a ref counting interface similar toMatthew Dillon2001-11-171-1/+1
| | | | | | | | | | vnodes. This will hopefully serve as a base from which we can expand the MP code. We currently do not attempt to obtain any mutex or SX locks, but the door is open to add them when we nail down exactly how that part of it is going to work. Notes: svn path=/head/; revision=86487
* o Replace reference to 'struct proc' with 'struct thread' in 'structRobert Watson2001-11-081-1/+1
| | | | | | | | | | | | | | | | | | sysctl_req', which describes in-progress sysctl requests. This permits sysctl handlers to have access to the current thread, permitting work on implementing td->td_ucred, migration of suser() to using struct thread to derive the appropriate ucred, and allowing struct thread to be passed down to other code, such as network code where td is not currently available (and curproc is used). o Note: netncp and netsmb are not updated to reflect this change, as they are not currently KSE-adapted. Reviewed by: julian Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=86183
* Fixed the behavior when there is no inbound policy for the ipsecHajimu UMEMOTO2001-11-061-0/+8
| | | | | | | | | | | | | | | | tunneled packet. When there is no suitable inbound policy for the packet of the ipsec tunnel mode, the kernel never decapsulate the tunneled packet as the ipsec tunnel mode even when the system wide policy is "none". Then the kernel leaves the generic tunnel module to process this packet. If there is no rule of the generic tunnel, the packet is rejected and the statistics will be counted up. Obtained from: KAME MFC after: 1 week Notes: svn path=/head/; revision=86159
* Fix fragmented packet handling.Munechika SUMIKAWA2001-10-291-2/+2
| | | | | | | | Obtained from: KAME MFC after: 3 weeks Notes: svn path=/head/; revision=85675
* Pull post-4.4BSD change to sys/net/route.c from BSD/OS 4.2.Ruslan Ermilov2001-10-173-8/+6
| | | | | | | | | | | | | | | | | | | | | | | Have sys/net/route.c:rtrequest1(), which takes ``rt_addrinfo *'' as the argument. Pass rt_addrinfo all the way down to rtrequest1 and ifa->ifa_rtrequest. 3rd argument of ifa->ifa_rtrequest is now ``rt_addrinfo *'' instead of ``sockaddr *'' (almost noone is using it anyways). Benefit: the following command now works. Previously we needed two route(8) invocations, "add" then "change". # route add -inet6 default ::1 -ifp gif0 Remove unsafe typecast in rtrequest(), from ``rtentry *'' to ``sockaddr *''. It was introduced by 4.3BSD-Reno and never corrected. Obtained from: BSD/OS, NetBSD MFC after: 1 month PR: kern/28360 Notes: svn path=/head/; revision=85074
* Pull fix for memory leak in in6_losing() from netinet/in_pcb.c,v 1.85.Ruslan Ermilov2001-10-171-3/+2
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=85072
* Fixed to process a IPv6 packet when ah transport after esp tunnelHajimu UMEMOTO2001-10-171-3/+42
| | | | | | | | | | | should be applied. the SA of AH transport could not be selected from the SAD because of this bug. Obtained from: KAME MFC after: 1 week Notes: svn path=/head/; revision=85055
* catch forwarded ipv6 packets with pfil_hooks for outbound things tooDarren Reed2001-10-151-0/+34
| | | | Notes: svn path=/head/; revision=84994