Commit Graph

717 Commits

Author SHA1 Message Date
itojun ee7d78825a comment typo, from markus@openbsd 2003-07-23 00:27:25 +00:00
itojun c8ebadb000 unifdef -U_IP_VHL 2003-07-22 11:18:24 +00:00
itojun 0d84200c22 clear scheduled key before freeing, for safety 2003-07-22 08:54:27 +00:00
itojun 77283a8429 sha2 is needed for AH, not ESP 2003-07-22 03:26:16 +00:00
itojun d64e1c8d6a add hmac-sha2 support. various cleanups (like avoid hardcoding '16').
from kame
2003-07-22 03:24:23 +00:00
itojun 409ba7efc4 cosmetic 2003-07-22 03:21:21 +00:00
itojun 0445f65670 avoid assuming result buffer size in AH logic. sync w/kame 2003-07-20 18:01:41 +00:00
itojun 92a1800c4d due to previous type change, sav->schedlen never go negative. sync w/kame 2003-07-20 17:17:20 +00:00
itojun d1931d3717 change ESP xx_schedlen() return type to size_t. sync w/kame 2003-07-20 03:24:03 +00:00
itojun 74182febed remove #if 0 portion 2003-07-18 06:45:33 +00:00
kleink 43694e8d74 assymetric -> asymmetric 2003-07-15 17:37:00 +00:00
itojun 7b74887942 rijndael is assymmetric, correction from markus@openbsd 2003-07-15 15:25:13 +00:00
itojun 281d9d13a5 simplify and update rijndael code. markus@openbsd 2003-07-15 11:00:36 +00:00
itojun 8e90cd9ce4 KNF 2003-07-12 15:16:50 +00:00
itojun 3eaa5b9c93 no longer needed (#define _KERNEL) 2003-07-12 15:12:45 +00:00
itojun 7649b12429 remove obsolete comment on the use of m_pullup 2003-07-09 04:05:59 +00:00
itojun 0463e41004 on interface detach, clear multicast forwarding table. from kame 2003-07-08 10:20:45 +00:00
itojun 91b11e1eba prototype must not have variable name 2003-07-08 07:13:50 +00:00
itojun fc401b7586 fix missing check for taillen against pkthdr.len. markus@openbsd 2003-07-04 00:49:18 +00:00
itojun 022df20c75 minor KNF 2003-07-03 05:03:53 +00:00
itojun d8976f36ac typo. found by markus@openbsd 2003-07-02 13:55:13 +00:00
itojun 2317e81b85 avoid ICMPv6 redirect if the packet filter rewrite dst addr to an address
on the incoming interface.  cedric@openbsd
2003-06-30 08:00:59 +00:00
itojun 842d3bee32 KNF 2003-06-30 03:30:50 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
itojun 2cadb8ca7a split ND6 cache timer management to per-entry. increased accuracy,
no O(N) loop.   sync w/ kame
2003-06-27 08:41:08 +00:00
itojun 6d4a3c4191 remove unneeded checks of accept_rtadv. from kame 2003-06-24 07:54:47 +00:00
itojun adb5d5afb4 * kame/sys/netinet6/nd6.c (nd6_rtrequest): changed a condition to
decide whether to create an empty llinfo stricter so that a user
can manually change the link-layer address of an existing neighbor
cache.
Pointed out by: KIU Shueng Chuan

from kame
2003-06-24 07:49:03 +00:00
itojun 455b7679d4 typo 2003-06-24 07:43:44 +00:00
itojun 194f048bd9 use time.tv_sec directly 2003-06-24 07:39:24 +00:00
itojun 5b0c3f9506 clear ln_hold earlier. from kame 2003-06-24 07:32:03 +00:00
martin d505b18964 Make sure to include opt_foo.h if a defflag option FOO is used. 2003-06-23 11:00:59 +00:00
itojun 7a5741651c - sync up MLD declaration with RFC3542 (s/MLD6/MLD/)
- routing header declaration with RFC3542
  (note: sizeof(ip6_rthdr0) has changed!)
  also, sync up with RFC2460 routing header definition (no "strict" source
  routing mode any more)

part of advanced API update (RFC2292 -> 3542).
2003-06-06 08:13:43 +00:00
itojun a07ae6a9df don't try to forward multicast packet to mif that went away; kame 2003-06-06 06:52:29 +00:00
itojun 5c0f142820 remove assumption on redirect header option processing. from kame 2003-06-03 05:20:06 +00:00
itojun f46a719b5c can't use M_WAIT here, i believe. 2003-05-27 22:36:38 +00:00
itojun 63715bec6b backout previous. (sys/net/if.c fixed) 2003-05-16 16:57:35 +00:00
itojun d36e610a01 nd6_rtmsg: If called during if_detach(), TAILQ_FIRST(if_addrlist)
could be NULL.  This is not a common case, but as nd6_rtmsg()
will be called during if_detach(), we need to check for the
case.  reported by kanaoka-san.
2003-05-16 16:19:45 +00:00
itojun 4008ec1218 use strlcpy 2003-05-16 03:56:49 +00:00
itojun 4d9a92e2a2 remove duplicate. masanori kanaoka 2003-05-16 02:53:28 +00:00
itojun 9cf18f13b5 rt->rt_ifp may not always be available. masanori kanaoka via kame 2003-05-15 14:57:58 +00:00
itojun a5d8a0a4f6 check version before computing checksum. checksum is more expensive operation. 2003-05-15 13:46:15 +00:00
itojun 19b1e87da3 KNF 2003-05-14 17:02:59 +00:00
itojun 6e0f23e7f6 KNF 2003-05-14 17:00:22 +00:00
itojun f77518e2f5 KNF 2003-05-14 14:41:33 +00:00
itojun 5eaf3c3113 do not use m_pulldown() to parse intermediate extension headers (like routing).
we don't want to drop packets due to extension header parsing.  KAME rev 1.59.
(performance may suck, but it is slowpath anyways)
2003-05-14 14:34:14 +00:00
wiz de87ca793d constant usually has two n. 2003-05-14 12:45:06 +00:00
itojun 346e0198f0 always use PULLDOWN_TEST codepath. 2003-05-14 06:47:33 +00:00
darrenr 9787457fbe bring a small amount of code out of an if() statement that was doing
the same thing for both cases.
2003-05-10 13:23:07 +00:00
itojun 874e6573c4 fix invalid pointer setting on RA reception. from kiu shueng chuan via kame 2003-05-08 20:08:52 +00:00
christos a617975d48 print how big the mtu needs to be for ipv6 ppp. 2003-05-04 13:43:09 +00:00
bjh21 4be7a2dcf3 Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
  can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
  various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
  !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them.  In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
2003-04-28 23:16:11 +00:00
itojun b2fcce1997 style 2003-04-22 10:08:33 +00:00
thorpej ee5b1a7c61 Protect the definition of offsetof(). 2003-04-17 19:58:57 +00:00
itojun a81c2be8be avoid mbuf leak in redirect header option attachment. more complete
fix to come.  from kame
2003-03-31 23:55:46 +00:00
thorpej 452610ea39 Add in6_localaddr(). From KAME via FreeBSD. 2003-02-27 22:06:38 +00:00
he eb5e5b35c1 Make sure to initialize callout structs. 2003-02-25 22:17:47 +00:00
matt 8c1eaadb7a automatic aggregates are evil. make it static const. 2003-02-24 03:01:03 +00:00
thorpej b193480908 Add extensible malloc types, adapted from FreeBSD. This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.
2003-02-01 06:23:35 +00:00
wiz 9115df8c49 success, not sucess. Noted by mjl. 2003-01-28 22:35:02 +00:00
simonb 276fd1665c The Double-Semi-Colon Police. 2003-01-20 05:29:53 +00:00
simonb 0efc092563 Remove variable that is only assigned too but not referenced. 2003-01-20 00:39:30 +00:00
itojun 40606ab8f2 switch from kame-based m_aux mbuf auxiliary data, to openbsd m_tag
implementation.  it will simplify porting across *bsd (such as kame/altq),
and make us more synchronized.  from Joel Wilsson
2003-01-17 08:11:49 +00:00
itojun 177ed24b8b allocate route_in6 in struct secashead, to avoid mistakenly overrun
the end of secashead.  Fixes PR18751.
2003-01-08 05:46:49 +00:00
itojun be9a8d8e2f recover original stanford copyright. sync w/kame 2002-11-27 05:09:36 +00:00
lukem 0635de35a3 Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more. 2002-11-26 23:30:07 +00:00
thorpej d6f8cc841d Avoid strict-alias warnings. 2002-11-25 01:55:21 +00:00
itojun c8a8326600 make USE_ENCAPCHECK (in netinet*/*gif.c) to global option, GIF_ENCAPCHECK.
#ifdef out unneeded code when possible.
From: Krister Walfridsson <cato@df.lth.se>
2002-11-11 18:35:27 +00:00
itojun 1e8dadc8f9 pmtu_probe is not used anywhere (it is used in KAME TCP6-only code).
From: Krister Walfridsson <cato@df.lth.se>
2002-11-11 18:26:42 +00:00
itojun 6f28503927 need icmp6.h for MULTICAST_PMTUD case. sync w/kame 2002-11-09 03:12:05 +00:00
perry eab4bb9593 include opt_inet.h -- found by David Laight 2002-11-05 21:46:42 +00:00
itojun 29ef3e950d improve gif lookup performance, when there are many of those,
by using radix tree for lookups.  tested by yshimizu@iij.
2002-11-05 16:58:11 +00:00
perry 4f27ab21b8 /*CONTCOND*/ while (0)'ed macros 2002-11-02 07:30:55 +00:00
itojun ad337ee31a plug a memory leak. from sam leffler. sync w/kame 2002-10-31 17:36:16 +00:00
itojun 02a04fd9fc increase correct stat. KAME pr 445 2002-10-28 16:42:44 +00:00
itojun 5fc1c3b058 do not differentiate manually configured address from autoconfigured ones
wrt prefix management;
- always earn a reference to the prefix when an address is configured
 (by ioctl).
- always delete the prefix when an address that has the last referene
  is manually removed.

The change should solve the problem raised in KAME-snap 6989.

sync w/kame
2002-10-17 00:07:44 +00:00
thorpej d9ae0a6eb1 IPSEC_ESP depends on the "des", "blowfish", "cast128", and "rijndael"
attributes.
2002-10-12 15:41:24 +00:00
thorpej 5b2b587c85 Move netinet, netinet6, ipsec, and ipfilter config defns to
netinet/files.ipfilter, etinet/files.netinet, netinet6/files.netinet6,
and netinet6/files.netipsec.

XXX There are still a few stragglers in conf/files, which are entangled
with other network protocols.
2002-10-10 22:45:45 +00:00
itojun b15fea2610 suppress too noisy log by default (can be re-enabled by sysctl). sync w/kame 2002-10-09 20:22:16 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
itojun ce1bd42a2c length field on PADN option, before jumbo payload option was wrong.
sync w/kame
2002-09-23 13:28:55 +00:00
itojun 0a734b348e better fix to PR 18163 ("deprecated" flag manipulation). sync w/kame 2002-09-23 13:16:52 +00:00
simonb 4e3613273b Remove breaks after returns, unreachable returns and returns after
returns(!).
2002-09-23 05:51:10 +00:00
simonb 03d61a28e4 Remove an extern declaration for the "pim6stat" variable; the only other
occurance of this is a static variable in ip6_mroute.c.
2002-09-23 04:56:58 +00:00
itojun d694b45f9d remove extra blank line 2002-09-15 01:18:59 +00:00
itojun 255121cf44 avoid from applying IPsec transport mode to the packets when the kernel
forwards the packets.
sync w/kame
2002-09-11 08:15:37 +00:00
itojun 8808abb7b8 correct pointer signedness mixups. sync w/kame 2002-09-11 03:45:44 +00:00
itojun 75e1911429 reduce diff w/kame 2002-09-11 03:23:24 +00:00
itojun 9401012487 KNF - return is not a function. sync w/kame. 2002-09-11 02:46:42 +00:00
itojun 6dedde045a correct signedness mixup in pointer passing. sync w/kame 2002-09-11 02:41:19 +00:00
itojun 37bd81ba1e allow "deprecated" bit to be manually set. PR 18163 2002-09-04 07:22:28 +00:00
itojun c7b00b4ce4 pass proc * to in6_pcbsetport. PR 18073 2002-08-26 14:25:00 +00:00
itojun 967cf54a67 check packet length before fetching ESP crypto checksum. sync w/kame 2002-08-21 23:12:01 +00:00
itojun e5df0242ce sync up use_deprecated handling with latest kame.
- bind(deprecated) is allowed, trusting userland app is doing the right thing
- use_deprecated default to 1
2002-08-20 22:06:04 +00:00
itojun ddbeae9874 check error from copyout 2002-08-19 23:23:22 +00:00
itojun bec19ac64c typo in comment 2002-08-19 23:21:11 +00:00
itojun 041c651838 fix copyout() logic. more proper fix to be done on kame tree. 2002-08-19 23:14:39 +00:00
itojun 8b2ed6900d copyout only if oldp is non-null 2002-08-19 07:23:22 +00:00
itojun cc0fa7bc37 need explicit copyout(), apparently 2002-08-19 06:50:22 +00:00
itojun e89be6a279 set default value for use_deprecated to 0, to avoid consequences with ftpd. 2002-08-17 22:15:58 +00:00