Commit Graph

41 Commits

Author SHA1 Message Date
itojun a225c3930f whitespace/costmetic sync w/kame 2001-12-21 08:54:52 +00:00
itojun 1cad8e6085 reduce white space/cosmetic diffs w/kame. 2001-12-18 03:04:02 +00:00
lukem 4f2ad95259 add RCSIDs 2001-11-13 00:56:55 +00:00
itojun 4d1509970e do not try to bring IPv6 up on bridge*. 2001-08-23 02:58:24 +00:00
itojun 8c9f492242 do not malloc() during interrupt context for IPv6 multicast kludge table.
malloc() during interface initialization.  sync with kame
2001-07-18 13:12:27 +00:00
itojun fc644273cd print more diag message on in6_addmulti() failures. 2001-05-24 08:17:22 +00:00
thorpej bf2dcec4f5 Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
2001-04-13 23:29:55 +00:00
itojun 22b473e0f6 during ip6/icmp6 inbound packet processing, do not call log() nor printf() in
normal operation (/var can get filled up by flodding bogus packets).
sysctl net.inet6.icmp6.nd6_debug will turn on diagnostic messages.
(#define ND6_DEBUG will turn it on by default)

improve stats in ND6 code.

lots of synchronziation with kame (including comments and cometic ones).
2001-02-07 08:59:47 +00:00
itojun 43950f6d05 on interface removal (ifconfig destroy) do not remove default route by mistake 2001-01-18 06:49:11 +00:00
onoe e83458422f First Prototype implementation of network interface part for IEEE1394 (if_fw).
Current status:
	Only OHCI chip is supported (fwohci).
	ping (IPv4) works with Sony's implementation (SmartConnect) on Win98.
	sometimes works but not stable.
Not implemented yet:
	IRM (Isochronous Resource Manager) functionality.
	Link layer fragmentation.
	Topology map.
More to do:
	clean ups
	MCAP
	charactor device part
	dhcp

There is no entry in GENERIC config file yet.
Follow sys/dev/ieee1394/IMPLEMENTATION to enable if_fw.
2000-11-05 17:17:12 +00:00
itojun b2366d4898 add missing \n. sync with kame. 2000-10-01 10:56:02 +00:00
itojun b5393f9387 correct in6_ifdetach() (previous code touched dangling pointers).
actually the corrected portion was never visited.
2000-05-05 08:03:12 +00:00
itojun 7e72267252 correct in6_ifdetach(). free oia, not ia.
From: Lennart Augustsson <augustss@augustsson.net>
2000-04-27 15:39:05 +00:00
itojun 3e34240544 perform neighbor unreachability detection on p2p links (spec requires
it for bidir p2p links).
improve -i in ndp(8) to allow tweaking per-interface ND flag on.
fix ndp(8) infinite loop on certain routing table setup.
2000-04-16 15:27:59 +00:00
itojun 30272756a8 better sync with latest kame (cosmetic only). 2000-04-16 15:00:56 +00:00
itojun ff22afe8bf fix fatal bug in EUI64 generation (0xff -> 0xfe typo) 2000-04-13 16:21:25 +00:00
itojun ecb5f2e56a revisit in6_ifattach().
- be persistent on initializing interfaces, even if there's manually-
  assigned linklocal, multicast/whatever initialization is necessary.
- do not cache mac addr in the kernel.  grab mac addr from existing cards
  (this is important when you swap ethernet cards back and forth)
now ppp6 works just fine!

call in6_ifattach() on ATM PVC interface to assign link-local, using
hardware MAC address as seed.

(the change is in sync with kame tree).
2000-04-12 10:36:38 +00:00
itojun 6db43d2c0e cosmetic (space before EOL), to ease diff against kame 2000-04-10 15:45:24 +00:00
itojun e2d658087d move ia6->ia6_dad_ch to dp->dad_timer_ch, to ease KAME code sharing.
now in6_var.h does not need to pull sys/callout.h in.
2000-03-24 04:09:04 +00:00
thorpej fc96443d15 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 07:01:25 +00:00
itojun d7e8edfdcd configure ::1 to loopback dstaddr.
honor ifa_refcnt when configuring loopback.
2000-03-02 09:45:01 +00:00
itojun 36649fea92 don't configure ifa_dstaddr for non-pointopoint interface,
so that we won't be returning them from routing socket manipulation.
2000-03-02 07:14:52 +00:00
itojun 90736ab608 fix include pathname for better rfc2292 compliance. 2000-02-06 12:49:37 +00:00
itojun f91ee608a9 avoid calling in6_control(SIOCDIFADDR_IN6) from interrupt context.
it is not supposed to work.
logging fix: add "\n" to some of log() in in6_prefix.c.

improve in6_ifdetach().  now almost all structure depend on ifnet
will be cleared up.
possible loose ends:
- cached route_in6 in static varaiables needs to be cleared as well
- there are ifaddr manipulation without reference counting,
  which should be fixed
we still see panics after card removal, though...  not sure what is left.

(sync with kame)
2000-02-04 14:34:22 +00:00
itojun f5fba17f1b implement in6_purgemkludge(). in6_ifdetach() calls it to avoid dangling
kludge entries.  the situation would occur if you take the following steps:
- join multicast groups (default ones like linklocal all-node is fine)
- remove all IPv6 addresses manually
- remove pcmcia card

to thorpej: pls call in6_ifdetach() when PRU_PURGEIF is raised (just before
removing ifnet).  it should do the right thing (unable to perform real test
though)
2000-02-02 16:58:10 +00:00
itojun 6f13dac00f remove route to link-local allnodes multicast address (ff02:/32),
when the last IPv6 address on an interface is get removed.
in6_ifattach() configures it and in6_ifdetach() removes it.

XXX last part of in6_purgeaddr looks very ugly, but there's no event for
"interface detach" (events are for "address detach").
2000-02-02 13:44:05 +00:00
thorpej d844a3ac41 First-draft if_detach() implementation, originally from Bill Studnemund,
although this version has been changed somewhat:
- reference counting on ifaddrs isn't as complete as Bill's original
  work was.  This is hard to get right, and we should attack one
  protocol at a time.
- This doesn't do reference counting or dynamic allocation of ifnets yet.
- This version introduces a new PRU -- PRU_PURGEADDR, which is used to
  purge an ifaddr from a protocol.  The old method Bill used didn't work
  on all protocols, and it only worked on some because it was Very Lucky.

This mostly works ... i.e. works for my USB Ethernet, except for a dangling
ifaddr reference left by the IPv6 code; have not yet tracked this down.
2000-02-01 22:52:04 +00:00
itojun b3761abef8 remove extra portability #ifdef (like #ifdef __FreeBSD__) in KAME IPv6/IPsec
code, from netbsd-current repository.
#ifdef'ed version is always available from ftp.kame.net.

XXX please do not make too many diff-unfriendly changes, we'll need to take
bunch of diffs on upgrade...
2000-01-06 15:46:07 +00:00
itojun ea861f0183 sync IPv6 part with latest KAME tree. IPsec part is left unmodified
due to massive changes in KAME side.
- IPv6 output goes through nd6_output
- faith can capture IPv4 packets as well - you can run IPv4-to-IPv6 translator
  using heavily modified DNS servers
- per-interface statistics (required for IPv6 MIB)
- interface autoconfig is revisited
- udp input handling has a big change for mapped address support.
- introduce in4_cksum() for non-overwriting checksumming
- introduce m_pulldown()
- neighbor discovery cleanups/improvements
- netinet/in.h strictly conforms to RFC2553 (no extra defs visible to userland)
- IFA_STATS is fixed a bit (not tested)
- and more more more.

TODO:
- cleanup os-independency #ifdef
- avoid rcvif dual use (for IPsec) to help ifdetach

(sorry for jumbo commit, I can't separate this any more...)
1999-12-13 15:17:17 +00:00
is 3a43ac11b5 Don't even pretend we can create a nonglobal EUI64 out of an ARCNET link
level address. Instead, create the link-local address directly.
1999-09-26 20:04:08 +00:00
is 1f417b8ca9 invert u bit to convert EUI64 to RFC2373 interface ID for ARCnet 1999-09-25 22:29:21 +00:00
itojun 62c568fac4 tiny fix to ARCnet IPv6 support.
- in in6_ifattach_getifid(), we can grab interface id source iff the source
  is universally (worldwide) unique.  ARCnet hardware address is of 8bit and
  does not satisfy the condition.
  (in6_ifattach_getifid() is for getting interface id usable for pseudo
  interfaces like gif*)
- xx_to_eui64() should return EUI64 format, not IPv6 interface id format.
  this may seem awkward so I wish to clean these things up.
- in nd6.c, change if clause into case clause to allow future addition
  of IFT_xxx easier.
1999-09-20 02:35:44 +00:00
is 072a96b17d fix mergo 1999-09-19 21:42:23 +00:00
is 6a793d8a47 Zeroth version of IPv6 support for ARCnet. Correct MTU handling still needs
to be done.
1999-09-19 21:31:33 +00:00
itojun 6b9bfc0691 - Call in{,6}_pcbdetach if ipsec initialization is failed during PRU_ATTACH.
This situation happens on severe memory shortage.  We may need more
  improvements here and there.
- Grab IEEE802 address from IFT_ETHER card, even if the card is
  inserted after bootup time.  Is there any other card that can be
  inserted afterwards?  pcmcia fddi card? :-P
- RFC2373 u bit handling suggests that we SHOULD NOT copy interface id from
  ethernet card to pseudo interface, when ethernet card has IEEE802/EUI64
  with u bit != 0 (this means that IEEE802/EUI64 is not universally unique).
  Do not use such address as, for example, interface id for gif interface.
  (I have such an ethernet card myself)
  This may change interface id for your gif interface.  be careful upgrading
  rc files.

(sync with recent KAME)
1999-09-13 12:15:54 +00:00
itojun a00c3d5ea1 fix u bit in interface identifier for ether and p2p-802 interfacde. 1999-09-08 00:50:15 +00:00
itojun 45538437d9 - invert u bit on interface id for pseudo interfaces, as suggested in RFC2373.
- do not perform IPv6 initialization for faith* interface, as they become
  mistakingly IFF_UP.  we are wondering if we should nuke in6_ifattach_p2p().
(sync with recent kame)
1999-09-05 01:57:10 +00:00
thorpej 011b02e348 Clean up some printfs(), and mark a few for possible later nuking,
since they appear to be for debugging purposes only.
1999-07-10 19:46:10 +00:00
thorpej cd3a345ea0 RCS ID police. 1999-07-03 21:24:45 +00:00
itojun 118d2b1d4f IPv6 kernel code, based on KAME/NetBSD 1.4, SNAP kit 19990628.
(Sorry for a big commit, I can't separate this into several pieces...)
Pls check sys/netinet6/TODO and sys/netinet6/IMPLEMENTATION for details.

- sys/kern: do not assume single mbuf, accept chained mbuf on passing
  data from userland to kernel (or other way round).
- "midway" ATM card: ATM PVC pseudo device support, like those done in ALTQ
  package (ftp://ftp.csl.sony.co.jp/pub/kjc/).
- sys/netinet/tcp*: IPv4/v6 dual stack tcp support.
- sys/netinet/{ip6,icmp6}.h, sys/net/pfkeyv2.h: IETF document assumes those
  file to be there so we patch it up.
- sys/netinet: IPsec additions are here and there.
- sys/netinet6/*: most of IPv6 code sits here.
- sys/netkey: IPsec key management code
- dev/pci/pcidevs: regen

In my understanding no code here is subject to export control so it
should be safe.
1999-07-01 08:12:45 +00:00
itojun 74d3c214ec KAME/NetBSD 1.4 SNAP kit, dated 19990628.
NOTE: this branch (kame) is used just for refernce.  this may not compile
due to multiple reasons.
1999-06-28 06:36:47 +00:00