Commit Graph

71 Commits

Author SHA1 Message Date
itojun 37bd81ba1e allow "deprecated" bit to be manually set. PR 18163 2002-09-04 07:22:28 +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 b05ff066a7 whitespace cleanup 2002-06-09 14:43:10 +00:00
itojun 6d8d0d63d8 sync with latest KAME in6_ifaddr/prefix/default router manipulation.
behavior changes:
- two iocts used by ndp(8) are now obsolete (backward compat provided).
  use sysctl path instead.
- lo0 does not get ::1 automatically.  it will get ::1 when lo0 comes up.
2002-06-08 21:22:29 +00:00
itojun fc16676d8e If there has been no NS for the neighbor after entering the
INCOMPLETE state, send the first solicitation in nd6_output(), regardless
of the timer value.
revised comments about rate-limiting accordingly.

sync w/kame
2002-06-07 17:15:12 +00:00
itojun ad4cab117d whitespace at EOL 2002-06-03 02:09:37 +00:00
itojun ed45b704ac do not hardcode if_mtu values in here, except for IFT_{ARC,FDDI} -
they need special handling.  makes it possible to take advantage of 9k ether
frames.
2002-06-03 00:51:47 +00:00
itojun 87fc46bce9 improve nd6_setmtu(), to warn too-small MTU on SIOCSIFMTU. sync w/kame 2002-05-30 05:06:28 +00:00
itojun cfc6c918de missing bzero 2002-05-29 13:56:14 +00:00
itojun 050c5b5b7c receivedra field is gone 2002-05-29 13:52:56 +00:00
itojun 5c1df51d53 attach nd_ifinfo structure into if_afdata.
split IPv6 link MTU (advertised by RA) from real link MTU.
sync with kame
2002-05-29 07:53:39 +00:00
itojun 007db8b52a remove obsolete comment 2002-03-20 22:47:59 +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 1990d680c4 do not change neighbor cache state on entry timeout,
if the cache entry is for outgoing router.

perform on-linkness check before default router (re-)seletion.

do not play with interface direct route on nd6_rtrequest.

sync a lot of cosmetic changes.  sync with kame
2001-10-17 10:55:09 +00:00
itojun dfb1429789 unifdef OLDIP6OUTPUT 2001-10-17 08:23:05 +00:00
itojun 7dcf45fbd8 more whitespace/comment sync with kame 2001-10-16 06:24:44 +00:00
itojun 0cd424b3ce ifidex2ifnet could contain NULL after if_detach(). sync with kame 2001-07-25 06:59:51 +00:00
itojun 7f070caa75 sync rt_ifp check with IPv4 counterpart (see sys/net/if_ethersubr.c 1.27).
sync with kame
2001-07-20 20:26:35 +00:00
itojun 03927c60a5 call defrouter_select() only if it is autoconfigured host. 2001-06-29 16:01:47 +00:00
itojun 02c94ca414 refresh default router list on nd6_detach(), only if we are an
autoconfigured host.  bug was that, we will lose default route on
"ifconfig gif0 destroy" even if default is not pointing to gif0.
reported by ume@mahoroba.org.  sync with kame
2001-06-27 17:36:14 +00:00
itojun 885b74c2be select default router again, when L2 address of the router changes 2001-06-22 13:36:12 +00:00
itojun fc644273cd print more diag message on in6_addmulti() failures. 2001-05-24 08:17:22 +00:00
itojun 92969654c0 enable FAKE_LOOPBACK_IF case by default.
now traffic on loopback interface will be presented to bpf as normal wire
format packet (without KAME scopeid in s6_addr16[1]).

fix KAME PR 250 (host mistakenly accepts packets to fe80::x%lo0).

