summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/in6.c
Commit message (Collapse)AuthorAgeFilesLines
* Use IFF_LOCKGIANT/IFF_UNLOCKGIANT around calls to the interfaceiedowse2005-06-021-4/+8
| | | | | | if_ioctl routine. This should fix a number of code paths through soo_ioctl() that could call into Giant-locked network drivers without first acquiring Giant.
* Add CARP (Common Address Redundancy Protocol), which allows multipleglebius2005-02-221-2/+35
| | | | | | | | | | | | | hosts to share an IP address, providing high availability and load balancing. Original work on CARP done by Michael Shalayeff, with many additions by Marco Pfatschbacher and Ryan McBride. FreeBSD port done solely by Max Laier. Patch by: mlaier Obtained from: OpenBSD (mickey, mcbride)
* /* -> /*- for license, minor formatting changes, separate for KAMEimp2005-01-071-2/+2
|
* Remove in6_prefix.[ch] and the contained router renumbering capability.rwatson2004-08-231-7/+0
| | | | | | | | | | | | The prefix management code currently resides in nd6, leaving only the unused router renumbering capability in the in6_prefix files. Removing it will make it easier for us to provide locking for the remainder of IPv6 by reducing the number of objects requiring synchronized access. This functionality has also been removed from NetBSD and OpenBSD. Submitted by: George Neville-Neil <gnn at neville-neil.com> Discussed with/approved by: suz, keiichi at kame.net, core at kame.net
* Remove advertising clause from University of California Regent'simp2004-04-071-4/+0
| | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson
* move in6_addmulti()/in6_delmulti() into mld6.cume2004-03-041-90/+0
| | | | Obtained from: KAME
* missing splx().ume2004-03-041-1/+3
| | | | | Obtained from: KAME MFC after: 3 days
* - stlye and commentsume2004-03-031-15/+16
| | | | | | | - variable name change (scopeid -> zoneid) - u_short -> u_int16_t, u_char -> u_int8_t Obtained from: KAME
* Bring eventhandler callbacks for pf.mlaier2004-02-261-0/+3
| | | | | | | | This enables pf to track dynamic address changes on interfaces (dailup) with the "on (<ifname>)"-syntax. This also brings hooks in anticipation of tracking cloned interfaces, which will be in future versions of pf. Approved by: bms(mentor)
* Fix array overflow: If len=128, don't access [16] of a 16-byte IPv6cperciva2004-02-241-1/+2
| | | | | | | | address, even if we subsequently ignore its value by applying a >>8 to it. Reported by: "Ted Unangst" <tedu@coverity.com> Approved by: rwatson (mentor), {ume, suz} (KAME)
* try rtinit() only when the route is not installed.ume2004-01-101-2/+5
| | | | | | | | this allows, e.g., duplicated attempts of 'ifconfig lo0 ::1' like for IPv4. Obtained from: KAME MFC after: 1 week
* replace explicit changes to rt_refcnt by RT_ADDREF and RT_REMREFsam2003-11-081-1/+1
| | | | | | | macros that expand to include assertions when the system is built with INVARIANTS Supported by: FreeBSD Foundation
* byebye in6_ifawithscope(). it was a function for old sourceume2003-11-051-282/+0
| | | | | | address selection. Obtained from: KAME
* use nd6log().ume2003-11-041-30/+24
| | | | Obtained from: KAME
* add management part of address selection policy described inume2003-10-301-0/+8
| | | | | | RFC3484. Obtained from: KAME
* correct LOR by using a local variable to hold resultsam2003-10-291-3/+5
| | | | | | instead of holding a lock while calling out of view Supported by: FreeBSD Foundation
* - change scope to zone.ume2003-10-211-7/+13
| | | | | | | | - change node-local to interface-local. - better error handling of address-to-scope mapping. - use in6_clearscope(). Obtained from: KAME
* correct linkmtu handling.ume2003-10-201-2/+5
| | | | Obtained from: KAME
* nuke duplicate function and unused function.ume2003-10-171-41/+3
| | | | Obtained from: KAME
* revert wrongly dropped null check by previous commit.ume2003-10-171-0/+2
|
* - add dom_if{attach,detach} framework.ume2003-10-171-32/+53
| | | | | | - transition to use ifp->if_afdata. Obtained from: KAME
* nuke SCOPEDROUTING. Though it was there for a long time,ume2003-10-101-19/+0
| | | | it was never enabled.
* - fix typo in comment.ume2003-10-071-111/+78
| | | | | | - style. Obtained from: KAME
* return(code) -> return (code)ume2003-10-061-61/+61
| | | | (reduce diffs against KAME)
* Locking for updates to routing table entries. Each rtentry gets a mutexsam2003-10-041-25/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that covers updates to the contents. Note this is separate from holding a reference and/or locking the routing table itself. Other/related changes: o rtredirect loses the final parameter by which an rtentry reference may be returned; this was never used and added unwarranted complexity for locking. o minor style cleanups to routing code (e.g. ansi-fy function decls) o remove the logic to bump the refcnt on the parent of cloned routes, we assume the parent will remain as long as the clone; doing this avoids a circularity in locking during delete o convert some timeouts to MPSAFE callouts Notes: 1. rt_mtx in struct rtentry is guarded by #ifdef _KERNEL as user-level applications cannot/do-no know about mutex's. Doing this requires that the mutex be the last element in the structure. A better solution is to introduce an externalized version of struct rtentry but this is a major task because of the intertwining of rtentry and other data structures that are visible to user applications. 2. There are known LOR's that are expected to go away with forthcoming work to eliminate many held references. If not these will be resolved prior to release. 3. ATM changes are untested. Sponsored by: FreeBSD Foundation Obtained from: BSD/OS (partly)
* Back out M_* changes, per decision of the TRB.imp2003-02-191-2/+2
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-2/+2
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* If the caller of rtrequest*(RTM_DELETE, ...) asked for a copy ofru2002-12-251-5/+1
| | | | | | 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.
* SMP locking for ifnet list.hsu2002-12-221-0/+4
|
* Lock up ifaddr reference counts.hsu2002-12-181-4/+4
|
* just merged cosmetic changes from KAME to ease sync between KAME and FreeBSD.suz2002-04-191-22/+23
| | | | | | | (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@
* Fix warnings caused by discarding const.alfred2002-02-271-3/+3
| | | | Hairy Eyeball At: peter
* Make faith loadable, unloadable, and clonable.brooks2001-09-251-0/+2
|
* KSE Milestone 2julian2001-09-121-9/+9
| | | | | | | | | | | | | | 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-1/+1
| | | | | | | ifnet_addrs[i - 1] -> ifaddr_byindex(i) ifindex2ifnet[i] -> ifnet_byindex(i) This is intended to ease the conversion to SMPng.
* When global anycast address was assigned to lo0, wrong sourceume2001-08-031-3/+5
| | | | | | | | address was selected. Reported by: Shingo WATANABE <nabe@nabechan.org> Submitted by: JINMEI Tatuya <jinmei@isl.rdc.toshiba.co.jp> MFC after: 3 days
* do not M_WAITOK in in6_update_ifa(), since this function can be calledume2001-07-151-1/+6
| | | | | | | under splnet(). (some comment was added by KAME) PR: 28927 MFC after: 1 week
* gif(4) and stf(4) modernization:brooks2001-07-021-5/+0
| | | | | | | | | | | - Remove gif dependencies from stf. - Make gif and stf into modules - Make gif cloneable. PR: kern/27983 Reviewed by: ru, ume Obtained from: NetBSD MFC after: 1 week
* Sync with recent KAME.ume2001-06-111-550/+977
| | | | | | | | | | | | | | | | | | 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
* workaround; be sure to initialize nd6 interface information when IPv6itojun2001-01-181-0/+8
| | | | | | | interface address gets added. this will avoid presenting EMSGSIZE when outgoing interface is down (and never brought up). sync with kame.
* correct rtentry reference count in in6_ifloop_request().itojun2000-07-121-3/+5
| | | | | if you reconfigure inet6 too much, the reference count can go into negative by mistake. KAME in6.c 1.98 -> 1.99.
* Suppress a warning message about trigraphs.grog2000-07-071-1/+1
| | | | Approved-by: itojun
* sync with kame tree as of july00. tons of bug fixes/improvements.itojun2000-07-041-427/+541
| | | | | | | API changes: - additional IPv6 ioctls - IPsec PF_KEY API was changed, it is mandatory to upgrade setkey(8). (also syntax change)
* Permit site local addr in IPv6 source address selection rule.shin2000-02-071-2/+23
| | | | | | | | | | KAME source addr selection rule had a problem to treat IPv6 site local addr. The rule is completely rewritten recently and the above problem is also fixed, but rewriting same code part in freebsd4.0 is too dangerous in this stage, so just add workaround to avoid the problem. Just add code for IPv6 site local addresses into IPv6 source addr selection algorythm part.
* Added ip6_forwarding check when prefix related ioctl is called.shin2000-01-271-0/+2
| | | | | | | (prefix related ioctl should only be called on router, because host use dynamic address and prefix configuration mechanism, and those prefix are managed separately with ones whih are assined manually.)
* Change struct sockaddr_storage member name, because following changeshin2000-01-131-9/+9
| | | | | | | | | | | | is very likely to become consensus as recent ietf/ipng mailing list discussion. Also recent KAME repository and other KAME patched BSDs also applied it. s/__ss_family/ss_family/ s/__ss_len/ss_len/ Makeworld is confirmed, and no application should be affected by this change yet.
* prevent kernel panic at suspend/resume.shin2000-01-031-1/+1
| | | | | | confirmed by: sanpei, joe PR: kern/15742
* udp IPv6 support, IPv6/IPv4 tunneling support in kernel,shin1999-12-071-17/+14
| | | | | | | | | | 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
* Just to avoid warning message about trigraph.shin1999-11-301-1/+1
| | | | Commented by: green
OpenPOWER on IntegriCloud