summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/in6_pcb.c
Commit message (Collapse)AuthorAgeFilesLines
* Create new functions in_sockaddr(), in6_sockaddr(), andtruckman2002-08-211-38/+54
| | | | | | | | | | | | | | | | | in6_v4mapsin6_sockaddr() which allocate the appropriate sockaddr_in* structure and initialize it with the address and port information passed as arguments. Use calls to these new functions to replace code that is replicated multiple times in in_setsockaddr(), in_setpeeraddr(), in6_setsockaddr(), in6_setpeeraddr(), in6_mapped_sockaddr(), and in6_mapped_peeraddr(). Inline COMMON_END in tcp_usr_accept() so that we can call in_sockaddr() with temporary copies of the address and port after the PCB is unlocked. Fix the lock violation in tcp6_usr_accept() (caused by calling MALLOC() inside in6_mapped_peeraddr() while the PCB is locked) by changing the implementation of tcp6_usr_accept() to match tcp_usr_accept(). Reviewed by: suz
* Notify functions can destroy the pcb, so they have to return anhsu2002-06-141-2/+3
| | | | | | | | indication of whether this happenned so the calling function knows whether or not to unlock the pcb. Submitted by: Jennifer Yang (yangjihui@yahoo.com) Bug reported by: Sid Carter (sidcarter@symonds.net)
* As a stop-gap measure, add one INP_LOCK_DESTROY() to in6_pcbdetach() tohsu2002-06-121-0/+1
| | | | get kernel compiled with INET6 to boot.
* Lock up inpcb.hsu2002-06-101-2/+3
| | | | Submitted by: Jennifer Yang <yangjihui@yahoo.com>
* Back out my lats commit of locking down a socket, it conflicts with hsu's work.tanimura2002-05-311-48/+20
| | | | Requested by: hsu
* Lock down a socket, milestone 1.tanimura2002-05-201-20/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* just merged cosmetic changes from KAME to ease sync between KAME and FreeBSD.suz2002-04-191-1/+4
| | | | | | | (based on freebsd4-snap-20020128) Reviewed by: ume MFC after: 1 week
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-011-1/+1
| | | | | | | | | | | | 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@
* Remove references to vm_zone.h and switch over to the new uma API.jeff2002-03-201-2/+2
|
* Fix warnings caused by discarding const.alfred2002-02-271-2/+3
| | | | Hairy Eyeball At: peter
* Give struct socket structures a ref counting interface similar todillon2001-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.
* Pull post-4.4BSD change to sys/net/route.c from BSD/OS 4.2.ru2001-10-171-5/+3
| | | | | | | | | | | | | | | | | | | | 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
* Pull fix for memory leak in in6_losing() from netinet/in_pcb.c,v 1.85.ru2001-10-171-3/+2
| | | | MFC after: 1 week
* Make faith loadable, unloadable, and clonable.brooks2001-09-251-10/+4
|
* KSE Milestone 2julian2001-09-121-8/+8
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Wrap array accesses in macros, which also happen to be lvalues:jlemon2001-09-061-3/+2
| | | | | | | ifnet_addrs[i - 1] -> ifaddr_byindex(i) ifindex2ifnet[i] -> ifnet_byindex(i) This is intended to ease the conversion to SMPng.
* When running aplication joined multicast address,ume2001-08-041-0/+39
| | | | | | | | | | | | | | removing network card, and kill aplication. imo_membership[].inm_ifp refer interface pointer after removing interface. When kill aplication, release socket,and imo_membership. imo_membership use already not exist interface pointer. Then, kernel panic. PR: 29345 Submitted by: Inoue Yuichi <inoue@nd.net.fujitsu.co.jp> Obtained from: KAME MFC after: 3 days
* Sync with recent KAME.ume2001-06-111-66/+79
| | | | | | | | | | | | | | | | | | This work was based on kame-20010528-freebsd43-snap.tgz and some critical problem after the snap was out were fixed. There are many many changes since last KAME merge. TODO: - The definitions of SADB_* in sys/net/pfkeyv2.h are still different from RFC2407/IANA assignment because of binary compatibility issue. It should be fixed under 5-CURRENT. - ip6po_m member of struct ip6_pktopts is no longer used. But, it is still there because of binary compatibility issue. It should be removed under 5-CURRENT. Reviewed by: itojun Obtained from: KAME MFC after: 3 weeks
* First step towards an MP-safe zone allocator:des2001-01-211-1/+1
| | | | | | | - have zalloc() and zfree() always lock the vm_zone. - remove zalloci() and zfreei(), which are now redundant. Reviewed by: bmilekic, jasone
* sync with kame tree as of july00. tons of bug fixes/improvements.itojun2000-07-041-163/+57
| | | | | | | API changes: - additional IPv6 ioctls - IPsec PF_KEY API was changed, it is mandatory to upgrade setkey(8). (also syntax change)
* Support per socket based IPv4 mapped IPv6 addr enable/disable control.shin2000-04-011-2/+2
| | | | Submitted by: ume
* in6_pcb.c:green2000-03-221-3/+2
| | | | | | | | | | | Remove a bogus (redundant, just weird, etc.) key_freeso(so). There are no consumers of it now, nor does it seem there ever will be. in6?_pcb.c: Add an if (inp->in6?p_sp != NULL) before the call to ipsec[46]_delete_pcbpolicy(inp). In low-memory conditions this can cause a crash because in6?_sp can be NULL...
* fix kernel panic at rtfree() in INET6 enabled envrionment.shin2000-01-161-2/+0
| | | | | | This is probably due to twice rtfree() in in6_pcbdetach(), one for inp->in6p_route.ro_rt, and another one for inp->inp_route.ro_rt. But these 2 are actually shared in inpcb, so 2nd rtfree() is not necessary.
* fix wrong name which is hidden by wrong ifdef.shin2000-01-131-1/+1
| | | | | | | Sorry for build failure. There was a mistake when I moved the patch from my build check machine to commit machine. Specified by: peter
* remove unnecessary "$ifdef INET6"shin2000-01-131-2/+0
|
* tcp updates to support IPv6.shin2000-01-091-1/+50
| | | | | | | also a small patch to sys/nfs/nfs_socket.c, as max_hdr size change. Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
* IPSEC support in the kernel.shin1999-12-221-6/+6
| | | | | | | | pr_input() routines prototype is also changed to support IPSEC and IPV6 chained protocol headers. Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
* Change incorrect NULLs to 0seivind1999-12-211-7/+7
|
* rtcalloc() is removed because it turned out not to be necessary for FreeBSD.shin1999-12-091-1/+1
| | | | | | (It was added as a part of KAME patch) Specified by: jdp@polstra.com
* udp IPv6 support, IPv6/IPv4 tunneling support in kernel,shin1999-12-071-10/+3
| | | | | | | | | | packet divert at kernel for IPv6/IPv4 translater daemon This includes queue related patch submitted by jburkhol@home.com. Submitted by: queue related patch from jburkhol@home.com Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
* Removed IPSEC and IPV6FIREWALL because they are not ready yet.shin1999-11-231-1/+0
|
* KAME netinet6 basic part(no IPsec,no V6 Multicast Forwarding, no UDP/TCPshin1999-11-221-0/+1131
for IPv6 yet) With this patch, you can assigne IPv6 addr automatically, and can reply to IPv6 ping. Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
OpenPOWER on IntegriCloud