The NetBSD Project

CVS log for src/sys/netinet6/in6_ifattach.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / netinet6

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.119 / (download) - annotate - [select for diffs], Fri Jun 12 11:04:45 2020 UTC (5 months, 2 weeks ago) by roy
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-futex, HEAD
Changes since 1.118: +2 -236 lines
Diff to previous 1.118 (colored)

Remove in-kernel handling of Router Advertisements

This is much better handled by a user-land tool.
Proposed on tech-net here:
https://mail-index.netbsd.org/tech-net/2020/04/22/msg007766.html

Note that the ioctl SIOCGIFINFO_IN6 no longer sets flags. That now
needs to be done using the pre-existing SIOCSIFINFO_FLAGS ioctl.

Compat is fully provided where it makes sense, but trying to turn on
RA handling will obviously throw an error as it no longer exists.

Note that if you use IPv6 temporary addresses, this now needs to be
turned on in dhcpcd.conf(5) rather than in sysctl.conf(5).

Revision 1.118 / (download) - annotate - [select for diffs], Mon Jan 20 18:38:22 2020 UTC (10 months, 1 week ago) by thorpej
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2
Changes since 1.117: +2 -3 lines
Diff to previous 1.117 (colored)

Remove FDDI support.

Revision 1.117 / (download) - annotate - [select for diffs], Fri Oct 18 04:33:53 2019 UTC (13 months, 2 weeks ago) by ozaki-r
Branch: MAIN
CVS Tags: phil-wifi-20191119, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.116: +3 -4 lines
Diff to previous 1.116 (colored)

in6: reset the temporary address timer on a change of the interval period

Revision 1.116 / (download) - annotate - [select for diffs], Wed Oct 16 07:40:40 2019 UTC (13 months, 2 weeks ago) by ozaki-r
Branch: MAIN
Changes since 1.115: +26 -6 lines
Diff to previous 1.115 (colored)

Reorganize in6_tmpaddrtimer stuffs

- Move the related functions to where in6_tmpaddrtimer_ch exists
- Hide global variable in6_tmpaddrtimer_ch
- Rename ip6_init2 to in6_tmpaddrtimer_init
- Reduce callers of callout_reset
- Use callout_schedule

