The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.92 / (download) - annotate - [select for diffs], Thu Aug 3 04:24:55 2023 UTC (7 months, 3 weeks ago) by ozaki-r
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.91: +3 -2 lines
Diff to previous 1.91 (colored) to selected 1.59 (colored)

in6: add missing rtcache_unref to in6_selectroute

By default, this issue is harmless.  However, if NET_MPSAFE
is enabled, it could eventually lead to a kernel panic.

Revision 1.91 / (download) - annotate - [select for diffs], Fri Nov 4 09:01:53 2022 UTC (16 months, 3 weeks ago) by ozaki-r
Branch: MAIN
CVS Tags: netbsd-10-base
Branch point for: netbsd-10
Changes since 1.90: +9 -9 lines
Diff to previous 1.90 (colored) to selected 1.59 (colored)

inpcb: rename functions to in6pcb_*

Revision 1.90 / (download) - annotate - [select for diffs], Fri Oct 28 05:25:36 2022 UTC (17 months ago) by ozaki-r
Branch: MAIN
Changes since 1.89: +4 -4 lines
Diff to previous 1.89 (colored) to selected 1.59 (colored)

inpcb: separate inpcb again to reduce the size of PCB for IPv4

The data size of PCB for IPv4 increased because of the merge of
struct in6pcb.  The change decreases the size to the original size by
separating struct inpcb (again).  struct in4pcb and in6pcb that embed
struct inpcb are introduced.

Even after the separation, users don't need to realize the separation
and only have to use some macros to access dedicated data.  For example,
inp->inp_laddr is now accessed through in4p_laddr(inp).

Revision 1.89 / (download) - annotate - [select for diffs], Fri Oct 28 05:18:39 2022 UTC (17 months ago) by ozaki-r
Branch: MAIN
Changes since 1.88: +20 -20 lines
Diff to previous 1.88 (colored) to selected 1.59 (colored)

inpcb: integrate data structures of PCB into one

Data structures of network protocol control blocks (PCBs), i.e.,
struct inpcb, in6pcb and inpcb_hdr, are not organized well.  Users of
the data structures have to handle them separately and thus the code
is cluttered and duplicated.

The commit integrates the data structures into one, struct inpcb.  As a
result, users of PCBs only have to handle just one data structure, so
the code becomes simple.

One drawback is that the data size of PCB for IPv4 increases by 40 bytes
(from 248 bytes to 288 bytes).

Revision 1.88 / (download) - annotate - [select for diffs], Tue Aug 10 06:29:56 2021 UTC (2 years, 7 months ago) by kardel
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.87: +13 -4 lines
Diff to previous 1.87 (colored) to selected 1.59 (colored)

PR kern/56348
MTU discovery fails with IPv6 sockets bound to IPv4 mapped address

pick up the IPv4 route for IPv4 mapped IPv6 address to get the correct
MTU and not any unrelated/inappropriate MTU from IPv6 routes. IPv4 mapped
IPv6 addresses are always handled by the IPv4 stack and MTU discovery
is solely handled with the IPv4 routing table.

Revision 1.87 / (download) - annotate - [select for diffs], Fri Aug 28 06:32:24 2020 UTC (3 years, 7 months ago) by ozaki-r
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.86: +3 -2 lines
Diff to previous 1.86 (colored) to selected 1.59 (colored)

inet6: reduce silent packet discards

Revision 1.86 / (download) - annotate - [select for diffs], Wed Nov 13 02:51:22 2019 UTC (4 years, 4 months ago) by ozaki-r
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Changes since 1.85: +3 -4 lines
Diff to previous 1.85 (colored) to selected 1.59 (colored)

Get rid of unnecessary NULL checks for rt_ifa and ifa_ifp

They are always non-NULL nowadays.