sync with kame.
2001-03-30 11:08:56 +00:00
itojun 3e898c9239 in nd6_cache_lladdr(), set nd6_gctimer to ln_expire just after the state
transition to STALE.  fixes tahi test breakage.  sync with kame.
2001-03-21 21:56:29 +00:00
itojun 27a0af5865 nd6_storelladdr() was not consistent about m_freem() policy.
do not touch RTF_STATIC entries (static ND entries) on ND cache update.
couple of costmetic sync.  sync with kame
2001-03-08 10:49:32 +00:00
itojun f2a66201fc garbage-collect stale ND entries (default: 1 day).
RFC 2461 5.3.  sync with kame.
2001-02-23 08:02:41 +00:00
itojun e1196a8f6e remove unnecessary state, ND6_LLINFO_WAITDELETE, from neighbor cache
state machine.
no need for RTF_REJECT on neighbor cache entires, they are leftover from
ARP code.
sync with kame.
2001-02-23 06:41:50 +00:00
itojun e1e316562b make validation code more strict for ND6/dest6 variable length headers.
check duplicated nd6_ifinfo table initialization in a better way.
sync with kame
2001-02-21 17:23:09 +00:00
itojun 96413230d1 style, to make kame sync easier 2001-02-21 16:28:43 +00:00
itojun e1f4f77960 to sync with kame better, (1) remove register declaration for variables,
(2) sync whitespaces, (3) update comments. (4) bring in some of portability
and logging enhancements.  no functional changes here.
2001-02-10 04:14:26 +00:00
itojun a1d89972c7 when chasing nd6_llinfo chain, make sure we do not touch dangling
pointer (due to RTM_DELETE during default router list management).
from kame
2001-02-08 12:57:54 +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
chs 09cb38f22b expose the definitions of MIN() and MAX() in sys/param.h to the kernel
and use those in favor of a dozen copies scattered around the source tree.
2001-02-05 10:42:40 +00:00
itojun df9784d749 pull post-4.4BSD change to sys/net/route.c from BSD/OS 4.2 (UCB copyrighted).
have sys/net/route.c:rtrequest1(), which takes rt_addrinfo * as the argument.
pass rt_addrinfo all the way down to rtrequest, and ifa->ifa_rtrequest.
3rd arg of ifa->ifa_rtrequest is now rt_addrinfo * instead of sockaddr *
(almost noone is using it anyways).

benefit: the follwoing command now works.  previously we need 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.

XXX is eon_rtrequest() change correct regarding to 3rd arg?
eon_rtrequest() and rtrequest() were incorrect since 4.3BSD-reno,
so i do not have correct answer in the source code.
someone with more clue about netiso-over-ip, please help.
2001-01-17 04:05:41 +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 d7a216bb96 suppress warning on nd6_storelladdr failure. the failure could happen
easily when we have routing table with too many entries.  sync with kame.
2000-10-15 15:39:11 +00:00
itojun 0a1e211454 - do not use bitfield for router renumbering header.
- add protection mechanism against ND cache corruption due to bad NUD hints.
- more stats
- icmp6 pps limitation.  TOOD: should implement ppsratecheck(9).
2000-07-06 12:36:18 +00:00
itojun fa5c89d64a do not mistakingly forward link-local scoped packet (the bug was added
with "beyondscope" icmp6 support).
"options FAKE_LOOPBACK_IF" will honor scope on loopback outputs.  rcvif will
be real interface, not the loopback, just like when multicast loopback.

(sync with kame)
2000-05-19 01:40:18 +00:00
itojun 4f1c7f0bbe do not try NUD unless the gateway is a real neighbor.
real fix to KAME PR 245 (workaround has been implemented).
2000-05-09 11:51:12 +00:00
itojun b360c656a0 temporary workaround against GIF NUD issue (when you configure globals
onto GIF, NUD prevents packet from going out)
KAME PR 245.  From: Andreas Wrede <andreas@planix.com>
2000-04-27 00:33:47 +00:00
itojun 5393e61dd0 add boundary check for nd6_ifinfo (otherwise ndp -i can make out-of-bound
accesses).
2000-04-19 07:13:03 +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 7716681678 add comment on sdl_alen check (sync with kame) 2000-04-13 16:27:00 +00:00
itojun 8b8adc2ee4 bark if sdl_alen == 0. test code for KAME PR 235. 2000-04-13 14:32:53 +00:00