Revision 1.115 / (download) - annotate - [select for diffs], Tue May 1 07:21:39 2018 UTC (2 years, 7 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-base, phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, netbsd-9-base, isaki-audio2-base, isaki-audio2
Branch point for: phil-wifi, netbsd-9
Changes since 1.114: +2 -4 lines
Diff to previous 1.114 (colored)

Remove now unused net_osdep.h includes, the other BSDs did the same.

Revision 1.114 / (download) - annotate - [select for diffs], Wed Jan 24 03:44:10 2018 UTC (2 years, 10 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-compat-base, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.113: +6 -7 lines
Diff to previous 1.113 (colored)

Fix constraint violation of pserialize in in6_ifattach

in6_ifattach_loopback can sleep so we cannot use pserialize for it. Fortunately
in6_ifattach is alwasy called with IFNET_LOCK so pserialize isn't needed there
actually.

Revision 1.113 / (download) - annotate - [select for diffs], Fri Nov 10 07:27:57 2017 UTC (3 years ago) by ozaki-r
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.112: +7 -5 lines
Diff to previous 1.112 (colored)

Use psref instead of pserialize because that code is sleepable

Revision 1.112 / (download) - annotate - [select for diffs], Thu Feb 23 07:57:10 2017 UTC (3 years, 9 months ago) by ozaki-r
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: netbsd-8
Changes since 1.111: +4 -8 lines
Diff to previous 1.111 (colored)

Remove mkludge stuffs

For unknown reasons, IPv6 multicast addresses are linked to a first
IPv6 address assigned to an interface. Due to the design, when removing
a first address having multicast addresses, we need to save them to
somewhere and later restore them once a new IPv6 address is activated.
mkludge stuffs support the operations.

This change links multicast addresses to an interface directly and
throws the kludge away.

Note that as usual some obsolete member variables remain for kvm(3)
users. And also sysctl net.inet6.multicast_kludge remains to avoid
breaking old ifmcstat.

TODO: currently ifnet has a list of in6_multi but obviously the list
should be protocol independent. Provide a common structure (if_multi
or something) to handle in6_multi and in_multi together as well as
ifaddr does for in_ifaddr and in6_ifaddr.

Revision 1.111 / (download) - annotate - [select for diffs], Thu Feb 16 08:12:44 2017 UTC (3 years, 9 months ago) by knakahara
Branch: MAIN
Changes since 1.110: +3 -2 lines
Diff to previous 1.110 (colored)

add l2tp(4) L2TPv3 interface.

originally implemented by IIJ SEIL team.

Revision 1.110 / (download) - annotate - [select for diffs], Tue Jan 24 07:09:25 2017 UTC (3 years, 10 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20170204
Changes since 1.109: +3 -2 lines
Diff to previous 1.109 (colored)

Tweak softnet_lock and NET_MPSAFE

- Don't hold softnet_lock in some functions if NET_MPSAFE
- Add softnet_lock to sysctl_net_inet_icmp_redirtimeout
- Add softnet_lock to expire_upcalls of ip_mroute.c
- Restore softnet_lock for in{,6}_pcbpurgeif{,0} if NET_MPSAFE
- Mark some softnet_lock for future work

Revision 1.109 / (download) - annotate - [select for diffs], Wed Jan 4 19:37:14 2017 UTC (3 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.108: +4 -5 lines
Diff to previous 1.108 (colored)

- kill NULL argument from in6_update_ifa
- amend in6_update_ifa1 to return the ia, so that we can use it in pfil hooks
  to avoid NULL pointer crash.

Revision 1.108 / (download) - annotate - [select for diffs], Mon Dec 19 03:32:54 2016 UTC (3 years, 11 months ago) by ozaki-r
Branch: MAIN
Changes since 1.107: +5 -13 lines
Diff to previous 1.107 (colored)

Get rid of extra nd6_purge from in6_ifdetach

There were two nd6_purge in in6_ifdetach for some reason, but at least now
We don't need extra nd6_purge. Remove it and instead add assertions that
check if surely purged.

Revision 1.107 / (download) - annotate - [select for diffs], Wed Nov 30 02:08:57 2016 UTC (4 years ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20161204
Changes since 1.106: +5 -5 lines
Diff to previous 1.106 (colored)

Fix panic on destroying an interface with IPv6 addresses obtained with RA

nd6_purge depends on that IPv6 addresses are purged. If addresses remain,
pfxlist_onlink_check called from nd6_purge dereferences a dangling pointer
(ia->ia6_ndpr) that is freed before calling pfxlist_onlink_check. Fix it by
removing addresses before calling nd6_purge, which is the original behavior
that was changed by in6.c,v 1.203 and in6_ifattach.c,v 1.99.

Note that it seems the issue occurs because of a hack that forcibly destroys
prefix list entries of a given interface in nd6_purge. We should tackle the
hack in the future.

Fix PR kern/51467

Revision 1.106 / (download) - annotate - [select for diffs], Tue Oct 18 02:45:41 2016 UTC (4 years, 1 month ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20161104
Changes since 1.105: +3 -2 lines
Diff to previous 1.105 (colored)

Add missing pserialize_read_exit

Revision 1.105 / (download) - annotate - [select for diffs], Tue Aug 16 10:31:57 2016 UTC (4 years, 3 months ago) by roy
Branch: MAIN
CVS Tags: nick-nhusb-base-20161004, localcount-20160914
Changes since 1.104: +3 -47 lines
Diff to previous 1.104 (colored)

Separate ioctl address prefix management from RA prefix management
as we have no API for controlling the latter.

This fixes a long standing problem where addresses added with non /128
prefixes and non infinte address lifetimes would register a prefix route
which would expire. Subsequent calls set new lifetimes for the same address
would not affect the prefix route management, so once expired, the
prefix route would be impossible to add back as the kernel would remove it.

Revision 1.104 / (download) - annotate - [select for diffs], Mon Aug 1 04:37:53 2016 UTC (4 years, 4 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20160806
Changes since 1.103: +4 -4 lines
Diff to previous 1.103 (colored)

Fix kernel builds (gcc 4.8)

Revision 1.103 / (download) - annotate - [select for diffs], Mon Aug 1 03:15:31 2016 UTC (4 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.102: +22 -11 lines
Diff to previous 1.102 (colored)

Apply pserialize and psref to struct ifaddr and its variants

This change makes struct ifaddr and its variants (in_ifaddr and in6_ifaddr)
MP-safe by using pserialize and psref. At this moment, pserialize_perform
and psref_target_destroy are disabled because (1) we don't need them
because of softnet_lock (2) they cause a deadlock because of softnet_lock.
So we'll enable them when we remove softnet_lock in the future.

Revision 1.102 / (download) - annotate - [select for diffs], Wed Jul 20 07:37:51 2016 UTC (4 years, 4 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20160726
Changes since 1.101: +4 -2 lines
Diff to previous 1.101 (colored)

Apply pserialize to some iterations of IP address lists

Revision 1.101 / (download) - annotate - [select for diffs], Thu Jul 7 09:32:03 2016 UTC (4 years, 4 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-base, nick-nhusb-base-20160907
Branch point for: pgoyette-localcount
Changes since 1.100: +3 -3 lines
Diff to previous 1.100 (colored)

Switch the address list of intefaces to pslist(9)

As usual, we leave the old list to avoid breaking kvm(3) users.

Revision 1.100 / (download) - annotate - [select for diffs], Mon Jul 4 06:48:14 2016 UTC (4 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.99: +3 -3 lines
Diff to previous 1.99 (colored)

Use pslist(9) for the global in6_ifaddr list

psz and psref will be applied in another commit.

No functional change intended.

Revision 1.99 / (download) - annotate - [select for diffs], Mon Jul 4 02:41:18 2016 UTC (4 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.98: +2 -62 lines
Diff to previous 1.98 (colored)

Remove redundant codes purging IPv6 addresses

Proposed on tech-net and tech-kern.

Revision 1.98 / (download) - annotate - [select for diffs], Thu May 12 02:24:17 2016 UTC (4 years, 6 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529
Changes since 1.97: +10 -4 lines
Diff to previous 1.97 (colored)

Protect ifnet list with psz and psref

The change ensures that ifnet objects in the ifnet list aren't freed during
list iterations by using pserialize(9) and psref(9).

Note that the change adds a pslist(9) for ifnet but doesn't remove the
original ifnet list (ifnet_list) to avoid breaking kvm(3) users. We
shouldn't use the original list in the kernel anymore.

Revision 1.97 / (download) - annotate - [select for diffs], Wed Apr 27 07:51:14 2016 UTC (4 years, 7 months ago) by ozaki-r
Branch: MAIN
Changes since 1.96: +5 -6 lines
Diff to previous 1.96 (colored)

Get rid of unused argument from get_rand_ifid

Revision 1.96 / (download) - annotate - [select for diffs], Fri Apr 1 08:12:00 2016 UTC (4 years, 8 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422
Changes since 1.95: +28 -30 lines
Diff to previous 1.95 (colored)

Refine nd6log

Add __func__ to nd6log itself instead of adding it to callers.

Revision 1.95 / (download) - annotate - [select for diffs], Mon Feb 23 19:15:59 2015 UTC (5 years, 9 months ago) by martin
Branch: MAIN
CVS Tags: nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406
Changes since 1.94: +4 -4 lines
Diff to previous 1.94 (colored)

Rearange interface detachement slightly: before we free the INET6 specific
per-interface data, make sure to call nd6_purge() with it to remove
routing entries pointing to the going interface.
When we should happen to call this function again later, with the data
already gone, just return.
Fixes PR kern/49682, ok: christos.

Revision 1.94 / (download) - annotate - [select for diffs], Fri Nov 14 17:34:23 2014 UTC (6 years ago) by maxv
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.93: +2 -3 lines
Diff to previous 1.93 (colored)

Do not uselessly include <sys/malloc.h>.

Revision 1.93 / (download) - annotate - [select for diffs], Tue Sep 9 20:16:12 2014 UTC (6 years, 2 months ago) by rmind
Branch: MAIN
Changes since 1.92: +3 -3 lines
Diff to previous 1.92 (colored)

Eliminate IFAREF() and IFAFREE() macros in favour of functions.

Revision 1.92 / (download) - annotate - [select for diffs], Fri Sep 5 06:08:15 2014 UTC (6 years, 2 months ago) by matt
Branch: MAIN
Changes since 1.91: +14 -14 lines
Diff to previous 1.91 (colored)

Don't use C++ keyword as variable.
Use different prefix for nd6_prefixctl members than for nd6_prefix members.

Revision 1.91 / (download) - annotate - [select for diffs], Thu Jun 5 16:06:49 2014 UTC (6 years, 5 months ago) by roy
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.90: +8 -3 lines
Diff to previous 1.90 (colored)

Add IPV6CTL_AUTO_LINKLOCAL and ND6_IFF_AUTO_LINKLOCAL toggles which
control the automatic creation of IPv6 link-local addresses when an
interface is brought up.

Taken from FreeBSD.

Revision 1.90 / (download) - annotate - [select for diffs], Sat May 17 20:44:24 2014 UTC (6 years, 6 months ago) by rmind
Branch: MAIN
CVS Tags: rmind-smpnet-nbase, rmind-smpnet-base
Changes since 1.89: +4 -4 lines
Diff to previous 1.89 (colored)

- Move IFNET_*() macros under #ifdef _KERNEL.
- Replace TAILQ_FOREACH on ifnet with IFNET_FOREACH().

Revision 1.89 / (download) - annotate - [select for diffs], Fri Oct 25 15:44:39 2013 UTC (7 years, 1 month ago) by martin
Branch: MAIN
CVS Tags: yamt-pagecache-base9, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.88: +3 -3 lines
Diff to previous 1.88 (colored)

Mark a variable as used only in diagnostic kernels

Revision 1.88 / (download) - annotate - [select for diffs], Fri Oct 18 02:20:15 2013 UTC (7 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.87: +3 -8 lines
Diff to previous 1.87 (colored)

convert a DIAGNOSTIC / panic into a KASSERTMSG().

Revision 1.87 / (download) - annotate - [select for diffs], Sat Dec 31 20:41:59 2011 UTC (8 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, khorben-n900, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10, agc-symver-base, agc-symver
Branch point for: tls-maxphys, rmind-smpnet
Changes since 1.86: +3 -3 lines
Diff to previous 1.86 (colored)

- fix offsetof usage, and redundant defines
- kill pointer casts to 0

Revision 1.86 / (download) - annotate - [select for diffs], Sat Nov 19 22:51:29 2011 UTC (9 years ago) by tls
Branch: MAIN
CVS Tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Changes since 1.85: +4 -9 lines
Diff to previous 1.85 (colored)

First step of random number subsystem rework described in
<20111022023242.BA26F14A158@mail.netbsd.org>.  This change includes
the following:

	An initial cleanup and minor reorganization of the entropy pool
	code in sys/dev/rnd.c and sys/dev/rndpool.c.  Several bugs are
	fixed.  Some effort is made to accumulate entropy more quickly at
	boot time.

	A generic interface, "rndsink", is added, for stream generators to
	request that they be re-keyed with good quality entropy from the pool
	as soon as it is available.

	The arc4random()/arc4randbytes() implementation in libkern is
	adjusted to use the rndsink interface for rekeying, which helps
	address the problem of low-quality keys at boot time.

	An implementation of the FIPS 140-2 statistical tests for random
	number generator quality is provided (libkern/rngtest.c).  This
	is based on Greg Rose's implementation from Qualcomm.

	A new random stream generator, nist_ctr_drbg, is provided.  It is
	based on an implementation of the NIST SP800-90 CTR_DRBG by
	Henric Jungheim.  This generator users AES in a modified counter
	mode to generate a backtracking-resistant random stream.

	An abstraction layer, "cprng", is provided for in-kernel consumers
	of randomness.  The arc4random/arc4randbytes API is deprecated for
	in-kernel use.  It is replaced by "cprng_strong".  The current
	cprng_fast implementation wraps the existing arc4random
	implementation.  The current cprng_strong implementation wraps the
	new CTR_DRBG implementation.  Both interfaces are rekeyed from
	the entropy pool automatically at intervals justifiable from best
	current cryptographic practice.

	In some quick tests, cprng_fast() is about the same speed as
	the old arc4randbytes(), and cprng_strong() is about 20% faster
	than rnd_extract_data().  Performance is expected to improve.

	The AES code in src/crypto/rijndael is no longer an optional
	kernel component, as it is required by cprng_strong, which is
	not an optional kernel component.

	The entropy pool output is subjected to the rngtest tests at
	startup time; if it fails, the system will reboot.  There is
	approximately a 3/10000 chance of a false positive from these
	tests.  Entropy pool _input_ from hardware random numbers is
	subjected to the rngtest tests at attach time, as well as the
	FIPS continuous-output test, to detect bad or stuck hardware
	RNGs; if any are detected, they are detached, but the system
	continues to run.

	A problem with rndctl(8) is fixed -- datastructures with
	pointers in arrays are no longer passed to userspace (this
	was not a security problem, but rather a major issue for
	compat32).  A new kernel will require a new rndctl.

	The sysctl kern.arandom() and kern.urandom() nodes are hooked
	up to the new generators, but the /dev/*random pseudodevices
	are not, yet.

	Manual pages for the new kernel interfaces are forthcoming.

Revision 1.85 / (download) - annotate - [select for diffs], Sat Sep 19 13:11:02 2009 UTC (11 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-nfs-mp-base9, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, uebayasi-xip-base, uebayasi-xip, rmind-uvmplock-nbase, rmind-uvmplock-base, rmind-uvmplock, matt-premerge-20091211, matt-mips64-premerge-20101231, jym-xensuspend-nbase, jruoho-x86intr-base, jruoho-x86intr, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: yamt-pagecache
Changes since 1.84: +4 -141 lines
Diff to previous 1.84 (colored)

backout the changes that establish a workqueue to synchronize the addresses
for arg and gre because they cause a race condition by calling ioctl() during
interface initialization. To make this work correctly we would need to
synchronize all interface init routines.

Revision 1.84 / (download) - annotate - [select for diffs], Thu Aug 13 09:04:03 2009 UTC (11 years, 3 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7
Changes since 1.83: +3 -3 lines
Diff to previous 1.83 (colored)

buildfix: if_indexlim is of type size_t

Revision 1.83 / (download) - annotate - [select for diffs], Thu Aug 13 00:34:04 2009 UTC (11 years, 3 months ago) by dyoung
Branch: MAIN
Changes since 1.82: +142 -4 lines
Diff to previous 1.82 (colored)

Postpone to a workqueue adding link-local and loopback IPv6 addresses
to an interface.  This keeps the kernel from entering ifp->if_ioctl
recursively, which can deadlock if if_ioctl takes locks.  This will
fix deadlocks & LOCKDEBUG errors in agr(4) (kern/39940) and in
gre(4).

Revision 1.82 / (download) - annotate - [select for diffs], Thu Jul 30 17:28:36 2009 UTC (11 years, 4 months ago) by dyoung
Branch: MAIN
Changes since 1.81: +3 -3 lines
Diff to previous 1.81 (colored)

Fix typo in comment, s/SIOCSIFADDR/SIOCINITIFADDR/.

Revision 1.81 / (download) - annotate - [select for diffs], Fri Nov 7 00:20:18 2008 UTC (12 years ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, mjf-devfs2-base, jymxensuspend-base, jym-xensuspend-base, jym-xensuspend, haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.80: +12 -12 lines
Diff to previous 1.80 (colored)

*** Summary ***

When a link-layer address changes (e.g., ifconfig ex0 link
02:de:ad:be:ef:02 active), send a gratuitous ARP and/or a Neighbor
Advertisement to update the network-/link-layer address bindings
on our LAN peers.

Refuse a change of ethernet address to the address 00:00:00:00:00:00
or to any multicast/broadcast address.  (Thanks matt@.)

Reorder ifnet ioctl operations so that driver ioctls may inherit
the functions of their "class"---ether_ioctl(), fddi_ioctl(), et
cetera---and the class ioctls may inherit from the generic ioctl,
ifioctl_common(), but both driver- and class-ioctls may override
the generic behavior.  Make network drivers share more code.

Distinguish a "factory" link-layer address from others for the
purposes of both protecting that address from deletion and computing
EUI64.

Return consistent, appropriate error codes from network drivers.

Improve readability.  KNF.

*** Details ***

In if_attach(), always initialize the interface ioctl routine,
ifnet->if_ioctl, if the driver has not already initialized it.
Delete if_ioctl == NULL tests everywhere else, because it cannot
happen.

In the ioctl routines of network interfaces, inherit common ioctl
behaviors by calling either ifioctl_common() or whichever ioctl
routine is appropriate for the class of interface---e.g., ether_ioctl()
for ethernets.

Stop (ab)using SIOCSIFADDR and start to use SIOCINITIFADDR.  In
the user->kernel interface, SIOCSIFADDR's argument was an ifreq,
but on the protocol->ifnet interface, SIOCSIFADDR's argument was
an ifaddr.  That was confusing, and it would work against me as I
make it possible for a network interface to overload most ioctls.
On the protocol->ifnet interface, replace SIOCSIFADDR with
SIOCINITIFADDR.  In ifioctl(), return EPERM if userland tries to
invoke SIOCINITIFADDR.

In ifioctl(), give the interface the first shot at handling most
interface ioctls, and give the protocol the second shot, instead
of the other way around. Finally, let compatibility code (COMPAT_OSOCK)
take a shot.

Pull device initialization out of switch statements under
SIOCINITIFADDR.  For example, pull ..._init() out of any switch
statement that looks like this:

        switch (...->sa_family) {
        case ...:
                ..._init();
                ...
                break;
        ...
        default:
                ..._init();
                ...
                break;
        }

Rewrite many if-else clauses that handle all permutations of IFF_UP
and IFF_RUNNING to use a switch statement,

        switch (x & (IFF_UP|IFF_RUNNING)) {
        case 0:
                ...
                break;
        case IFF_RUNNING:
                ...
                break;
        case IFF_UP:
                ...
                break;
        case IFF_UP|IFF_RUNNING:
                ...
                break;
        }

unifdef lots of code containing #ifdef FreeBSD, #ifdef NetBSD, and
#ifdef SIOCSIFMTU, especially in fwip(4) and in ndis(4).

In ipw(4), remove an if_set_sadl() call that is out of place.

In nfe(4), reuse the jumbo MTU logic in ether_ioctl().

Let ethernets register a callback for setting h/w state such as
promiscuous mode and the multicast filter in accord with a change
in the if_flags: ether_set_ifflags_cb() registers a callback that
returns ENETRESET if the caller should reset the ethernet by calling
if_init(), 0 on success, != 0 on failure.  Pull common code from
ex(4), gem(4), nfe(4), sip(4), tlp(4), vge(4) into ether_ioctl(),
and register if_flags callbacks for those drivers.

Return ENOTTY instead of EINVAL for inappropriate ioctls.  In
zyd(4), use ENXIO instead of ENOTTY to indicate that the device is
not any longer attached.

Add to if_set_sadl() a boolean 'factory' argument that indicates
whether a link-layer address was assigned by the factory or some
other source.  In a comment, recommend using the factory address
for generating an EUI64, and update in6_get_hw_ifid() to prefer a
factory address to any other link-layer address.

Add a routing message, RTM_LLINFO_UPD, that tells protocols to
update the binding of network-layer addresses to link-layer addresses.
Implement this message in IPv4 and IPv6 by sending a gratuitous
ARP or a neighbor advertisement, respectively.  Generate RTM_LLINFO_UPD
messages on a change of an interface's link-layer address.

In ether_ioctl(), do not let SIOCALIFADDR set a link-layer address
that is broadcast/multicast or equal to 00:00:00:00:00:00.

Make ether_ioctl() call ifioctl_common() to handle ioctls that it
does not understand.

In gif(4), initialize if_softc and use it, instead of assuming that
the gif_softc and ifp overlap.

Let ifioctl_common() handle SIOCGIFADDR.

Sprinkle rtcache_invariants(), which checks on DIAGNOSTIC kernels
that certain invariants on a struct route are satisfied.

In agr(4), rewrite agr_ioctl_filter() to be a bit more explicit
about the ioctls that we do not allow on an agr(4) member interface.

bzero -> memset.  Delete unnecessary casts to void *.  Use
sockaddr_in_init() and sockaddr_in6_init().  Compare pointers with
NULL instead of "testing truth".  Replace some instances of (type
*)0 with NULL.  Change some K&R prototypes to ANSI C, and join
lines.

Revision 1.80 / (download) - annotate - [select for diffs], Thu Apr 24 11:38:38 2008 UTC (12 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, yamt-nfs-mp-base, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, hpcarm-cleanup-nbase, haad-dm-base1
Branch point for: yamt-nfs-mp, nick-hppapmap, haad-dm
Changes since 1.79: +8 -4 lines
Diff to previous 1.79 (colored)

Merge the socket locking patch:

- Socket layer becomes MP safe.
- Unix protocols become MP safe.
- Allows protocol processing interrupts to safely block on locks.
- Fixes a number of race conditions.

With much feedback from matt@ and plunky@.

Revision 1.79 / (download) - annotate - [select for diffs], Thu Dec 6 00:28:36 2007 UTC (12 years, 11 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, matt-armv6-base, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, jmcneill-pm-base, hpcarm-cleanup-base, cube-autoconf-base, cube-autoconf, bouyer-xeni386-nbase, bouyer-xeni386-merge1, bouyer-xeni386-base, bouyer-xeni386, ad-socklock-base1
Branch point for: yamt-pf42, mjf-devfs2
Changes since 1.78: +3 -4 lines
Diff to previous 1.78 (colored)

Use ifa_insert(), ifa_remove().

Revision 1.78 / (download) - annotate - [select for diffs], Wed Dec 5 23:47:18 2007 UTC (12 years, 11 months ago) by dyoung
Branch: MAIN
Changes since 1.77: +3 -8 lines
Diff to previous 1.77 (colored)

Extract common code, creating a subroutine if_purgeaddrs(ifp,
family, purgeaddr) which applies function `purgeaddr' to each
address on `ifp' belonging to `family'.

Revision 1.77 / (download) - annotate - [select for diffs], Wed Dec 5 23:00:58 2007 UTC (12 years, 11 months ago) by dyoung
Branch: MAIN
Changes since 1.76: +6 -6 lines
Diff to previous 1.76 (colored)

Use IFADDR_FIRST(), IFADDR_NEXT().

Revision 1.76 / (download) - annotate - [select for diffs], Tue Dec 4 10:27:33 2007 UTC (13 years ago) by dyoung
Branch: MAIN
Changes since 1.75: +6 -3 lines
Diff to previous 1.75 (colored)

Use IFNET_FOREACH() and IFADDR_FOREACH().

Revision 1.75 / (download) - annotate - [select for diffs], Sat Nov 10 00:14:31 2007 UTC (13 years ago) by dyoung
Branch: MAIN
CVS Tags: vmlocking2-base1, vmlocking-nbase, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: vmlocking2
Changes since 1.74: +6 -14 lines
Diff to previous 1.74 (colored)

Use sockaddr_in6_init().

Revision 1.74 / (download) - annotate - [select for diffs], Thu Nov 1 20:33:56 2007 UTC (13 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: jmcneill-base
Branch point for: mjf-devfs
Changes since 1.73: +8 -8 lines
Diff to previous 1.73 (colored)

De-__P().

Revision 1.73 / (download) - annotate - [select for diffs], Fri Aug 10 22:43:26 2007 UTC (13 years, 3 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, nick-csl-alignment-base5
Branch point for: matt-armv6, bouyer-xenamd64
Changes since 1.72: +6 -6 lines
Diff to previous 1.72 (colored)

Constify.

Revision 1.72 / (download) - annotate - [select for diffs], Mon Jul 9 21:11:12 2007 UTC (13 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: nick-csl-alignment, jmcneill-pm
Changes since 1.71: +3 -3 lines
Diff to previous 1.71 (colored)

Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements

Revision 1.71 / (download) - annotate - [select for diffs], Wed May 23 17:15:01 2007 UTC (13 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.70: +32 -36 lines
Diff to previous 1.70 (colored)

Ansify + add a few comments, from Karl Sjödahl

Revision 1.70 / (download) - annotate - [select for diffs], Thu Mar 15 23:26:04 2007 UTC (13 years, 8 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic
Changes since 1.69: +6 -9 lines
Diff to previous 1.69 (colored)

Bark if we cannot assign a link-local address.  While I am here,
fix the grammar in a comment.

Revision 1.69 / (download) - annotate - [select for diffs], Thu Feb 22 08:52:57 2007 UTC (13 years, 9 months ago) by dyoung
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Branch point for: vmlocking, reinoud-bufcleanup, mjf-ufs-trans
Changes since 1.68: +11 -11 lines
Diff to previous 1.68 (colored)

Cosmetic: use TAILQ_FOREACH().  Remove extraneous () from return
statements.

Revision 1.68 / (download) - annotate - [select for diffs], Mon Nov 20 04:16:27 2006 UTC (14 years ago) by dyoung
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, post-newlock2-merge, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm
Branch point for: yamt-idlelwp
Changes since 1.67: +10 -16 lines
Diff to previous 1.67 (colored)

Use the TAILQ_/LIST_ macros instead of open-coding them.

Revision 1.67 / (download) - annotate - [select for diffs], Thu Nov 16 01:33:45 2006 UTC (14 years ago) by christos
Branch: MAIN
Changes since 1.66: +4 -4 lines
Diff to previous 1.66 (colored)

__unused removal on arguments; approved by core.

Revision 1.66 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:39 2006 UTC (14 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.65: +5 -7 lines
Diff to previous 1.65 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.65 / (download) - annotate - [select for diffs], Thu May 18 09:05:51 2006 UTC (14 years, 6 months ago) by liamjfoy
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, simonb-timecounters-base, rpaulo-netinet-merge-pcb-base, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.64: +4 -2 lines
Diff to previous 1.64 (colored)

Integrate Common Address Redundancy Procotol (CARP) from OpenBSD

'pseudo-device	carp'

Thanks to: joerg@ christos@ riz@ and others who tested
Ok: core@

Revision 1.64 / (download) - annotate - [select for diffs], Sun Mar 5 23:47:08 2006 UTC (14 years, 9 months ago) by rpaulo
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, peter-altq-base, elad-kernelauth-base, elad-kernelauth
Branch point for: peter-altq
Changes since 1.63: +293 -41 lines
Diff to previous 1.63 (colored)

NDP-related improvements:
        RFC4191
	- supports host-side router-preference

	RFC3542
	- if DAD fails on a interface, disables IPv6 operation on the
          interface
	- don't advertise MLD report before DAD finishes

	Others
	- fixes integer overflow for valid and preferred lifetimes
	- improves timer granularity for MLD, using callout-timer.
	- reflects rtadvd's IPv6 host variable information into kernel
	  (router only)
	- adds a sysctl option to enable/disable pMTUd for multicast
          packets
	- performs NUD on PPP/GRE interface by default
	- Redirect works regardless of ip6_accept_rtadv
	- removes RFC1885-related code

From the KAME project via SUZUKI Shinsuke.
Reviewed by core.

Revision 1.63 / (download) - annotate - [select for diffs], Sat Jan 21 00:15:36 2006 UTC (14 years, 10 months ago) by rpaulo
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.62: +8 -23 lines
Diff to previous 1.62 (colored)

Better support of IPv6 scoped addresses.

- most of the kernel code will not care about the actual encoding of
  scope zone IDs and won't touch "s6_addr16[1]" directly.
- similarly, most of the kernel code will not care about link-local
  scoped addresses as a special case.
- scope boundary check will be stricter.  For example, the current
  *BSD code allows a packet with src=::1 and dst=(some global IPv6
  address) to be sent outside of the node, if the application do:
    s = socket(AF_INET6);
    bind(s, "::1");
    sendto(s, some_global_IPv6_addr);
  This is clearly wrong, since ::1 is only meaningful within a single
  node, but the current implementation of the *BSD kernel cannot
  reject this attempt.
- and, while there, don't try to remove the ff02::/32 interface route
  entry in in6_ifdetach() as it's already gone.

This also includes some level of support for the standard source
address selection algorithm defined in RFC3484, which will be
completed on in the future.

From the KAME project via JINMEI Tatuya.
Approved by core@.

Revision 1.62 / (download) - annotate - [select for diffs], Sun Dec 11 12:25:02 2005 UTC (14 years, 11 months ago) by christos
Branch: MAIN
Branch point for: yamt-uio_vmspace
Changes since 1.61: +2 -2 lines
Diff to previous 1.61 (colored)

merge ktrace-lwp.

Revision 1.61 / (download) - annotate - [select for diffs], Tue Apr 20 17:12:03 2004 UTC (16 years, 7 months ago) by itojun
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, yamt-km-base4, yamt-km-base3, yamt-km-base2, yamt-km-base, yamt-km, thorpej-vnode-attr-base, thorpej-vnode-attr, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, ktrace-lwp-base, kent-audio2-base, kent-audio2, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-lazymbuf
Changes since 1.60: +2 -3 lines
Diff to previous 1.60 (colored)

remove duplicated #include.  PR 25234

Revision 1.60 / (download) - annotate - [select for diffs], Wed Feb 11 20:51:24 2004 UTC (16 years, 9 months ago) by itojun
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2
Changes since 1.59: +2 -4 lines
Diff to previous 1.59 (colored)

we have IFT_BRIDGE already, no need for #ifdef

Revision 1.59 / (download) - annotate - [select for diffs], Wed Feb 11 17:36:33 2004 UTC (16 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.58: +8 -2 lines
Diff to previous 1.58 (colored)

We don't have IFT_{PFLOG,PFSYNC} (yet).

Revision 1.58 / (download) - annotate - [select for diffs], Wed Feb 11 10:42:24 2004 UTC (16 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.57: +4 -2 lines
Diff to previous 1.57 (colored)

missing bzero

Revision 1.57 / (download) - annotate - [select for diffs], Sat Sep 6 04:20:57 2003 UTC (17 years, 3 months ago) by itojun
Branch: MAIN
Changes since 1.56: +0 -2 lines
Diff to previous 1.56 (colored)

committed by mistake, sorry

Revision 1.56 / (download) - annotate - [select for diffs], Sat Sep 6 04:13:50 2003 UTC (17 years, 3 months ago) by itojun
Branch: MAIN
Changes since 1.55: +4 -2 lines
Diff to previous 1.55 (colored)

correct comment

Revision 1.55 / (download) - annotate - [select for diffs], Tue Jul 8 10:20:45 2003 UTC (17 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.54: +6 -2 lines
Diff to previous 1.54 (colored)

on interface detach, clear multicast forwarding table.  from kame

Revision 1.54 / (download) - annotate - [select for diffs], Sat Nov 2 07:30:55 2002 UTC (18 years, 1 month ago) by perry
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Branch point for: ktrace-lwp
Changes since 1.53: +3 -3 lines
Diff to previous 1.53 (colored)

/*CONTCOND*/ while (0)'ed macros

Revision 1.53 / (download) - annotate - [select for diffs], Sun Sep 15 01:18:59 2002 UTC (18 years, 2 months ago) by itojun
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-base, kqueue-aftermerge
Changes since 1.52: +2 -3 lines
Diff to previous 1.52 (colored)

remove extra blank line

Revision 1.52 / (download) - annotate - [select for diffs], Wed Sep 11 03:23:24 2002 UTC (18 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.51: +3 -3 lines
Diff to previous 1.51 (colored)

reduce diff w/kame

Revision 1.51 / (download) - annotate - [select for diffs], Wed Sep 11 02:46:45 2002 UTC (18 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.50: +6 -6 lines
Diff to previous 1.50 (colored)

KNF - return is not a function.  sync w/kame.

Revision 1.50 / (download) - annotate - [select for diffs], Wed Sep 11 02:41:24 2002 UTC (18 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.49: +7 -7 lines
Diff to previous 1.49 (colored)

correct signedness mixup in pointer passing.  sync w/kame

Revision 1.49 / (download) - annotate - [select for diffs], Tue Jun 11 07:28:06 2002 UTC (18 years, 5 months ago) by itojun
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.48: +13 -9 lines
Diff to previous 1.48 (colored)

silence some of log(), as the codepath will be visited for IPv6-non-capable
interfaces too and can be annoying.  net.inet6.icmp6.nd6_debug will
re-enable them.

Revision 1.48 / (download) - annotate - [select for diffs], Sat Jun 8 21:22:31 2002 UTC (18 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.47: +237 -323 lines
Diff to previous 1.47 (colored)

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.

Revision 1.47 / (download) - annotate - [select for diffs], Fri Jun 7 04:30:40 2002 UTC (18 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.46: +12 -16 lines
Diff to previous 1.46 (colored)

minor KNF to sync w/kame

Revision 1.46 / (download) - annotate - [select for diffs], Wed May 29 07:53:40 2002 UTC (18 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.45: +12 -13 lines
Diff to previous 1.45 (colored)

attach nd_ifinfo structure into if_afdata.
split IPv6 link MTU (advertised by RA) from real link MTU.
sync with kame

Revision 1.45 / (download) - annotate - [select for diffs], Wed May 29 02:58:30 2002 UTC (18 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.44: +2 -59 lines
Diff to previous 1.44 (colored)

move per-interface ip6/icmp6 stat to ifnet->if_afdata.  sync w/kame

Revision 1.44 / (download) - annotate - [select for diffs], Thu May 23 06:40:03 2002 UTC (18 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.43: +2 -8 lines
Diff to previous 1.43 (colored)

no longer need IFT_PROPVIRTUAL "bridge[0-9]+" check.

Revision 1.43 / (download) - annotate - [select for diffs], Thu May 23 06:35:18 2002 UTC (18 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.42: +3 -12 lines
Diff to previous 1.42 (colored)

simplify conditions to do DAD.  sync w/kame

Revision 1.42 / (download) - annotate - [select for diffs], Thu May 23 06:25:25 2002 UTC (18 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.41: +4 -2 lines
Diff to previous 1.41 (colored)

do not have link-local address for IFT_BRIDGE

Revision 1.41 / (download) - annotate - [select for diffs], Fri Dec 21 08:54:54 2001 UTC (18 years, 11 months ago) by itojun
Branch: MAIN
CVS Tags: newlock-base, newlock, netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, ifpoll-base, eeh-devprop-base, eeh-devprop
Branch point for: netbsd-1-6, gehenna-devsw
Changes since 1.40: +12 -3 lines
Diff to previous 1.40 (colored)

whitespace/costmetic sync w/kame

Revision 1.40 / (download) - annotate - [select for diffs], Tue Dec 18 03:04:02 2001 UTC (18 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.39: +4 -4 lines
Diff to previous 1.39 (colored)

reduce white space/cosmetic diffs w/kame.

Revision 1.39 / (download) - annotate - [select for diffs], Tue Nov 13 00:56:59 2001 UTC (19 years ago) by lukem
Branch: MAIN
Changes since 1.38: +4 -1 lines
Diff to previous 1.38 (colored)

add RCSIDs

Revision 1.38 / (download) - annotate - [select for diffs], Thu Aug 23 02:58:24 2001 UTC (19 years, 3 months ago) by itojun
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, thorpej-mips-cache, thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, thorpej-devvp, pre-chs-ubcperf, post-chs-ubcperf
Changes since 1.37: +17 -4 lines
Diff to previous 1.37 (colored)

do not try to bring IPv6 up on bridge*.

Revision 1.37 / (download) - annotate - [select for diffs], Wed Jul 18 13:12:28 2001 UTC (19 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.36: +5 -2 lines
Diff to previous 1.36 (colored)

do not malloc() during interrupt context for IPv6 multicast kludge table.
malloc() during interface initialization.  sync with kame

Revision 1.36 / (download) - annotate - [select for diffs], Thu May 24 08:17:22 2001 UTC (19 years, 6 months ago) by itojun
Branch: MAIN
Branch point for: kqueue
Changes since 1.35: +18 -4 lines
Diff to previous 1.35 (colored)

print more diag message on in6_addmulti() failures.

Revision 1.35 / (download) - annotate - [select for diffs], Fri Apr 13 23:30:25 2001 UTC (19 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

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.

Revision 1.34 / (download) - annotate - [select for diffs], Wed Feb 7 08:59:48 2001 UTC (19 years, 9 months ago) by itojun
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.33: +23 -32 lines
Diff to previous 1.33 (colored)

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).

Revision 1.33 / (download) - annotate - [select for diffs], Thu Jan 18 06:49:11 2001 UTC (19 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.32: +3 -2 lines
Diff to previous 1.32 (colored)

on interface removal (ifconfig destroy) do not remove default route by mistake

Revision 1.32 / (download) - annotate - [select for diffs], Sun Nov 5 17:17:16 2000 UTC (20 years, 1 month ago) by onoe
Branch: MAIN
Changes since 1.31: +6 -1 lines
Diff to previous 1.31 (colored)

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.

Revision 1.31 / (download) - annotate - [select for diffs], Sun Oct 1 10:56:02 2000 UTC (20 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.30: +5 -5 lines
Diff to previous 1.30 (colored)

add missing \n.  sync with kame.

Revision 1.30 / (download) - annotate - [select for diffs], Fri May 5 08:03:12 2000 UTC (20 years, 7 months ago) by itojun
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Changes since 1.29: +22 -5 lines
Diff to previous 1.29 (colored)

correct in6_ifdetach() (previous code touched dangling pointers).
actually the corrected portion was never visited.

Revision 1.29 / (download) - annotate - [select for diffs], Thu Apr 27 15:39:05 2000 UTC (20 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

correct in6_ifdetach().  free oia, not ia.
From: Lennart Augustsson <augustss@augustsson.net>

Revision 1.28 / (download) - annotate - [select for diffs], Sun Apr 16 15:28:00 2000 UTC (20 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.27: +1 -7 lines
Diff to previous 1.27 (colored)

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.

Revision 1.27 / (download) - annotate - [select for diffs], Sun Apr 16 15:00:57 2000 UTC (20 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.26: +13 -7 lines
Diff to previous 1.26 (colored)

better sync with latest kame (cosmetic only).

Revision 1.26 / (download) - annotate - [select for diffs], Thu Apr 13 16:21:25 2000 UTC (20 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored)

fix fatal bug in EUI64 generation (0xff -> 0xfe typo)

Revision 1.25 / (download) - annotate - [select for diffs], Wed Apr 12 10:36:44 2000 UTC (20 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.24: +543 -391 lines
Diff to previous 1.24 (colored)

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).

Revision 1.24 / (download) - annotate - [select for diffs], Mon Apr 10 15:45:24 2000 UTC (20 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.23: +12 -12 lines
Diff to previous 1.23 (colored)

cosmetic (space before EOL), to ease diff against kame

Revision 1.23 / (download) - annotate - [select for diffs], Fri Mar 24 04:09:05 2000 UTC (20 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.22: +2 -3 lines
Diff to previous 1.22 (colored)

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.

Revision 1.22 / (download) - annotate - [select for diffs], Thu Mar 23 07:03:29 2000 UTC (20 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.21: +2 -1 lines
Diff to previous 1.21 (colored)

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.

Revision 1.21 / (download) - annotate - [select for diffs], Thu Mar 2 09:45:01 2000 UTC (20 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.20: +16 -2 lines
Diff to previous 1.20 (colored)

configure ::1 to loopback dstaddr.
honor ifa_refcnt when configuring loopback.

Revision 1.20 / (download) - annotate - [select for diffs], Thu Mar 2 07:14:52 2000 UTC (20 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.19: +6 -2 lines
Diff to previous 1.19 (colored)

don't configure ifa_dstaddr for non-pointopoint interface,
so that we won't be returning them from routing socket manipulation.

Revision 1.19 / (download) - annotate - [select for diffs], Sun Feb 6 12:49:44 2000 UTC (20 years, 9 months ago) by itojun
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored)

fix include pathname for better rfc2292 compliance.

Revision 1.18 / (download) - annotate - [select for diffs], Fri Feb 4 14:34:25 2000 UTC (20 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.17: +8 -2 lines
Diff to previous 1.17 (colored)

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)

Revision 1.17 / (download) - annotate - [select for diffs], Wed Feb 2 16:58:11 2000 UTC (20 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.16: +11 -1 lines
Diff to previous 1.16 (colored)

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)

Revision 1.16 / (download) - annotate - [select for diffs], Wed Feb 2 13:44:06 2000 UTC (20 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.15: +14 -1 lines
Diff to previous 1.15 (colored)

remove route to link-local allnodes multicast address (ff02:x::/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").

Revision 1.15 / (download) - annotate - [select for diffs], Tue Feb 1 22:52:11 2000 UTC (20 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.14: +6 -2 lines
Diff to previous 1.14 (colored)

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.

Revision 1.14 / (download) - annotate - [select for diffs], Thu Jan 6 15:46:09 2000 UTC (20 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.13: +2 -85 lines
Diff to previous 1.13 (colored)

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...

Revision 1.13 / (download) - annotate - [select for diffs], Mon Dec 13 15:17:22 1999 UTC (20 years, 11 months ago) by itojun
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Changes since 1.12: +198 -72 lines
Diff to previous 1.12 (colored)

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...)

Revision 1.12 / (download) - annotate - [select for diffs], Sun Sep 26 20:04:08 1999 UTC (21 years, 2 months ago) by is
Branch: MAIN
CVS Tags: fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999
Branch point for: wrstuden-devbsize, thorpej_scsipi
Changes since 1.11: +5 -13 lines
Diff to previous 1.11 (colored)

Don't even pretend we can create a nonglobal EUI64 out of an ARCNET link
level address. Instead, create the link-local address directly.

Revision 1.11 / (download) - annotate - [select for diffs], Sat Sep 25 22:29:21 1999 UTC (21 years, 2 months ago) by is
Branch: MAIN
Changes since 1.10: +3 -1 lines
Diff to previous 1.10 (colored)

invert u bit to convert EUI64 to RFC2373 interface ID for ARCnet

Revision 1.10 / (download) - annotate - [select for diffs], Mon Sep 20 02:35:44 1999 UTC (21 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.9: +10 -3 lines
Diff to previous 1.9 (colored)

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.

Revision 1.9 / (download) - annotate - [select for diffs], Sun Sep 19 21:42:23 1999 UTC (21 years, 2 months ago) by is
Branch: MAIN
Changes since 1.8: +5 -3 lines
Diff to previous 1.8 (colored)

fix mergo

Revision 1.8 / (download) - annotate - [select for diffs], Sun Sep 19 21:31:34 1999 UTC (21 years, 2 months ago) by is
Branch: MAIN
Changes since 1.7: +16 -1 lines
Diff to previous 1.7 (colored)

Zeroth version of IPv6 support for ARCnet. Correct MTU handling still needs
to be done.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Sep 13 12:15:55 1999 UTC (21 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.6: +46 -30 lines
Diff to previous 1.6 (colored)

- 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)

Revision 1.6 / (download) - annotate - [select for diffs], Wed Sep 8 00:50:15 1999 UTC (21 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.5: +3 -1 lines
Diff to previous 1.5 (colored)

fix u bit in interface identifier for ether and p2p-802 interfacde.

Revision 1.5 / (download) - annotate - [select for diffs], Sun Sep 5 01:57:10 1999 UTC (21 years, 3 months ago) by itojun
Branch: MAIN
Changes since 1.4: +13 -6 lines
Diff to previous 1.4 (colored)

- 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)

Revision 1.4 / (download) - annotate - [select for diffs], Sat Jul 10 19:46:10 1999 UTC (21 years, 4 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.3: +19 -12 lines
Diff to previous 1.3 (colored)

Clean up some printfs(), and mark a few for possible later nuking,
since they appear to be for debugging purposes only.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Jul 3 21:30:18 1999 UTC (21 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.2: +2 -0 lines
Diff to previous 1.2 (colored)

RCS ID police.

Revision 1.2 / (download) - annotate - [select for diffs], Thu Jul 1 08:12:54 1999 UTC (21 years, 5 months ago) by itojun
Branch: MAIN
Branch point for: chs-ubc2
Changes since 1.1: +566 -0 lines
Diff to previous 1.1 (colored)

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.

Revision 1.1, Mon Jun 28 06:37:04 1999 UTC (21 years, 5 months ago) by itojun
Branch: MAIN
Branch point for: kame
FILE REMOVED

file in6_ifattach.c was initially added on branch kame.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>