Revision 1.85 / (download) - annotate - [select for diffs], Tue May 1 07:21:39 2018 UTC (5 years, 10 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, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, isaki-audio2-base, isaki-audio2
Branch point for: phil-wifi, netbsd-9
Changes since 1.84: +2 -4 lines
Diff to previous 1.84 (colored) to selected 1.59 (colored)

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

Revision 1.84 / (download) - annotate - [select for diffs], Wed Dec 6 14:17:42 2017 UTC (6 years, 3 months ago) by roy
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.83: +10 -8 lines
Diff to previous 1.83 (colored) to selected 1.59 (colored)

Treat unvalidated addresses as deprecated in rule 3.

Revision 1.83 / (download) - annotate - [select for diffs], Fri Nov 24 14:03:25 2017 UTC (6 years, 4 months ago) by roy
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.82: +11 -7 lines
Diff to previous 1.82 (colored) to selected 1.59 (colored)

Allow local communication over DETACHED addresses.
Allow binding to DETACHED or TENTATIVE addresses as we deny
sending upstream from them anyway.
Prefer non DETACHED or TENTATIVE addresses.

Revision 1.82 / (download) - annotate - [select for diffs], Mon Nov 20 09:01:20 2017 UTC (6 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.81: +5 -2 lines
Diff to previous 1.81 (colored) to selected 1.59 (colored)

Mention IPv6 address selection policy isn't MP-safe yet

Though it's not a problem until a policy is set.

Revision 1.81 / (download) - annotate - [select for diffs], Sun Sep 17 17:35:10 2017 UTC (6 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.80: +10 -4 lines
Diff to previous 1.80 (colored) to selected 1.59 (colored)

Skip the scope test for loopback addresses in non-loopback interfaces.
While this test is also done in in6_setscope, testing here allows us
to log an error for other callers.

Revision 1.80 / (download) - annotate - [select for diffs], Sun Aug 27 12:34:21 2017 UTC (6 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.79: +7 -5 lines
Diff to previous 1.79 (colored) to selected 1.59 (colored)

PR/52382: BERTRAND Joel: Fix mapped IPv4 source selection; this got broken
in the last code refactoring. in6_selectif failing is not fatal.
XXX: pullup-8

Revision 1.79 / (download) - annotate - [select for diffs], Fri Feb 17 03:57:17 2017 UTC (7 years, 1 month 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, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: netbsd-8
Changes since 1.78: +3 -3 lines
Diff to previous 1.78 (colored) to selected 1.59 (colored)

Rename if_acquire_NOMPSAFE to if_acquire

It can be used in MP-safe ways. So let's remove the confusing postfix.
If it's used in a unsafe way, warn NOMPSAFE in a comment.

Revision 1.78 / (download) - annotate - [select for diffs], Mon Jan 16 15:44:47 2017 UTC (7 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20170204
Changes since 1.77: +15 -10 lines
Diff to previous 1.77 (colored) to selected 1.59 (colored)

ip6_sprintf -> IN6_PRINT so that we pass the size.

Revision 1.77 / (download) - annotate - [select for diffs], Mon Jan 16 07:33:36 2017 UTC (7 years, 2 months ago) by ryo
Branch: MAIN
Changes since 1.76: +6 -4 lines
Diff to previous 1.76 (colored) to selected 1.59 (colored)

Make ip6_sprintf(), in_fmtaddr(), lla_snprintf() and icmp6_redirect_diag() mpsafe.

Reviewed by ozaki-r@

Revision 1.76 / (download) - annotate - [select for diffs], Thu Dec 8 05:16:34 2016 UTC (7 years, 3 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.75: +24 -13 lines
Diff to previous 1.75 (colored) to selected 1.59 (colored)

Add rtcache_unref to release points of rtentry stemming from rtcache

In the MP-safe world, a rtentry stemming from a rtcache can be freed at any
points. So we need to protect rtentries somehow say by reference couting or
passive references. Regardless of the method, we need to call some release
function of a rtentry after using it.

The change adds a new function rtcache_unref to release a rtentry. At this
point, this function does nothing because for now we don't add a reference
to a rtentry when we get one from a rtcache. We will add something useful
in a further commit.

This change is a part of changes for MP-safe routing table. It is separated
to avoid one big change that makes difficult to debug by bisecting.

Revision 1.75 / (download) - annotate - [select for diffs], Fri Dec 2 00:19:54 2016 UTC (7 years, 3 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20161204
Changes since 1.74: +4 -4 lines
Diff to previous 1.74 (colored) to selected 1.59 (colored)

CID 1396598, CID 1396634: Fix null pointer dereferences

Revision 1.74 / (download) - annotate - [select for diffs], Thu Nov 10 04:13:53 2016 UTC (7 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.73: +52 -115 lines
Diff to previous 1.73 (colored) to selected 1.59 (colored)

Tidy up in6_select*

This change tidies up in6_select* functions, especially
selectroute.

selectroute is annoying because:
- It returns both/either of a rtentry and/or an ifp
  - Yes, it may return only an ifp!
    - It is valid but selectroute shouldn't handle the case
  - Such conditional behavior makes it difficult
    to apply locking/psref thingy
- It may return a rtentry even if error
- It may use opt->ip6po_nextroute rtcache implicitly
  - The caller can know if it is used
    by rtcache_validate(&opt->ip6po_nextroute)
    but it's racy in MP-safe world
  - Even if it uses opt->ip6po_nextroute, it may
    return a rtentry that isn't derived from the rtcache

The change includes:
- Rename selectroute to in6_selectroute
  - Let a remaining caller of selectroute, in6_selectif,
    use in6_selectroute instead
- Let in6_selectroute return only an rtentry
  - If error, it doesn't return an rtentry
  - A caller gets an ifp from a returned rtentry
- Allow in6_selectroute to modify a passed rtcache
  and a caller can know if opt->ip6po_nextroute is
  used via the rtcache
- Let callers (ip6_output and in6_selectif) handle
  the case that only an ifp is required

Inspired by OpenBSD
Proposed on tech-kern and tech-net
LGTM by roy@

Revision 1.73 / (download) - annotate - [select for diffs], Mon Oct 31 04:57:10 2016 UTC (7 years, 4 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20161104
Changes since 1.72: +149 -134 lines
Diff to previous 1.72 (colored) to selected 1.59 (colored)

Pull best address selection code out of in6_selectsrc

No functional change.

Revision 1.72 / (download) - annotate - [select for diffs], Mon Oct 31 04:16:25 2016 UTC (7 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.71: +17 -21 lines
Diff to previous 1.71 (colored) to selected 1.59 (colored)

Fix race condition of in6_selectsrc

in6_selectsrc returned a pointer to in6_addr that wan't guaranteed to be
safe by pserialize (or psref), which was racy. Let callers pass a pointer
to in6_addr and in6_selectsrc copy a result to it inside pserialize
critical sections.

Revision 1.71 / (download) - annotate - [select for diffs], Mon Oct 31 02:50:31 2016 UTC (7 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.70: +49 -62 lines
Diff to previous 1.70 (colored) to selected 1.59 (colored)

Remove unnecessary NULL checks

Revision 1.70 / (download) - annotate - [select for diffs], Fri Aug 26 20:29:31 2016 UTC (7 years, 7 months ago) by roy
Branch: MAIN
CVS Tags: nick-nhusb-base-20161004, localcount-20160914
Changes since 1.69: +5 -9 lines
Diff to previous 1.69 (colored) to selected 1.59 (colored)

Simplify.

Revision 1.69 / (download) - annotate - [select for diffs], Fri Aug 26 19:45:55 2016 UTC (7 years, 7 months ago) by roy
Branch: MAIN
Changes since 1.68: +3 -4 lines
Diff to previous 1.68 (colored) to selected 1.59 (colored)

Allow explicit binding to detached addresss.
Fixes PR kern/51435.

Revision 1.68 / (download) - annotate - [select for diffs], Tue Aug 23 19:39:57 2016 UTC (7 years, 7 months ago) by roy
Branch: MAIN
Changes since 1.67: +5 -5 lines
Diff to previous 1.67 (colored) to selected 1.59 (colored)

White space police.

Revision 1.67 / (download) - annotate - [select for diffs], Tue Aug 23 19:39:04 2016 UTC (7 years, 7 months ago) by roy
Branch: MAIN
Changes since 1.66: +4 -3 lines
Diff to previous 1.66 (colored) to selected 1.59 (colored)

Sync denied flags.

Revision 1.66 / (download) - annotate - [select for diffs], Mon Aug 1 03:15:31 2016 UTC (7 years, 7 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20160806
Changes since 1.65: +33 -10 lines
Diff to previous 1.65 (colored) to selected 1.59 (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.65 / (download) - annotate - [select for diffs], Fri Jul 15 07:40:09 2016 UTC (7 years, 8 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20160726
Changes since 1.64: +3 -3 lines
Diff to previous 1.64 (colored) to selected 1.59 (colored)

Use sin6tosa and sin6tocsa macros

No functional change.

Revision 1.64 / (download) - annotate - [select for diffs], Fri Jul 15 07:33:41 2016 UTC (7 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.63: +3 -3 lines
Diff to previous 1.63 (colored) to selected 1.59 (colored)

Use ifatoia6 macro

No functional change.

Revision 1.63 / (download) - annotate - [select for diffs], Mon Jul 4 06:48:14 2016 UTC (7 years, 8 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-base, nick-nhusb-base-20160907
Branch point for: pgoyette-localcount
Changes since 1.62: +3 -3 lines
Diff to previous 1.62 (colored) to selected 1.59 (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.62 / (download) - annotate - [select for diffs], Tue Jun 21 10:25:27 2016 UTC (7 years, 9 months ago) by ozaki-r
Branch: MAIN
Changes since 1.61: +67 -27 lines
Diff to previous 1.61 (colored) to selected 1.59 (colored)

Make sure returning ifp from in6_select* functions psref-ed

To this end, callers need to pass struct psref to the functions
and the fuctions acquire a reference of ifp with it. In some cases,
we can simply use if_get_byindex, however, in other cases
(say rt->rt_ifp and ia->ifa_ifp), we have no MP-safe way for now.
In order to take a reference anyway we use non MP-safe function
if_acquire_NOMPSAFE for the latter cases. They should be fixed in
the future somehow.

Revision 1.61 / (download) - annotate - [select for diffs], Tue Jun 21 03:28:27 2016 UTC (7 years, 9 months ago) by ozaki-r
Branch: MAIN
Changes since 1.60: +7 -5 lines
Diff to previous 1.60 (colored) to selected 1.59 (colored)

Replace ifp of ip_moptions and ip6_moptions with if_index

The motivation is the same as the mbuf's rcvif case; avoid having a pointer
of an ifnet object in ip_moptions and ip6_moptions, which is not MP-safe.

ip_moptions and ip6_moptions can be stored in a PCB for inet or inet6
that's life time is different from ifnet one and so an ifnet object can be
disappeared anytime we get it via them. Thus we need to look up an ifnet
object by if_index every time for safe.

Revision 1.60 / (download) - annotate - [select for diffs], Wed May 18 09:32:05 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529
Changes since 1.59: +2 -6 lines
Diff to previous 1.59 (colored)

Get rid of unnecessary NULL check

It's already checked just some lines above.

Revision 1.59 / (download) - annotate - [selected], Sat Dec 12 23:34:25 2015 UTC (8 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226
Changes since 1.58: +4 -3 lines
Diff to previous 1.58 (colored)

Hook up the addrctl stuff that's already there.

Revision 1.58 / (download) - annotate - [select for diffs], Mon Aug 24 22:21:27 2015 UTC (8 years, 7 months ago) by pooka
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921
Changes since 1.57: +4 -2 lines
Diff to previous 1.57 (colored) to selected 1.59 (colored)

sprinkle _KERNEL_OPT

Revision 1.57 / (download) - annotate - [select for diffs], Mon Apr 27 02:59:44 2015 UTC (8 years, 11 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606
Changes since 1.56: +17 -2 lines
Diff to previous 1.56 (colored) to selected 1.59 (colored)

Introduce in6_selecthlim_rt to consolidate an idiom for rt->rt_ifp

It consolidates a scattered routine:
(rt = rtcache_validate(&in6p->in6p_route)) != NULL ? rt->rt_ifp : NULL

Revision 1.56 / (download) - annotate - [select for diffs], Tue Jan 20 21:27:36 2015 UTC (9 years, 2 months ago) by roy
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.55: +2 -8 lines
Diff to previous 1.55 (colored) to selected 1.59 (colored)

Add net.inet6.ip6.prefer_tempaddr sysctl knob so that we can prefer
IPv6 temporary addresses as the source address.

Fixes PR kern/47100 based on a patch by Dieter Roelants.

Revision 1.55 / (download) - annotate - [select for diffs], Fri Sep 5 06:08:15 2014 UTC (9 years, 6 months ago) by matt
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.54: +7 -8 lines
Diff to previous 1.54 (colored) to selected 1.59 (colored)

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

Revision 1.54 / (download) - annotate - [select for diffs], Sat May 17 21:26:20 2014 UTC (9 years, 10 months ago) by rmind
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, rmind-smpnet-nbase, rmind-smpnet-base, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.53: +3 -3 lines
Diff to previous 1.53 (colored) to selected 1.59 (colored)

Replace open-coded access (and boundary checking) of ifindex2ifnet with
if_byindex() function.

Revision 1.53 / (download) - annotate - [select for diffs], Mon Jun 25 15:28:39 2012 UTC (11 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: tls-maxphys, tls-earlyentropy, rmind-smpnet
Changes since 1.52: +4 -4 lines
Diff to previous 1.52 (colored) to selected 1.59 (colored)

rename rfc6056 -> portalgo, requested by yamt

Revision 1.52 / (download) - annotate - [select for diffs], Sat Sep 24 17:22:14 2011 UTC (12 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, 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, jmcneill-usbmp-pre-base2, 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, jmcneill-usbmp-base, jmcneill-usbmp, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache
Changes since 1.51: +11 -64 lines
Diff to previous 1.51 (colored) to selected 1.59 (colored)

Add inet6 part of the rfc6056 code contributed by Vlad Balan as part of
Google SoC-2011

Revision 1.51 / (download) - annotate - [select for diffs], Tue May 17 04:39:57 2011 UTC (12 years, 10 months ago) by dholland
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Changes since 1.50: +2 -1 lines
Diff to previous 1.50 (colored) to selected 1.59 (colored)

Add missing $NetBSD$ header.

Revision 1.50 / (download) - annotate - [select for diffs], Tue May 3 18:28:45 2011 UTC (12 years, 10 months ago) by dyoung
Branch: MAIN
Changes since 1.49: +11 -3 lines
Diff to previous 1.49 (colored) to selected 1.59 (colored)

Reduces the resources demanded by TCP sessions in TIME_WAIT-state using
methods called Vestigial Time-Wait (VTW) and Maximum Segment Lifetime
Truncation (MSLT).

MSLT and VTW were contributed by Coyote Point Systems, Inc.

Even after a TCP session enters the TIME_WAIT state, its corresponding
socket and protocol control blocks (PCBs) stick around until the TCP
Maximum Segment Lifetime (MSL) expires.  On a host whose workload
necessarily creates and closes down many TCP sockets, the sockets & PCBs
for TCP sessions in TIME_WAIT state amount to many megabytes of dead
weight in RAM.

Maximum Segment Lifetimes Truncation (MSLT) assigns each TCP session to
a class based on the nearness of the peer.  Corresponding to each class
is an MSL, and a session uses the MSL of its class.  The classes are
loopback (local host equals remote host), local (local host and remote
host are on the same link/subnet), and remote (local host and remote
host communicate via one or more gateways).  Classes corresponding to
nearer peers have lower MSLs by default: 2 seconds for loopback, 10
seconds for local, 60 seconds for remote.  Loopback and local sessions
expire more quickly when MSLT is used.

Vestigial Time-Wait (VTW) replaces a TIME_WAIT session's PCB/socket
dead weight with a compact representation of the session, called a
"vestigial PCB".  VTW data structures are designed to be very fast and
memory-efficient: for fast insertion and lookup of vestigial PCBs,
the PCBs are stored in a hash table that is designed to minimize the
number of cacheline visits per lookup/insertion.  The memory both
for vestigial PCBs and for elements of the PCB hashtable come from
fixed-size pools, and linked data structures exploit this to conserve
memory by representing references with a narrow index/offset from the
start of a pool instead of a pointer.  When space for new vestigial PCBs
runs out, VTW makes room by discarding old vestigial PCBs, oldest first.
VTW cooperates with MSLT.

It may help to think of VTW as a "FIN cache" by analogy to the SYN
cache.

A 2.8-GHz Pentium 4 running a test workload that creates TIME_WAIT
sessions as fast as it can is approximately 17% idle when VTW is active
versus 0% idle when VTW is inactive.  It has 103 megabytes more free RAM
when VTW is active (approximately 64k vestigial PCBs are created) than
when it is inactive.

Revision 1.49 / (download) - annotate - [select for diffs], Mon May 25 22:49:23 2009 UTC (14 years, 10 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, 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, matt-premerge-20091211, matt-mips64-premerge-20101231, jymxensuspend-base, jym-xensuspend-nbase, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: rmind-uvmplock, jruoho-x86intr
Changes since 1.48: +1 -21 lines
Diff to previous 1.48 (colored) to selected 1.59 (colored)

Remove declaration of unused extern struct ifnet loif[NLOOP], which
was already removed once, but brought back in a wholesale import.
While here, mop up the #ifdef __SomeotherOS__ noise.

Revision 1.48 / (download) - annotate - [select for diffs], Tue May 12 22:22:46 2009 UTC (14 years, 10 months ago) by elad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base4, jym-xensuspend-base
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored) to selected 1.59 (colored)

Implicit EPERM -> explicit EACCES.

Requested by ad@ and yamt@.

Revision 1.47 / (download) - annotate - [select for diffs], Thu Apr 30 20:26:09 2009 UTC (14 years, 11 months ago) by elad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base3
Changes since 1.46: +31 -10 lines
Diff to previous 1.46 (colored) to selected 1.59 (colored)

Commit changes to netinet6/in6_src.c, forgot in previous commit:

    http://mail-index.netbsd.org/source-changes/2009/04/30/msg220547.html

Make in_pcbsetport() set the port number selected before passing "sin" to
kauth(9).

Revision 1.46 / (download) - annotate - [select for diffs], Wed Mar 18 16:00:22 2009 UTC (15 years ago) by cegger
Branch: MAIN
CVS Tags: nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Changes since 1.45: +3 -3 lines
Diff to previous 1.45 (colored) to selected 1.59 (colored)

bzero -> memset

Revision 1.45 / (download) - annotate - [select for diffs], Sun Jan 11 02:45:54 2009 UTC (15 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: nick-hppapmap-base2, mjf-devfs2-base
Branch point for: jym-xensuspend
Changes since 1.44: +4 -4 lines
Diff to previous 1.44 (colored) to selected 1.59 (colored)

merge christos-time_t

Revision 1.44 / (download) - annotate - [select for diffs], Wed Dec 17 20:51:37 2008 UTC (15 years, 3 months ago) by cegger
Branch: MAIN
CVS Tags: christos-time_t-nbase, christos-time_t-base
Changes since 1.43: +2 -4 lines
Diff to previous 1.43 (colored) to selected 1.59 (colored)

kill MALLOC and FREE macros.

Revision 1.43 / (download) - annotate - [select for diffs], Tue Apr 15 03:57:04 2008 UTC (15 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, 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-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, haad-dm, ad-audiomp2-base, ad-audiomp2
Branch point for: yamt-nfs-mp, nick-hppapmap
Changes since 1.42: +3 -2 lines
Diff to previous 1.42 (colored) to selected 1.59 (colored)

Make ip6 and icmp6 stats per-cpu.

Revision 1.42 / (download) - annotate - [select for diffs], Tue Apr 8 23:37:43 2008 UTC (15 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored) to selected 1.59 (colored)

Change IPv6 stats from a structure to an array of uint64_t's.

Note: This is ABI-compatible with the old ip6stat structure; old netstat
binaries will continue to work properly.

Revision 1.41 / (download) - annotate - [select for diffs], Wed Feb 27 19:40:56 2008 UTC (16 years, 1 month ago) by matt
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Branch point for: christos-time_t
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored) to selected 1.59 (colored)

Convert to ansi definitions from old-style definitons.
Remember that func() is not ansi, func(void) is.

Revision 1.40 / (download) - annotate - [select for diffs], Mon Nov 26 08:12:33 2007 UTC (16 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking2, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-base, jmcneill-pm-base, hpcarm-cleanup-base, cube-autoconf-base, cube-autoconf, bouyer-xeni386-nbase, bouyer-xeni386-merge1, bouyer-xeni386-base, bouyer-xeni386
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.39: +4 -3 lines
Diff to previous 1.39 (colored) to selected 1.59 (colored)

in6_pcbsetport: add missing htons.  (fixes ephemeral port allocation.)

Revision 1.39 / (download) - annotate - [select for diffs], Wed Oct 24 06:37:21 2007 UTC (16 years, 5 months ago) by dyoung
Branch: MAIN
CVS Tags: jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: mjf-devfs
Changes since 1.38: +2 -2 lines
Diff to previous 1.38 (colored) to selected 1.59 (colored)

Replace rote sockaddr_in6 initializations (memset(), set sa6_family,
sa6_len, and sa6_add) with sockaddr_in6_init() calls.

De-__P().  Constify.  KNF.  Shorten a staircase.  Change bcmp() to
memcmp().

Extract subroutine in6_setzoneid() from in6_setscope(), for re-use
soon.

Revision 1.38 / (download) - annotate - [select for diffs], Wed May 23 17:15:02 2007 UTC (16 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: matt-armv6, jmcneill-pm, bouyer-xenamd64
Changes since 1.37: +23 -50 lines
Diff to previous 1.37 (colored) to selected 1.59 (colored)

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

Revision 1.37 / (download) - annotate - [select for diffs], Wed May 2 20:40:26 2007 UTC (16 years, 10 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Changes since 1.36: +16 -36 lines
Diff to previous 1.36 (colored) to selected 1.59 (colored)

Eliminate address family-specific route caches (struct route, struct
route_in6, struct route_iso), replacing all caches with a struct
route.

The principle benefit of this change is that all of the protocol
families can benefit from route cache-invalidation, which is
necessary for correct routing.  Route-cache invalidation fixes an
ancient PR, kern/3508, at long last; it fixes various other PRs,
also.

Discussions with and ideas from Joerg Sonnenberger influenced this
work tremendously.  Of course, all design oversights and bugs are
mine.

DETAILS

1 I added to each address family a pool of sockaddrs.  I have
  introduced routines for allocating, copying, and duplicating,
  and freeing sockaddrs:

        struct sockaddr *sockaddr_alloc(sa_family_t af, int flags);
        struct sockaddr *sockaddr_copy(struct sockaddr *dst,
                                       const struct sockaddr *src);
        struct sockaddr *sockaddr_dup(const struct sockaddr *src, int flags);
        void sockaddr_free(struct sockaddr *sa);

  sockaddr_alloc() returns either a sockaddr from the pool belonging
  to the specified family, or NULL if the pool is exhausted.  The
  returned sockaddr has the right size for that family; sa_family
  and sa_len fields are initialized to the family and sockaddr
  length---e.g., sa_family = AF_INET and sa_len = sizeof(struct
  sockaddr_in).  sockaddr_free() puts the given sockaddr back into
  its family's pool.

  sockaddr_dup() and sockaddr_copy() work analogously to strdup()
  and strcpy(), respectively.  sockaddr_copy() KASSERTs that the
  family of the destination and source sockaddrs are alike.

  The 'flags' argumet for sockaddr_alloc() and sockaddr_dup() is
  passed directly to pool_get(9).

2 I added routines for initializing sockaddrs in each address
  family, sockaddr_in_init(), sockaddr_in6_init(), sockaddr_iso_init(),
  etc.  They are fairly self-explanatory.

3 structs route_in6 and route_iso are no more.  All protocol families
  use struct route.  I have changed the route cache, 'struct route',
  so that it does not contain storage space for a sockaddr.  Instead,
  struct route points to a sockaddr coming from the pool the sockaddr
  belongs to.  I added a new method to struct route, rtcache_setdst(),
  for setting the cache destination:

        int rtcache_setdst(struct route *, const struct sockaddr *);

  rtcache_setdst() returns 0 on success, or ENOMEM if no memory is
  available to create the sockaddr storage.

  It is now possible for rtcache_getdst() to return NULL if, say,
  rtcache_setdst() failed.  I check the return value for NULL
  everywhere in the kernel.

4 Each routing domain (struct domain) has a list of live route
  caches, dom_rtcache.  rtflushall(sa_family_t af) looks up the
  domain indicated by 'af', walks the domain's list of route caches
  and invalidates each one.

Revision 1.36 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:26 2007 UTC (17 years ago) by christos
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.35: +8 -8 lines
Diff to previous 1.35 (colored) to selected 1.59 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.35 / (download) - annotate - [select for diffs], Sat Feb 17 22:34:13 2007 UTC (17 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.34: +45 -55 lines
Diff to previous 1.34 (colored) to selected 1.59 (colored)

KNF: de-__P, bzero -> memset, bcmp -> memcmp.  Remove extraneous
   parentheses in return statements.

Cosmetic: don't open-code TAILQ_FOREACH().

Cosmetic: change types of variables to avoid oodles of casts: in
   in6_src.c, avoid casts by changing several route_in6 pointers
   to struct route pointers.  Remove unnecessary casts to caddr_t
   elsewhere.

Pave the way for eliminating address family-specific route caches:
   soon, struct route will not embed a sockaddr, but it will hold
   a reference to an external sockaddr, instead.  We will set the
   destination sockaddr using rtcache_setdst().  (I created a stub
   for it, but it isn't used anywhere, yet.)  rtcache_free() will
   free the sockaddr.  I have extracted from rtcache_free() a helper
   subroutine, rtcache_clear().  rtcache_clear() will "forget" a
   cached route, but it will not forget the destination by releasing
   the sockaddr.  I use rtcache_clear() instead of rtcache_free()
   in rtcache_update(), because rtcache_update() is not supposed
   to forget the destination.

Constify:

   1 Introduce const accessor for route->ro_dst, rtcache_getdst().

   2 Constify the 'dst' argument to ifnet->if_output().  This
     led me to constify a lot of code called by output routines.

   3 Constify the sockaddr argument to protosw->pr_ctlinput.  This
     led me to constify a lot of code called by ctlinput routines.

   4 Introduce const macros for converting from a generic sockaddr
     to family-specific sockaddrs, e.g., sockaddr_in: satocsin6,
     satocsin, et cetera.

Revision 1.34 / (download) - annotate - [select for diffs], Thu Jan 4 19:07:04 2007 UTC (17 years, 2 months ago) by elad
Branch: MAIN
CVS Tags: post-newlock2-merge, newlock2-nbase, newlock2-base
Branch point for: yamt-idlelwp
Changes since 1.33: +2 -2 lines
Diff to previous 1.33 (colored) to selected 1.59 (colored)

Consistent usage of KAUTH_GENERIC_ISSUSER.

Revision 1.33 / (download) - annotate - [select for diffs], Fri Dec 15 21:18:55 2006 UTC (17 years, 3 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4
Changes since 1.32: +23 -54 lines
Diff to previous 1.32 (colored) to selected 1.59 (colored)

Introduce new helper functions to abstract the route caching.
rtcache_init and rtcache_init_noclone lookup ro_dst and store
the result in ro_rt, taking care of the reference counting and
calling the domain specific route cache.
rtcache_free checks if a route was cashed and frees the reference.
rtcache_copy copies ro_dst of the given struct route, checking that
enough space is available and incrementing the reference count of the
cached rtentry if necessary.
rtcache_check validates that the cached route is still up. If it isn't,
it tries to look it up again. Afterwards ro_rt is either a valid again
or NULL.
rtcache_copy is used internally.

Adjust to callers of rtalloc/rtflush in the tree to check the sanity of
ro_dst first (if necessary). If it doesn't fit the expectations, free
the cache, otherwise check if the cached route is still valid. After
that combination, a single check for ro_rt == NULL is enough to decide
whether a new lookup needs to be done with a different ro_dst.
Make the route checking in gre stricter by repeating the loop check
after revalidation.
Remove some unused RADIX_MPATH code in in6_src.c. The logic is slightly
changed here to first validate the route and check RTF_GATEWAY
afterwards. This is sementically equivalent though.
etherip doesn't need sc_route_expire similiar to the gif changes from
dyoung@ earlier.

Based on the earlier patch from dyoung@, reviewed and discussed with
him.

Revision 1.32 / (download) - annotate - [select for diffs], Sat Dec 9 05:33:08 2006 UTC (17 years, 3 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-splraiseipl-base3
Changes since 1.31: +16 -22 lines
Diff to previous 1.31 (colored) to selected 1.59 (colored)

Here are various changes designed to protect against bad IPv4
routing caused by stale route caches (struct route).  Route caches
are sprinkled throughout PCBs, the IP fast-forwarding table, and
IP tunnel interfaces (gre, gif, stf).

Stale IPv6 and ISO route caches will be treated by separate patches.

Thank you to Christoph Badura for suggesting the general approach
to invalidating route caches that I take here.

Here are the details:

Add hooks to struct domain for tracking and for invalidating each
domain's route caches: dom_rtcache, dom_rtflush, and dom_rtflushall.

Introduce helper subroutines, rtflush(ro) for invalidating a route
cache, rtflushall(family) for invalidating all route caches in a
routing domain, and rtcache(ro) for notifying the domain of a new
cached route.

Chain together all IPv4 route caches where ro_rt != NULL.  Provide
in_rtcache() for adding a route to the chain.  Provide in_rtflush()
and in_rtflushall() for invalidating IPv4 route caches.  In
in_rtflush(), set ro_rt to NULL, and remove the route from the
chain.  In in_rtflushall(), walk the chain and remove every route
cache.

In rtrequest1(), call rtflushall() to invalidate route caches when
a route is added.

In gif(4), discard the workaround for stale caches that involves
expiring them every so often.

Replace the pattern 'RTFREE(ro->ro_rt); ro->ro_rt = NULL;' with a
call to rtflush(ro).

Update ipflow_fastforward() and all other users of route caches so
that they expect a cached route, ro->ro_rt, to turn to NULL.

Take care when moving a 'struct route' to rtflush() the source and
to rtcache() the destination.

In domain initializers, use .dom_xxx tags.

KNF here and there.

Revision 1.31 / (download) - annotate - [select for diffs], Sat Dec 2 18:59:17 2006 UTC (17 years, 3 months ago) by dyoung
Branch: MAIN
Changes since 1.30: +5 -5 lines
Diff to previous 1.30 (colored) to selected 1.59 (colored)

Use the queue(3) macros instead of open-coding them.  Shorten
staircases.  Remove unnecessary casts.  Where appropriate, s/8/NBBY/.
De-__P().  KNF.

No functional changes intended.

Revision 1.30 / (download) - annotate - [select for diffs], Thu Nov 16 01:33:45 2006 UTC (17 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: wrstuden-fixsa-base-1, 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, matt-nb4-arm-base, matt-nb4-arm
Branch point for: wrstuden-fixsa, netbsd-4
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored) to selected 1.59 (colored)

__unused removal on arguments; approved by core.

Revision 1.29 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:39 2006 UTC (17 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.28: +2 -6 lines
Diff to previous 1.28 (colored) to selected 1.59 (colored)

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

Revision 1.28 / (download) - annotate - [select for diffs], Fri Sep 1 01:59:56 2006 UTC (17 years, 7 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.27: +26 -14 lines
Diff to previous 1.27 (colored) to selected 1.59 (colored)

Restore historical kernel behavior: let an application bind(2) an
IPv6 interface address (e.g., sin6_addr fe80::200:24ff:fec3:4bac
sin6_scope_id 1), set a multicast interface with
setsockopt(,IPPROTO_IPV6,IPV6_MULTICAST_IF,), and sendto(2) multicast
destinations with "wildcard" scope ID, 0, without error EHOSTUNREACH.

Prior to this patch, sendto(2) would exit with EHOSTUNREACH, even
though the scope ID was unambiguously specified both by bind(2)
and setsockopt(2).  This was a bug because it broke old applications.

Thanks JINMEI Tatuya for the patch!

Revision 1.27 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:13 2006 UTC (17 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7, abandoned-netbsd-4-base
Branch point for: abandoned-netbsd-4
Changes since 1.26: +5 -5 lines
Diff to previous 1.26 (colored) to selected 1.59 (colored)

Use the LWP cached credentials where sane.

Revision 1.26 / (download) - annotate - [select for diffs], Sun May 14 21:19:34 2006 UTC (17 years, 10 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base, chap-midi
Changes since 1.25: +4 -2 lines
Diff to previous 1.25 (colored) to selected 1.59 (colored)

integrate kauth.

Revision 1.25 / (download) - annotate - [select for diffs], Fri May 5 00:03:22 2006 UTC (17 years, 10 months ago) by rpaulo
Branch: MAIN
CVS Tags: elad-kernelauth-base
Changes since 1.24: +1 -5 lines
Diff to previous 1.24 (colored) to selected 1.59 (colored)

Add support for RFC 3542 Adv. Socket API for IPv6 (which obsoletes 2292).
* RFC 3542 isn't binary compatible with RFC 2292.
* RFC 2292 support is on by default but can be disabled.
* update ping6, telnet and traceroute6 to the new API.

From the KAME project (www.kame.net).
Reviewed by core.

Revision 1.24 / (download) - annotate - [select for diffs], Sat Apr 15 00:30:48 2006 UTC (17 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored) to selected 1.59 (colored)

Coverity CID 607: Remove bogus test.

Revision 1.23 / (download) - annotate - [select for diffs], Sat Jan 21 00:15:36 2006 UTC (18 years, 2 months ago) by rpaulo
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, peter-altq, elad-kernelauth
Changes since 1.22: +947 -254 lines
Diff to previous 1.22 (colored) to selected 1.59 (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.22 / (download) - annotate - [select for diffs], Sun Dec 11 12:25:02 2005 UTC (18 years, 3 months ago) by christos
Branch: MAIN
Branch point for: yamt-uio_vmspace
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored) to selected 1.59 (colored)

merge ktrace-lwp.

Revision 1.21 / (download) - annotate - [select for diffs], Sun May 29 21:43:51 2005 UTC (18 years, 10 months ago) by christos
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, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Branch point for: yamt-lazymbuf
Changes since 1.20: +14 -14 lines
Diff to previous 1.20 (colored) to selected 1.59 (colored)

- avoid shadowed variables
- sprinkle const.

Revision 1.20 / (download) - annotate - [select for diffs], Tue Feb 1 14:56:17 2005 UTC (19 years, 1 month ago) by drochner
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, yamt-km-base2, 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, kent-audio2-base
Branch point for: netbsd-3
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored) to selected 1.59 (colored)

sin6_scope_id maps to interface indices for link local addresses only!
(unlikely to be used with other scopes for now, but we should be
correct anyway)

Revision 1.19 / (download) - annotate - [select for diffs], Sat Dec 4 16:10:25 2004 UTC (19 years, 3 months ago) by peter
Branch: MAIN
CVS Tags: yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.18: +4 -8 lines
Diff to previous 1.18 (colored) to selected 1.59 (colored)

Convert lo(4) to a clonable device.

This also removes the loif array and changes all code to use the new
lo0ifp pointer which points to the lo0 ifnet structure.

Approved by christos.

Revision 1.18 / (download) - annotate - [select for diffs], Wed Dec 10 11:46:33 2003 UTC (20 years, 3 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.17: +8 -5 lines
Diff to previous 1.17 (colored) to selected 1.59 (colored)

use if_indexlim (instead of if_index) and ifindex2ifnet[x] != NULL
to check if interface exists, as (1) if_index has different meaning
(2) ifindex2ifnet could become NULL when interface gets destroyed,
since when we have introduced dynamically-created interfaces.  from kame

Revision 1.17 / (download) - annotate - [select for diffs], Thu Sep 4 09:17:08 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.16: +41 -33 lines
Diff to previous 1.16 (colored) to selected 1.59 (colored)

revamp inpcb/in6pcb so that they are more aligned with each other.
in6pcb lookup now uses hash(9).

Revision 1.16 / (download) - annotate - [select for diffs], Thu Aug 7 16:33:26 2003 UTC (20 years, 7 months ago) by agc
Branch: MAIN
Changes since 1.15: +3 -7 lines
Diff to previous 1.15 (colored) to selected 1.59 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Sep 11 02:46:45 2002 UTC (21 years, 6 months ago) by itojun
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-base, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Branch point for: ktrace-lwp
Changes since 1.14: +22 -22 lines
Diff to previous 1.14 (colored) to selected 1.59 (colored)

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

Revision 1.14 / (download) - annotate - [select for diffs], Mon Aug 26 14:25:01 2002 UTC (21 years, 7 months ago) by itojun
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.13: +4 -5 lines
Diff to previous 1.13 (colored) to selected 1.59 (colored)

pass proc * to in6_pcbsetport.  PR 18073

Revision 1.13 / (download) - annotate - [select for diffs], Sat Jun 8 20:06:44 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.12: +4 -4 lines
Diff to previous 1.12 (colored) to selected 1.59 (colored)

whitespace cleanup

Revision 1.12 / (download) - annotate - [select for diffs], Wed May 29 07:53:41 2002 UTC (21 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored) to selected 1.59 (colored)

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

Revision 1.11 / (download) - annotate - [select for diffs], Wed May 29 01:43:25 2002 UTC (21 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.10: +2 -3 lines
Diff to previous 1.10 (colored) to selected 1.59 (colored)

rm obsolete comment

Revision 1.10 / (download) - annotate - [select for diffs], Tue Jan 22 03:53:56 2002 UTC (22 years, 2 months ago) by itojun
Branch: MAIN
CVS Tags: newlock-base, newlock, netbsd-1-6-base, netbsd-1-6-RC1, ifpoll-base, eeh-devprop-base, eeh-devprop
Branch point for: netbsd-1-6, gehenna-devsw
Changes since 1.9: +6 -3 lines
Diff to previous 1.9 (colored) to selected 1.59 (colored)

make sure to check address family on route cache.  with IPv4 mapped
address we can see both AF_INET/INET6.

Revision 1.9 / (download) - annotate - [select for diffs], Tue Nov 13 00:57:00 2001 UTC (22 years, 4 months ago) by lukem
Branch: MAIN
Changes since 1.8: +4 -1 lines
Diff to previous 1.8 (colored) to selected 1.59 (colored)

add RCSIDs

Revision 1.8 / (download) - annotate - [select for diffs], Tue Oct 16 06:24:44 2001 UTC (22 years, 5 months ago) by itojun
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, thorpej-mips-cache
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored) to selected 1.59 (colored)

more whitespace/comment sync with kame

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jun 6 06:07:06 2001 UTC (22 years, 9 months ago) by mrg
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, thorpej-devvp, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: kqueue
Changes since 1.6: +3 -2 lines
Diff to previous 1.6 (colored) to selected 1.59 (colored)

fix a IPNOPRIVPORTS unused variable botch.  noted by proff.

Revision 1.6 / (download) - annotate - [select for diffs], Fri Mar 30 11:08:57 2001 UTC (23 years ago) by itojun
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Changes since 1.5: +1 -8 lines
Diff to previous 1.5 (colored) to selected 1.59 (colored)

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.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Feb 8 14:56:16 2001 UTC (23 years, 1 month ago) by itojun
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.4: +23 -8 lines
Diff to previous 1.4 (colored) to selected 1.59 (colored)

amove in6_{embed,recover}scope prototypes to in6_var.h (kernel only).
add in6_clearscope.  sync with kame

Revision 1.4 / (download) - annotate - [select for diffs], Sat Aug 26 11:03:46 2000 UTC (23 years, 7 months ago) by itojun
Branch: MAIN
Branch point for: thorpej_scsipi
Changes since 1.3: +6 -6 lines
Diff to previous 1.3 (colored) to selected 1.59 (colored)

implement net.inet6.ip6.{anon,low}port{min,max} sysctl variable.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Aug 26 10:40:03 2000 UTC (23 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.2: +3 -1 lines
Diff to previous 1.2 (colored) to selected 1.59 (colored)

add missing IPNOPRIVPORTS case

Revision 1.2 / (download) - annotate - [select for diffs], Fri Jul 7 15:54:19 2000 UTC (23 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.1: +127 -2 lines
Diff to previous 1.1 (colored) to selected 1.59 (colored)

sync with kame.
introduce in6_{recover,embed}scope, for in-kernel scoped-address manipulation.
improve in6_pcbnotify.

Revision 1.1 / (download) - annotate - [select for diffs], Sat Jun 3 14:36:36 2000 UTC (23 years, 9 months ago) by itojun
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-ALPHA2
Branch point for: netbsd-1-5, minoura-xpg4dl
Diff to selected 1.59 (colored)

sync with kame.
- use latest source address selection code - in6_src.c.
- correct frag header insertion.
- deep copy ip6 header portion in ip6_mloopback to avoid overwrite.
- do not bark when we forward packet to loopback.
- some cosmetics.

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>