summaryrefslogtreecommitdiff
path: root/sys/netinet6
Commit message (Collapse)AuthorAgeFilesLines
* - correct logic of per-address input packet counts for lo0Hajimu UMEMOTO2001-04-051-16/+29
| | | | | | | | | - reject packets to fe80::xxxx%lo0 (xxxx != 1) Submitted by: JINMEI Tatuya <jinmei@isl.rdc.toshiba.co.jp> Notes: svn path=/head/; revision=75246
* Make per-address input packet counts for lo0 work.Hajimu UMEMOTO2001-03-281-6/+22
| | | | | | | | Reported by: bmah Submitted by: Noriyasu KATO <noriyasu.kato@toshiba.co.jp> (via itojun) Notes: svn path=/head/; revision=74955
* nuke IPSEC_SRCSEL which does not do the right thing.Hajimu UMEMOTO2001-03-161-33/+3
| | | | | | | | | | adjust state->ro if the tunnel endpoint is offlink. KAME PR 233. PR: kern/21079 Notes: svn path=/head/; revision=74356
* Merge from kame (1.175 -> 1.176):Jun Kuriyama2001-03-161-1/+27
| | | | | | | cope with freebsd4 bridge code. Notes: svn path=/head/; revision=74336
* Plug several mbuf leaks in error cases (in nd6)Bosko Milekic2001-03-111-3/+12
| | | | | | | Submitted by: jhay Notes: svn path=/head/; revision=74093
* More IP option length validation.Kris Kennaway2001-02-264-21/+41
| | | | | | | | | | | | | | | | | | | | Includes the following revisions from KAME (two of these were actually committed previously but the CVS revisions weren't documented): 1.40 kame/kame/sys/netinet6/ah_core.c (committed in previous rev) 1.41 kame/kame/sys/netinet6/ah_core.c 1.28 kame/kame/sys/netinet6/ah_output.c (committed in previous rev) 1.29 kame/kame/sys/netinet6/ah_output.c 1.30 kame/kame/sys/netinet6/ah_output.c 1.129 kame/kame/sys/netinet6/nd6.c 1.130 kame/kame/sys/netinet6/nd6.c 1.24 kame/kame/sys/netinet6/dest6.c 1.25 kame/kame/sys/netinet6/dest6.c Obtained from: KAME Notes: svn path=/head/; revision=73059
* Better detection of duplicated initialization.Hidetoshi Shimokawa2001-02-201-2/+8
| | | | | | | Obtained from: KAME Notes: svn path=/head/; revision=72758
* Correct IPv4 option processing.Kris Kennaway2001-02-202-2/+22
| | | | | | | | Submitted by: itojun Obtained from: KAME Notes: svn path=/head/; revision=72739
* Switch to using a struct xucred instead of a struct xucred when notBrian Feldman2001-02-181-5/+9
| | | | | | | | | | | | | | | | | | | | actually in the kernel. This structure is a different size than what is currently in -CURRENT, but should hopefully be the last time any application breakage is caused there. As soon as any major inconveniences are removed, the definition of the in-kernel struct ucred should be conditionalized upon defined(_KERNEL). This also changes struct export_args to remove dependency on the constantly-changing struct ucred, as well as limiting the bounds of the size fields to the correct size. This means: a) mountd and friends won't break all the time, b) mountd and friends won't crash the kernel all the time if they don't know what they're doing wrt actual struct export_args layout. Reviewed by: bde Notes: svn path=/head/; revision=72650
* Fix typo: compatability -> compatibility.Jeroen Ruigrok van der Werven2001-02-061-1/+1
| | | | | | | Compatability is not an existing english word. Notes: svn path=/head/; revision=72093
* Fix typo: seperate -> separate.Jeroen Ruigrok van der Werven2001-02-061-1/+1
| | | | | | | Seperate does not exist in the english language. Notes: svn path=/head/; revision=72091
* Convert if_multiaddrs from LIST to TAILQ so that it can be traversedPoul-Henning Kamp2001-02-062-3/+2
| | | | | | | | | backwards in the three drivers which want to do that. Reviewed by: mikeh Notes: svn path=/head/; revision=72084
* Yikes, these files bogusly #include "loop.h" but didn't use the value.Peter Wemm2001-01-293-6/+0
| | | | | | | My searching for NLOOP missed them. :-( Notes: svn path=/head/; revision=71794
* Fix the vulnerability with TCP ECE packets recently fixed in ipfw.Kris Kennaway2001-01-232-5/+18
| | | | | | | This is untested, but believed to work. Notes: svn path=/head/; revision=71450
* avoid conflicting #define symbol (s/FW_IFNLEN/IP6&/).Hajimu UMEMOTO2001-01-222-4/+4
| | | | | | | Obtained from: KAME Notes: svn path=/head/; revision=71389
* on in6_ifdetach(), do not remove default route mistakenlyHajimu UMEMOTO2001-01-221-2/+2
| | | | | | | Obtained from: KAME Notes: svn path=/head/; revision=71375
* First step towards an MP-safe zone allocator:Dag-Erling Smørgrav2001-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 Notes: svn path=/head/; revision=71350
* permit icmp6 type <= 256 (was 32).Hajimu UMEMOTO2001-01-211-1/+1
| | | | | | | Obtained from: KAME Notes: svn path=/head/; revision=71334
* When ip6_fw_ctl() or soopt_mcopyout() return without success,Hajimu UMEMOTO2001-01-201-1/+1
| | | | | | | | | don't free mbuf. It is already freed by these routins. PR: kern/24248 Notes: svn path=/head/; revision=71305
* workaround; be sure to initialize nd6 interface information when IPv6Jun-ichiro itojun Hagino2001-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. Notes: svn path=/head/; revision=71207
* do not touch ra_addr if it is NULL. from IIJ SEIL teamHajimu UMEMOTO2001-01-021-2/+4
| | | | | | | Obtained from: KAME Notes: svn path=/head/; revision=70601
* * Rename M_WAIT mbuf subsystem flag to M_TRYWAIT.Bosko Milekic2000-12-213-7/+7
| | | | | | | | | | | | | | | | | | | | | This is because calls with M_WAIT (now M_TRYWAIT) may not wait forever when nothing is available for allocation, and may end up returning NULL. Hopefully we now communicate more of the right thing to developers and make it very clear that it's necessary to check whether calls with M_(TRY)WAIT also resulted in a failed allocation. M_TRYWAIT basically means "try harder, block if necessary, but don't necessarily wait forever." The time spent blocking is tunable with the kern.ipc.mbuf_wait sysctl. M_WAIT is now deprecated but still defined for the next little while. * Fix a typo in a comment in mbuf.h * Fix some code that was actually passing the mbuf subsystem's M_WAIT to malloc(). Made it pass M_WAITOK instead. If we were ever to redefine the value of the M_WAIT flag, this could have became a big problem. Notes: svn path=/head/; revision=70254
* Staticize some malloc M_ instances.Poul-Henning Kamp2000-12-081-1/+1
| | | | Notes: svn path=/head/; revision=69774
* Lock down the network interface queues. The queue mutex must be obtainedJonathan Lemon2000-11-253-22/+9
| | | | | | | | | | | | | | | | | before adding/removing packets from the queue. Also, the if_obytes and if_omcasts fields should only be manipulated under protection of the mutex. IF_ENQUEUE, IF_PREPEND, and IF_DEQUEUE perform all necessary locking on the queue. An IF_LOCK macro is provided, as well as the old (mutex-less) versions of the macros in the form _IF_ENQUEUE, _IF_QFULL, for code which needs them, but their use is discouraged. Two new macros are introduced: IF_DRAIN() to drain a queue, and IF_HANDOFF, which takes care of locking/enqueue, and also statistics updating/start if necessary. Notes: svn path=/head/; revision=69152
* Change check from mbuf->m_ext.ext_free to use the new ext_type in orderBosko Milekic2000-11-111-6/+3
| | | | | | | | | | | | | to determine whether the given mbuf has a cluster (or some other type of external storage) attached to it. Note: This code should eventually be made to use M_WRITABLE() to determine whether or not a copy should be made. Reviewed by: jlemon Notes: svn path=/head/; revision=68620
* backout my previous commit (KAME PR 296). foo != TUNNEL willHajimu UMEMOTO2000-11-091-4/+0
| | | | | | | | | forbid "ANY" SA from being used for tnunel mode. Reported by: Chris Cason <casonc@netplex.aussie.org> Notes: svn path=/head/; revision=68532
* check whether the packet is tunnel mode. reported from <larse@ISI.EDU>Hajimu UMEMOTO2000-11-031-0/+4
| | | | | | | Obtained from: KAME Notes: svn path=/head/; revision=68277
* Move suser() and suser_xxx() prototypes and a related #define fromPoul-Henning Kamp2000-10-294-4/+0
| | | | | | | | | | | | <sys/proc.h> to <sys/systm.h>. Correctly document the #includes needed in the manpage. Add one now needed #include of <sys/systm.h>. Remove the consequent 48 unused #includes of <sys/proc.h>. Notes: svn path=/head/; revision=67893
* Count per-address statistics for IP fragments.Josef Karthauser2000-10-291-0/+6
| | | | | | | | Requested by: ru Obtained from: BSD/OS Notes: svn path=/head/; revision=67833
* Convert all users of fldoff() to offsetof(). fldoff() is badPoul-Henning Kamp2000-10-275-17/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | because it only takes a struct tag which makes it impossible to use unions, typedefs etc. Define __offsetof() in <machine/ansi.h> Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h> Remove myriad of local offsetof() definitions. Remove includes of <stddef.h> in kernel code. NB: Kernelcode should *never* include from /usr/include ! Make <sys/queue.h> include <machine/ansi.h> to avoid polluting the API. Deprecate <struct.h> with a warning. The warning turns into an error on 01-12-2000 and the file gets removed entirely on 01-01-2001. Paritials reviews by: various. Significant brucifications by: bde Notes: svn path=/head/; revision=67708
* be careful on mbuf overrun on ctlinput.Jun-ichiro itojun Hagino2000-10-231-1/+5
| | | | | | | | short icmp6 packet may be able to panic the kernel. sync with kame. Notes: svn path=/head/; revision=67456
* kame 1.32 -> 1.33Jun-ichiro itojun Hagino2000-10-231-1/+27
| | | | | | | | | | | | in add_m6fc(), set interface list for all cases. in response to a report from Hoerdt Mickael. kame 1.31 -> 1.32 discard PIM register if the version of the inner packet is incorrect (i.e. IPv6) (according to clarfication of recent discussion in the IETF pim ML) Notes: svn path=/head/; revision=67455
* Augment the 'ifaddr' structure with a 'struct if_data' to keepJosef Karthauser2000-10-192-1/+12
| | | | | | | | | | | | | | statistics on a per network address basis. Teach the IPv4 and IPv6 input/output routines to log packets/bytes against the network address connected to the flow. Teach netstat to display the per-address stats for IP protocols when 'netstat -i' is evoked, instead of displaying the per-interface stats. Notes: svn path=/head/; revision=67334
* Fix broken const'ness in declaration of sha1_loop().Archie Cobbs2000-10-091-4/+4
| | | | Notes: svn path=/head/; revision=66890
* make pr_type type meet with struct protosw. sync with kameJun-ichiro itojun Hagino2000-10-031-2/+2
| | | | Notes: svn path=/head/; revision=66586
* add missing \n. sync with kame.Jun-ichiro itojun Hagino2000-10-011-3/+3
| | | | Notes: svn path=/head/; revision=66504
* Make ip6fw as loadable module.Hajimu UMEMOTO2000-09-235-24/+54
| | | | Notes: svn path=/head/; revision=66303
* examined the gateway (from the routing table) only when the addressHajimu UMEMOTO2000-09-151-0/+10
| | | | | | | | | family of the gateway is AF_INET6. Submitted by: JINMEI Tatuya <jinmei@isl.rdc.toshiba.co.jp> Notes: svn path=/head/; revision=65895
* Follow BSD/OS and NetBSD, keep the ip_id field in network order all the time.Ruslan Ermilov2000-09-141-2/+0
| | | | | | | Requested by: wollman Notes: svn path=/head/; revision=65837
* add attrbute(packed) to union def with specific align constraitn.Jun-ichiro itojun Hagino2000-09-091-11/+11
| | | | | | | | | | move file static variable to auto variable, make in6_cksum() work better in kernel-MP environment. sync with kame. From: Alfred Perlstein <bright@wintelcom.net> Notes: svn path=/head/; revision=65637
* repair type 0 routing header support. it was caused by RFC2292/2292bisJun-ichiro itojun Hagino2000-09-031-1/+2
| | | | | | | difference. from: jinmei@kame.net Notes: svn path=/head/; revision=65406
* warn that setsockopt/sysctl # spaces are shared among *BSD, and should betterJun-ichiro itojun Hagino2000-08-271-0/+2
| | | | | | | be consulted with KAME guys if you want a number. Notes: svn path=/head/; revision=65124
* Replace the mbuf external reference counting code with somethingDavid Malone2000-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that should be better. The old code counted references to mbuf clusters by using the offset of the cluster from the start of memory allocated for mbufs and clusters as an index into an array of chars, which did the reference counting. If the external storage was not a cluster then reference counting had to be done by the code using that external storage. NetBSD's system of linked lists of mbufs was cosidered, but Alfred felt it would have locking issues when the kernel was made more SMP friendly. The system implimented uses a pool of unions to track external storage. The union contains an int for counting the references and a pointer for forming a free list. The reference counts are incremented and decremented atomically and so should be SMP friendly. This system can track reference counts for any sort of external storage. Access to the reference counting stuff is now through macros defined in mbuf.h, so it should be easier to make changes to the system in the future. The possibility of storing the reference count in one of the referencing mbufs was considered, but was rejected 'cos it would often leave extra mbufs allocated. Storing the reference count in the cluster was also considered, but because the external storage may not be a cluster this isn't an option. The size of the pool of reference counters is available in the stats provided by "netstat -m". PR: 19866 Submitted by: Bosko Milekic <bmilekic@dsuper.net> Reviewed by: alfred (glanced at by others on -net) Notes: svn path=/head/; revision=64837
* add missing splx(), when outgoing interface queue is full on tunnelledJun-ichiro itojun Hagino2000-08-162-0/+4
| | | | | | | IPsec packet output. KAME PR 280. Notes: svn path=/head/; revision=64701
* Make compilable with -DIPFILTER.Hajimu UMEMOTO2000-08-122-2/+7
| | | | | | | | | | Because I don't use ipfilter at all, this is not tested. I don't know if ipfilter is work for IPv6. Submitted by: yoshiaki@kt.rim.or.jp Notes: svn path=/head/; revision=64558
* backout ND6_USE_RTSOCK change in previousJun-ichiro itojun Hagino2000-08-111-0/+2
| | | | Notes: svn path=/head/; revision=64541
* avoid duplicated rtfree() on default router list change (could cause panic).Jun-ichiro itojun Hagino2000-08-111-6/+9
| | | | | | | sync with kame 1.46 -> 1.47. Notes: svn path=/head/; revision=64540
* Make ip6fw zero work.Hajimu UMEMOTO2000-08-101-1/+1
| | | | | | | PR: bin/20522 Notes: svn path=/head/; revision=64503
* GRRR! Fix the 'panic: ip6_init' caused by darrenr's incomplete changesPeter Wemm2000-08-021-0/+6
| | | | | | | | for the pfil hooks. The protosw and ip6protosw structures were out of sync with each other. :-( Notes: svn path=/head/; revision=64118
* activate pfil_hooks and covert ipfilter to use itDarren Reed2000-07-312-0/+60
| | | | Notes: svn path=/head/; revision=64060