The NetBSD Project

CVS log for src/sys/netinet/ip_output.c

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.324.2.1 / (download) - annotate - [select for diffs], Tue Apr 25 16:15:14 2023 UTC (10 months ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Changes since 1.324: +2 -20 lines
Diff to previous 1.324 (colored) next main 1.325 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #150):

	sys/netinet/ip_output.c: revision 1.325

Revert "Fix panic on packet sending via a route with rt_ifa of AF_LINK."

The fix is mistakenly upstreamed.

Revision 1.326 / (download) - annotate - [select for diffs], Wed Apr 19 22:00:18 2023 UTC (10 months, 1 week ago) by mlelstv
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.325: +2 -7 lines
Diff to previous 1.325 (colored)

Again allow multicast packets to be sent from unnumbered interfaces.

Revision 1.325 / (download) - annotate - [select for diffs], Wed Apr 19 02:43:40 2023 UTC (10 months, 1 week ago) by ozaki-r
Branch: MAIN
Changes since 1.324: +0 -18 lines
Diff to previous 1.324 (colored)

Revert "Fix panic on packet sending via a route with rt_ifa of AF_LINK."

The fix is mistakenly upstreamed.

Revision 1.324 / (download) - annotate - [select for diffs], Mon Nov 21 09:51:13 2022 UTC (15 months ago) by knakahara
Branch: MAIN
CVS Tags: netbsd-10-base
Branch point for: netbsd-10
Changes since 1.323: +20 -2 lines
Diff to previous 1.323 (colored)

Fix panic on packet sending via a route with rt_ifa of AF_LINK.

A route with rt_ifa of AF_LINK can be set by some routing daemons when
it adds a route that has a gateway of AF_LINK.  If there is no address on
a target interface, the kernel sets an AF_LINK address of the interface to
rt_ifa of the route.  In that case, a variable of a local address in
ip_output (ia) can be NULL and we need more NULL-checks of it.

Revision 1.323 / (download) - annotate - [select for diffs], Fri Nov 4 09:00:58 2022 UTC (15 months, 3 weeks ago) by ozaki-r
Branch: MAIN
Changes since 1.322: +3 -3 lines
Diff to previous 1.322 (colored)

inpcb: rename functions to inpcb_*

Inspired by rmind-smpnet patches.

Revision 1.322 / (download) - annotate - [select for diffs], Fri Oct 28 05:25:36 2022 UTC (16 months ago) by ozaki-r
Branch: MAIN
Changes since 1.321: +12 -12 lines
Diff to previous 1.321 (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.321 / (download) - annotate - [select for diffs], Fri Oct 28 05:18:39 2022 UTC (16 months ago) by ozaki-r
Branch: MAIN
Changes since 1.320: +3 -4 lines
Diff to previous 1.320 (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.320 / (download) - annotate - [select for diffs], Tue Sep 8 14:12:57 2020 UTC (3 years, 5 months ago) by christos
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, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.319: +25 -9 lines
Diff to previous 1.319 (colored)

Add IP_BINDANY, IPV6_BINDANY which can be used to bind to any address in
order to implement transparent proxies.

Revision 1.319 / (download) - annotate - [select for diffs], Fri Aug 28 17:01:48 2020 UTC (3 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.318: +6 -5 lines
Diff to previous 1.318 (colored)

Don't cache the sa, because we are dealing with multiple mbufs (from ozaki-r)

Revision 1.318 / (download) - annotate - [select for diffs], Fri Aug 28 06:31:42 2020 UTC (3 years, 6 months ago) by ozaki-r
Branch: MAIN
Changes since 1.317: +14 -3 lines
Diff to previous 1.317 (colored)

inet: reduce silent packet discards

Revision 1.317 / (download) - annotate - [select for diffs], Fri Aug 28 06:22:25 2020 UTC (3 years, 6 months ago) by ozaki-r
Branch: MAIN
Changes since 1.316: +48 -49 lines
Diff to previous 1.316 (colored)

inet: reduce indents of a normal path to improve readability (NFCI)

Revision 1.316 / (download) - annotate - [select for diffs], Fri Aug 28 06:19:13 2020 UTC (3 years, 6 months ago) by ozaki-r
Branch: MAIN
Changes since 1.315: +6 -3 lines
Diff to previous 1.315 (colored)

inet, inet6: count packets dropped by IPsec

The counters count packets dropped due to security policy checks.

Revision 1.306.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:58 2020 UTC (3 years, 10 months ago) by martin
Branch: phil-wifi
Changes since 1.306.2.1: +3 -3 lines
Diff to previous 1.306.2.1 (colored) to branchpoint 1.306 (colored) next main 1.307 (colored)

Merge changes from current as of 20200406

Revision 1.315 / (download) - annotate - [select for diffs], Fri Dec 27 10:17:56 2019 UTC (4 years, 2 months ago) by msaitoh
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, ad-namecache-base1, ad-namecache-base, ad-namecache
Changes since 1.314: +3 -3 lines
Diff to previous 1.314 (colored)

s/referece/reference/ in comment.

Revision 1.306.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:47 2019 UTC (4 years, 8 months ago) by christos
Branch: phil-wifi
Changes since 1.306: +29 -58 lines
Diff to previous 1.306 (colored)

Sync with HEAD

Revision 1.314 / (download) - annotate - [select for diffs], Wed Jun 5 01:31:04 2019 UTC (4 years, 8 months ago) by knakahara
Branch: MAIN
CVS Tags: phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9
Changes since 1.313: +13 -10 lines
Diff to previous 1.313 (colored)

The packets which will be esp-fragmented should not be applied pfil. Pointed out by ohishi@IIJ, thanks.

Revision 1.313 / (download) - annotate - [select for diffs], Wed Jun 5 01:27:20 2019 UTC (4 years, 8 months ago) by knakahara
Branch: MAIN
Changes since 1.312: +3 -3 lines
Diff to previous 1.312 (colored)

Fix rtcache cannot be released once an esp-fragmented packet is sent. Pointed out by ohishi@IIJ, thanks.

Revision 1.312 / (download) - annotate - [select for diffs], Wed May 15 02:59:18 2019 UTC (4 years, 9 months ago) by ozaki-r
Branch: MAIN
Changes since 1.311: +2 -10 lines
Diff to previous 1.311 (colored)

Get rid of IFNET_LOCK for if_mcast_op to avoid a deadlock

The IFNET_LOCK was added to avoid data races on if_flags for IFF_ALLMULTI.
Unfortunatetly it caused a deadlock instead.  A known scenario causing a
deadlock is to occur the following two operations concurrently: (a) a removal of
an IP adddres assigned to an interface and (b) a manipulation of multicast
groups to the interface.  The resource dependency graph is like this:
  softnet_lock => IFNET_LOCK => psref_target_destroy => softint => softnet_lock

Thanks to the previous commit that avoids data races on if_flags for
IFF_ALLMULTI by another approach, we can remove IFNET_LOCK and defuse the
deadlock.

PR kern/54189

Revision 1.311 / (download) - annotate - [select for diffs], Mon May 13 07:47:59 2019 UTC (4 years, 9 months ago) by ozaki-r
Branch: MAIN
Changes since 1.310: +5 -5 lines
Diff to previous 1.310 (colored)

Count packets dropped by pfil

Revision 1.310 / (download) - annotate - [select for diffs], Mon Feb 4 10:48:46 2019 UTC (5 years ago) by mrg
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.309: +5 -5 lines
Diff to previous 1.309 (colored)

rework the #ifdef IPSEC code to not use fallthru.
same number of lines with more local context.

Revision 1.298.2.7 / (download) - annotate - [select for diffs], Wed Dec 26 14:02:05 2018 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.298.2.6: +10 -9 lines
Diff to previous 1.298.2.6 (colored) to branchpoint 1.298 (colored) next main 1.299 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.309 / (download) - annotate - [select for diffs], Sat Dec 22 13:11:38 2018 UTC (5 years, 2 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Changes since 1.308: +3 -3 lines
Diff to previous 1.308 (colored)

Replace: M_MOVE_PKTHDR -> m_move_pkthdr. No functional change, since the
former is a macro to the latter.

Revision 1.308 / (download) - annotate - [select for diffs], Wed Dec 12 01:53:52 2018 UTC (5 years, 2 months ago) by rin
Branch: MAIN
Changes since 1.307: +9 -8 lines
Diff to previous 1.307 (colored)

Simplify logic in ip{,6}_output().

Now, we have M_CSUM_TSOv[46] bit in ifp->if_csum_flags_tx when
TSO[46] is enabled for the interface. So we can simply check
whether TSO[46] is required in a packet but missing in the
interface by (sw_csum & M_CSUM_TSOv[46]).

Note that this is a very rare case where TSO[46] is suddenly
turned off during a packet passing b/w TCP and IP.

part of PR kern/53562
OK msaitoh

Revision 1.298.2.6 / (download) - annotate - [select for diffs], Sat Jul 28 04:38:10 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.298.2.5: +5 -30 lines
Diff to previous 1.298.2.5 (colored) to branchpoint 1.298 (colored)

Sync with HEAD

Revision 1.307 / (download) - annotate - [select for diffs], Wed Jul 11 05:25:45 2018 UTC (5 years, 7 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728
Changes since 1.306: +5 -30 lines
Diff to previous 1.306 (colored)

Rename

	ip_undefer_csum  -> in_undefer_cksum
	in_delayed_cksum -> in_undefer_cksum_tcpudp

The two previous names were inconsistent and misleading.

Put the two functions into in_offload.c. Add comments to explain what
we're doing.

The same could be done for IPv6.

Revision 1.298.2.5 / (download) - annotate - [select for diffs], Mon Jun 25 07:26:07 2018 UTC (5 years, 8 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.298.2.4: +9 -12 lines
Diff to previous 1.298.2.4 (colored) to branchpoint 1.298 (colored)

Sync with HEAD

Revision 1.306 / (download) - annotate - [select for diffs], Sat Jun 2 11:56:57 2018 UTC (5 years, 8 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0625
Branch point for: phil-wifi
Changes since 1.305: +4 -4 lines
Diff to previous 1.305 (colored)

Copy more mbuf flags.

Revision 1.305 / (download) - annotate - [select for diffs], Tue May 29 17:21:57 2018 UTC (5 years, 9 months ago) by maxv
Branch: MAIN
Changes since 1.304: +7 -10 lines
Diff to previous 1.304 (colored)

Fix an XXX of mine, be clearer about what we're doing. Basically we want to
preserve the fragment offset and flags. That's necessary if the packet
we're fragmenting is itself a fragment.

Revision 1.298.2.4 / (download) - annotate - [select for diffs], Wed May 2 07:20:23 2018 UTC (5 years, 9 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.298.2.3: +3 -3 lines
Diff to previous 1.298.2.3 (colored) to branchpoint 1.298 (colored)

Synch with HEAD

Revision 1.304 / (download) - annotate - [select for diffs], Sun Apr 29 11:51:08 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0521, pgoyette-compat-0502
Changes since 1.303: +3 -3 lines
Diff to previous 1.303 (colored)

Remove unused and misleading argument from ipsec_set_policy.

Revision 1.298.2.3 / (download) - annotate - [select for diffs], Sun Apr 22 07:20:28 2018 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.298.2.2: +6 -5 lines
Diff to previous 1.298.2.2 (colored) to branchpoint 1.298 (colored)

Sync with HEAD

Revision 1.303 / (download) - annotate - [select for diffs], Sat Apr 21 13:22:06 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0422
Changes since 1.302: +6 -5 lines
Diff to previous 1.302 (colored)

Remove #ifndef __vax__.

The check enforces a 4-byte-aligned size for the option mbuf. If the size
is not multiple of 4, the computation of ip_hl gets truncated in the
output path. There is no reason for this check not to be present on VAX.

While here add a KASSERT in ip_insertoptions to enforce the assumption.

Discussed briefly on tech-net@

Revision 1.298.2.2 / (download) - annotate - [select for diffs], Mon Apr 16 02:00:08 2018 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.298.2.1: +12 -14 lines
Diff to previous 1.298.2.1 (colored) to branchpoint 1.298 (colored)

Sync with HEAD, resolve some conflicts

Revision 1.302 / (download) - annotate - [select for diffs], Fri Apr 13 09:00:29 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0415
Changes since 1.301: +6 -8 lines
Diff to previous 1.301 (colored)

Remove useless comment and style.

Revision 1.301 / (download) - annotate - [select for diffs], Fri Apr 13 08:47:46 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
Changes since 1.300: +4 -4 lines
Diff to previous 1.300 (colored)

Reduce the diff between similar blocks.

Revision 1.300 / (download) - annotate - [select for diffs], Fri Apr 13 08:12:51 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
Changes since 1.299: +6 -6 lines
Diff to previous 1.299 (colored)

Reorder a few instructions to clarify. Replace two bcopy by memcpy.

Revision 1.298.2.1 / (download) - annotate - [select for diffs], Sat Apr 7 04:12:19 2018 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.298: +3 -3 lines
Diff to previous 1.298 (colored)

Sync with HEAD.  77 conflicts resolved - all of them $NetBSD$

Revision 1.299 / (download) - annotate - [select for diffs], Fri Mar 30 22:54:37 2018 UTC (5 years, 10 months ago) by maya
Branch: MAIN
CVS Tags: pgoyette-compat-0407
Changes since 1.298: +3 -3 lines
Diff to previous 1.298 (colored)

correct typo: and and -> and (comments only)

heads up on this being a common typo from chris28.

Revision 1.279.2.7 / (download) - annotate - [select for diffs], Sun Mar 18 10:57:01 2018 UTC (5 years, 11 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Changes since 1.279.2.6: +89 -19 lines
Diff to previous 1.279.2.6 (colored) to branchpoint 1.279 (colored) next main 1.280 (colored)

Pull up following revision(s) (requested by tih in ticket #639):
	sys/kern/uipc_socket.c: revision 1.258
	sys/kern/uipc_socket.c: revision 1.259
	sys/netinet/ip_input.c: revision 1.364 (via patch)
	sys/netinet/ip_output.c: revision 1.289
	sys/netinet/in.h: revision 1.102
	sys/netinet/in_pcb.c: revision 1.181
	share/man/man9/sockopt.9: revision 1.11
	sys/netinet/in_pcb.h: revision 1.65
	sys/sys/socketvar.h: revision 1.146
	sys/kern/uipc_syscalls.c: revision 1.189
	sys/netinet/ip_output.c: revision 1.290
	share/man/man4/ip.4: revision 1.41
	share/man/man4/ip.4: revision 1.42
	sys/kern/uipc_syscalls.c: revision 1.190

pass valsize for getsockopt like we do for setsockopt
make sure that we have enough space, don't require the exact size
(Tom Ivar Helbekkmo)

1) "#define ipi_spec_dst ipi_addr" in <netinet/in.h>
2) Change the IP_RECVPKTINFO option to control the generation of
   IP_PKTINFO control messages, the way it's done in Solaris.
3) Remove the superfluous IP_RECVPKTINFO control message.
4) Change the IP_PKTINFO option to do different things depending on
   the parameter it's supplied with:
   - If it's sizeof(int), assume it's being used as in Linux:
     - If it's non-zero, turn on the IP_RECVPKTINFO option.
     - If it's zero, turn off the IP_RECVPKTINFO option.
   - If it's sizeof(struct in_pktinfo), assume it's being used as in
     Solaris, to set a default for the source interface and/or
     source address for outgoing packets on the socket.
5) Return what Linux or Solaris compatible code expects, depending
   on data size, and just added a fallback to a Linux (and current NetBSD)
   compatible value if the size is unknown (as it is now), or,
   in the future, if the calling application specifies a receiving
   buffer that doesn't match either data item.

From: Tom Ivar Helbekkmo

new sentence-new line

Remove comment now that the getsockopt code passes the size.

Add a new sockopt member to keep track of the actual size of the option
that should be returned to the caller in getsockopt(2).
(Tom Ivar Helbekkmo)

Revision 1.298 / (download) - annotate - [select for diffs], Sat Mar 3 09:39:29 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-base, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.297: +3 -3 lines
Diff to previous 1.297 (colored)

Add KASSERTs, we don't want m_nextpkt in ipsec{4/6}_process_packet.

Revision 1.297 / (download) - annotate - [select for diffs], Tue Feb 27 15:01:30 2018 UTC (6 years ago) by maxv
Branch: MAIN
Changes since 1.296: +3 -3 lines
Diff to previous 1.296 (colored)

Dedup: merge ipsec4_set_policy and ipsec6_set_policy. The content of the
original ipsec_set_policy function is inlined into the new one.

Revision 1.296 / (download) - annotate - [select for diffs], Tue Feb 27 14:44:10 2018 UTC (6 years ago) by maxv
Branch: MAIN
Changes since 1.295: +3 -3 lines
Diff to previous 1.295 (colored)

Dedup: merge

	ipsec4_get_policy and ipsec6_get_policy
	ipsec4_delete_pcbpolicy and ipsec6_delete_pcbpolicy

The already-existing ipsec_get_policy() function is inlined in the new
one.

Revision 1.279.2.6 / (download) - annotate - [select for diffs], Mon Feb 19 18:39:43 2018 UTC (6 years ago) by snj
Branch: netbsd-8
Changes since 1.279.2.5: +5 -4 lines
Diff to previous 1.279.2.5 (colored) to branchpoint 1.279 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #557):
	sys/netinet/ip_output.c: 1.295
Keep a pointer to the interface of the multicast membership, because the
multicast element itself might go away in in_delmulti (but the interface
can't because we hold the lock). From ozaki-r@

Revision 1.295 / (download) - annotate - [select for diffs], Mon Feb 12 18:19:12 2018 UTC (6 years ago) by christos
Branch: MAIN
Changes since 1.294: +5 -4 lines
Diff to previous 1.294 (colored)

Keep a pointer to the interface of the multicast membership, because the
multicast element itself might go away in in_delmulti (but the interface
can't because we hold the lock). From ozaki-r@

Revision 1.294 / (download) - annotate - [select for diffs], Wed Feb 7 06:21:23 2018 UTC (6 years ago) by mrg
Branch: MAIN
Changes since 1.293: +2 -3 lines
Diff to previous 1.293 (colored)

ip_add_membership() has an missing {} issue, but solve it by
dropping the "goto out" that would have happened immediately
next anyway, ie, should be NFC.

Revision 1.293 / (download) - annotate - [select for diffs], Tue Feb 6 17:08:18 2018 UTC (6 years ago) by maxv
Branch: MAIN
Changes since 1.292: +61 -39 lines
Diff to previous 1.292 (colored)

Several changes, mostly cosmetic:

 * Add a KASSERT in ip_output(), we expect (at least) the IP header to be
   here.

 * In ip_fragment(), declare two variables instead of recomputing the
   values each time. Add an XXX for ipoff, it seems to me we should also
   remove IP_RF.

 * Rename the arguments of ip_optcopy().

 * Style: use NULL for pointers, remove ()s for return statements, and
   add whitespaces for clarity.

No real functional change.

Revision 1.279.2.5 / (download) - annotate - [select for diffs], Sat Jan 13 21:52:06 2018 UTC (6 years, 1 month ago) by snj
Branch: netbsd-8
Changes since 1.279.2.4: +6 -5 lines
Diff to previous 1.279.2.4 (colored) to branchpoint 1.279 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #494):
	sys/netinet/ip_output.c: revision 1.291-1.292
- this is not python, we need braces
- protect ifp locking against NULL
--
from ozaki-r: use the proper ifp.
XXX: perhaps push the lock in in_delmulti()?

Revision 1.292 / (download) - annotate - [select for diffs], Wed Jan 10 18:51:31 2018 UTC (6 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.291: +4 -6 lines
Diff to previous 1.291 (colored)

from ozaki-r: use the proper ifp.
XXX: perhaps push the lock in in_delmulti()?

Revision 1.291 / (download) - annotate - [select for diffs], Wed Jan 10 17:36:06 2018 UTC (6 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.290: +8 -5 lines
Diff to previous 1.290 (colored)

- this is not python, we need braces
- protect ifp locking against NULL

Revision 1.279.2.4 / (download) - annotate - [select for diffs], Tue Jan 2 10:56:58 2018 UTC (6 years, 1 month ago) by snj
Branch: netbsd-8
Changes since 1.279.2.3: +6 -4 lines
Diff to previous 1.279.2.3 (colored) to branchpoint 1.279 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #463):
	sys/netinet/in.c: revision 1.212
	sys/netinet/ip_output.c: revision 1.288
	sys/netinet6/in6.c: revision 1.256
	sys/netinet6/in6_pcb.c: revision 1.163
	sys/sys/lwp.h: revision 1.176
Add missing curlwp_bindx
--
Add missing curlwp_bindx
--
Check LP_BOUND is surely set in curlwp_bindx
This may find an extra call of curlwp_bindx.
--
Fix usage of curlwp_bind in ip_output
curlwp_bindx must be called in LIFO order, i.e., we can't call curlwp_bind
and curlwp_bindx like this:
  bound1 = curlwp_bind();
  bound2 = curlwp_bind();
  curlwp_bindx(bound1);
  curlwp_bindx(bound2);
ip_outout did so if NET_MPSAFE. Fix it.
--
Fix wrong usage of psref_held
We can't use it for checking if a caller does NOT hold a given target.
If you want to do it you should have psref_not_held or something.

Revision 1.279.2.3 / (download) - annotate - [select for diffs], Tue Jan 2 10:20:34 2018 UTC (6 years, 1 month ago) by snj
Branch: netbsd-8
Changes since 1.279.2.2: +21 -13 lines
Diff to previous 1.279.2.2 (colored) to branchpoint 1.279 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #456):
	sys/arch/arm/sunxi/sunxi_emac.c: 1.9
	sys/dev/ic/dwc_gmac.c: 1.43-1.44
	sys/dev/pci/if_iwm.c: 1.75
	sys/dev/pci/if_wm.c: 1.543
	sys/dev/pci/ixgbe/ixgbe.c: 1.112
	sys/dev/pci/ixgbe/ixv.c: 1.74
	sys/kern/sys_socket.c: 1.75
	sys/net/agr/if_agr.c: 1.43
	sys/net/bpf.c: 1.219
	sys/net/if.c: 1.397, 1.399, 1.401-1.403, 1.406-1.410, 1.412-1.416
	sys/net/if.h: 1.242-1.247, 1.250, 1.252-1.257
	sys/net/if_bridge.c: 1.140 via patch, 1.142-1.146
	sys/net/if_etherip.c: 1.40
	sys/net/if_ethersubr.c: 1.243, 1.246
	sys/net/if_faith.c: 1.57
	sys/net/if_gif.c: 1.132
	sys/net/if_l2tp.c: 1.15, 1.17
	sys/net/if_loop.c: 1.98-1.101
	sys/net/if_media.c: 1.35
	sys/net/if_pppoe.c: 1.131-1.132
	sys/net/if_spppsubr.c: 1.176-1.177
	sys/net/if_tun.c: 1.142
	sys/net/if_vlan.c: 1.107, 1.109, 1.114-1.121
	sys/net/npf/npf_ifaddr.c: 1.3
	sys/net/npf/npf_os.c: 1.8-1.9
	sys/net/rtsock.c: 1.230
	sys/netcan/if_canloop.c: 1.3-1.5
	sys/netinet/if_arp.c: 1.255
	sys/netinet/igmp.c: 1.65
	sys/netinet/in.c: 1.210-1.211
	sys/netinet/in_pcb.c: 1.180
	sys/netinet/ip_carp.c: 1.92, 1.94
	sys/netinet/ip_flow.c: 1.81
	sys/netinet/ip_input.c: 1.362
	sys/netinet/ip_mroute.c: 1.147
	sys/netinet/ip_output.c: 1.283, 1.285, 1.287
	sys/netinet6/frag6.c: 1.61
	sys/netinet6/in6.c: 1.251, 1.255
	sys/netinet6/in6_pcb.c: 1.162
	sys/netinet6/ip6_flow.c: 1.35
	sys/netinet6/ip6_input.c: 1.183
	sys/netinet6/ip6_output.c: 1.196
	sys/netinet6/mld6.c: 1.90
	sys/netinet6/nd6.c: 1.239-1.240
	sys/netinet6/nd6_nbr.c: 1.139
	sys/netinet6/nd6_rtr.c: 1.136
	sys/netipsec/ipsec_output.c: 1.65
	sys/rump/net/lib/libnetinet/netinet_component.c: 1.9-1.10
kmem_intr_free kmem_intr_[z]alloced memory
the underlying pools are the same but api-wise those should match
Unify IFEF_*_MPSAFE into IFEF_MPSAFE
There are already two flags for if_output and if_start, however, it seems such
MPSAFE flags are eventually needed for all if_XXX operations. Having discrete
flags for each operation is wasteful of if_extflags bits. So let's unify
the flags into one: IFEF_MPSAFE.
Fortunately IFEF_*_MPSAFE flags have never been included in any releases, so
we can change them without breaking backward compatibility of the releases
(though the kernel version of -current should be bumped).
Note that if an interface have both MP-safe and non-MP-safe operations at a
time, we have to set the IFEF_MPSAFE flag and let callees of non-MP-safe
opeartions take the kernel lock.
Proposed on tech-kern@ and tech-net@
Provide macros for softnet_lock and KERNEL_LOCK hiding NET_MPSAFE switch
It reduces C&P codes such as "#ifndef NET_MPSAFE KERNEL_LOCK(1, NULL); ..."
scattered all over the source code and makes it easy to identify remaining
KERNEL_LOCK and/or softnet_lock that are held even if NET_MPSAFE.
No functional change
Hold KERNEL_LOCK on if_ioctl selectively based on IFEF_MPSAFE
If IFEF_MPSAFE is set, hold the lock and otherwise don't hold.
This change requires additions of KERNEL_LOCK to subsequence functions from
if_ioctl such as ifmedia_ioctl and ifioctl_common to protect non-MP-safe
components.
Proposed on tech-kern@ and tech-net@
Ensure to hold if_ioctl_lock when calling if_flags_set
Fix locking against myself on ifpromisc
vlan_unconfig_locked could be called with holding if_ioctl_lock.
Ensure to not turn on IFF_RUNNING of an interface until its initialization completes
And ensure to turn off it before destruction as per IFF_RUNNING's description
"resource allocated". (The description is a bit doubtful though, I believe the
change is still proper.)
Ensure to hold if_ioctl_lock on if_up and if_down
One exception for if_down is if_detach; in the case the lock isn't needed
because it's guaranteed that no other one can access ifp at that point.
Make if_link_queue MP-safe if IFEF_MPSAFE
if_link_queue is a queue to store events of link state changes, which is
used to pass events from (typically) an interrupt handler to
if_link_state_change softint. The queue was protected by KERNEL_LOCK so far,
but if IFEF_MPSAFE is enabled, it becomes unsafe because (perhaps) an interrupt
handler of an interface with IFEF_MPSAFE doesn't take KERNEL_LOCK. Protect it
by a spin mutex.
Additionally with this change KERNEL_LOCK of if_link_state_change softint is
omitted if NET_MPSAFE is enabled.
Note that the spin mutex is now ifp->if_snd.ifq_lock as well as the case of
if_timer (see the comment).
Use IFADDR_WRITER_FOREACH instead of IFADDR_READER_FOREACH
At that point no other one modifies the list so IFADDR_READER_FOREACH
is unnecessary. Use of IFADDR_READER_FOREACH is harmless in general though,
if we try to detect contract violations of pserialize, using it violates
the contract. So avoid using it makes life easy.
Ensure to call if_addr_init with holding if_ioctl_lock
Get rid of outdated comments
Fix build of kernels without ether
By throwing out if_enable_vlan_mtu and if_disable_vlan_mtu that
created a unnecessary dependency from if.c to if_ethersubr.c.
PR kern/52790
Rename IFNET_LOCK to IFNET_GLOBAL_LOCK
IFNET_LOCK will be used in another lock, if_ioctl_lock (might be renamed then).
Wrap if_ioctl_lock with IFNET_* macros (NFC)
Also if_ioctl_lock perhaps needs to be renamed to something because it's now
not just for ioctl...
Reorder some destruction routines in if_detach
- Destroy if_ioctl_lock at the end of the if_detach because it's used in various
  destruction routines
- Move psref_target_destroy after pr_purgeif because we want to use psref in
  pr_purgeif (otherwise destruction procedures can be tricky)
Ensure to call if_mcast_op with holding IFNET_LOCK
Note that CARP doesn't deal with IFNET_LOCK yet.
Remove IFNET_GLOBAL_LOCK where it's unnecessary because IFNET_LOCK is held
Describe which lock is used to protect each member variable of struct ifnet
Requested by skrll@
Write a guideline for converting an interface to IFEF_MPSAFE
Requested by skrll@
Note that IFNET_LOCK must not be held in softint
Don't set IFEF_MPSAFE unless NET_MPSAFE at this point
Because recent investigations show that interfaces with IFEF_MPSAFE need to
follow additional restrictions to work with the flag safely. We should enable it
on an interface by default only if the interface surely satisfies the
restrictions, which are described in if.h.
Note that enabling IFEF_MPSAFE solely gains a few benefit on performance because
the network stack is still serialized by the big kernel locks by default.

Revision 1.290 / (download) - annotate - [select for diffs], Mon Jan 1 16:14:30 2018 UTC (6 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.289: +2 -4 lines
Diff to previous 1.289 (colored)

Remove comment now that the getsockopt code passes the size.

Revision 1.289 / (download) - annotate - [select for diffs], Mon Jan 1 00:51:36 2018 UTC (6 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.288: +91 -19 lines
Diff to previous 1.288 (colored)

1) "#define ipi_spec_dst ipi_addr" in <netinet/in.h>
2) Change the IP_RECVPKTINFO option to control the generation of
   IP_PKTINFO control messages, the way it's done in Solaris.
3) Remove the superfluous IP_RECVPKTINFO control message.
4) Change the IP_PKTINFO option to do different things depending on
   the parameter it's supplied with:
   - If it's sizeof(int), assume it's being used as in Linux:
     - If it's non-zero, turn on the IP_RECVPKTINFO option.
     - If it's zero, turn off the IP_RECVPKTINFO option.
   - If it's sizeof(struct in_pktinfo), assume it's being used as in
     Solaris, to set a default for the source interface and/or
     source address for outgoing packets on the socket.
5) Return what Linux or Solaris compatible code expects, depending
   on data size, and just added a fallback to a Linux (and current NetBSD)
   compatible value if the size is unknown (as it is now), or,
   in the future, if the calling application specifies a receiving
   buffer that doesn't match either data item.

From: Tom Ivar Helbekkmo

Revision 1.288 / (download) - annotate - [select for diffs], Fri Dec 22 11:22:37 2017 UTC (6 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.287: +6 -4 lines
Diff to previous 1.287 (colored)

Fix usage of curlwp_bind in ip_output

curlwp_bindx must be called in LIFO order, i.e., we can't call curlwp_bind
and curlwp_bindx like this:
  bound1 = curlwp_bind();
  bound2 = curlwp_bind();
  curlwp_bindx(bound1);
  curlwp_bindx(bound2);

ip_outout did so if NET_MPSAFE. Fix it.

Revision 1.279.2.2 / (download) - annotate - [select for diffs], Thu Dec 21 21:08:13 2017 UTC (6 years, 2 months ago) by snj
Branch: netbsd-8
Changes since 1.279.2.1: +145 -5 lines
Diff to previous 1.279.2.1 (colored) to branchpoint 1.279 (colored)

Pull up following revision(s) (requested by ryo in ticket #445):
	distrib/sets/lists/debug/mi: revision 1.222
	distrib/sets/lists/tests/mi: revision 1.760
	share/man/man4/ip.4: revision 1.38
	sys/netinet/in.c: revision 1.207
	sys/netinet/in.h: revision 1.101
	sys/netinet/in_pcb.c: revision 1.179
	sys/netinet/in_pcb.h: revision 1.64
	sys/netinet/ip_output.c: revision 1.284, 1.286
	sys/netinet/ip_var.h: revision 1.120-1.121
	sys/netinet/raw_ip.c: revision 1.166-1.167
	sys/netinet/udp_usrreq.c: revision 1.235-1.236
	sys/netinet/udp_var.h: revision 1.42
	tests/net/net/Makefile: revision 1.21
	tests/net/net/t_pktinfo_send.c: revision 1.1-1.2
Add support IP_PKTINFO for sendmsg(2).
The source address or output interface can be specified by adding IP_PKTINFO
to the control part of the message on a SOCK_DGRAM or SOCK_RAW socket.
Reviewed by ozaki-r@ and christos@. thanks.
--
As is the case with IPV6_PKTINFO, IP_PKTINFO can be sent without EADDRINUSE
even if the UDP address:port in use is specified.

Revision 1.287 / (download) - annotate - [select for diffs], Fri Dec 15 04:03:46 2017 UTC (6 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.286: +17 -5 lines
Diff to previous 1.286 (colored)

Ensure to call if_mcast_op with holding IFNET_LOCK

Note that CARP doesn't deal with IFNET_LOCK yet.

Revision 1.286 / (download) - annotate - [select for diffs], Mon Dec 11 05:47:18 2017 UTC (6 years, 2 months ago) by ryo
Branch: MAIN
Changes since 1.285: +3 -14 lines
Diff to previous 1.285 (colored)

As is the case with IPV6_PKTINFO, IP_PKTINFO can be sent without EADDRINUSE
even if the UDP address:port in use is specified.

Revision 1.217.2.4 / (download) - annotate - [select for diffs], Sun Dec 3 11:39:04 2017 UTC (6 years, 2 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.217.2.3: +639 -228 lines
Diff to previous 1.217.2.3 (colored) to branchpoint 1.217 (colored) next main 1.218 (colored)

update from HEAD

Revision 1.285 / (download) - annotate - [select for diffs], Fri Nov 17 07:37:12 2017 UTC (6 years, 3 months ago) by ozaki-r
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.284: +4 -8 lines
Diff to previous 1.284 (colored)

Provide macros for softnet_lock and KERNEL_LOCK hiding NET_MPSAFE switch

It reduces C&P codes such as "#ifndef NET_MPSAFE KERNEL_LOCK(1, NULL); ..."
scattered all over the source code and makes it easy to identify remaining
KERNEL_LOCK and/or softnet_lock that are held even if NET_MPSAFE.

No functional change

Revision 1.233.2.10 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:12 2017 UTC (6 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.233.2.9: +279 -74 lines
Diff to previous 1.233.2.9 (colored) to branchpoint 1.233 (colored) next main 1.234 (colored)

Sync with HEAD

Revision 1.284 / (download) - annotate - [select for diffs], Thu Aug 10 04:31:58 2017 UTC (6 years, 6 months ago) by ryo
Branch: MAIN
CVS Tags: nick-nhusb-base-20170825
Changes since 1.283: +156 -5 lines
Diff to previous 1.283 (colored)

Add support IP_PKTINFO for sendmsg(2).

The source address or output interface can be specified by adding IP_PKTINFO
to the control part of the message on a SOCK_DGRAM or SOCK_RAW socket.

Reviewed by ozaki-r@ and christos@. thanks.

Revision 1.283 / (download) - annotate - [select for diffs], Sun Jul 23 10:55:00 2017 UTC (6 years, 7 months ago) by para
Branch: MAIN
Changes since 1.282: +4 -4 lines
Diff to previous 1.282 (colored)

kmem_intr_free kmem_intr_[z]alloced memory

the underlying pools are the same but api-wise those should match

Revision 1.279.2.1 / (download) - annotate - [select for diffs], Fri Jul 7 09:23:01 2017 UTC (6 years, 7 months ago) by martin
Branch: netbsd-8
CVS Tags: matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.279: +17 -15 lines
Diff to previous 1.279 (colored)

Pull up following revision(s) (requested by roy in ticket #100):
	sys/netinet/ip_output.c: revision 1.280
	sys/netinet/ip_output.c: revision 1.282
When outputting, search for the sending address on the sending interface
rather than blindly picking the first matcing address from any interface
when testing source address validity.
This allows another interface to have the same address, but be detached.
Rename u to udst, .dst to .sa and .dst4 to sin.
Create sockaddr for the source address in usrc so it won't stamp on udst.
This fixes a regression caused in r1.280

Revision 1.282 / (download) - annotate - [select for diffs], Tue Jul 4 10:25:45 2017 UTC (6 years, 7 months ago) by roy
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646
Changes since 1.281: +14 -14 lines
Diff to previous 1.281 (colored)

Rename u to udst, .dst to .sa and .dst4 to sin.
Create sockaddr for the source address in usrc so it won't stamp on udst.

This fixes a regression caused in r1.280

Revision 1.281 / (download) - annotate - [select for diffs], Mon Jul 3 18:54:11 2017 UTC (6 years, 7 months ago) by khorben
Branch: MAIN
Changes since 1.280: +3 -3 lines
Diff to previous 1.280 (colored)

Typo

Revision 1.280 / (download) - annotate - [select for diffs], Mon Jul 3 16:43:01 2017 UTC (6 years, 7 months ago) by roy
Branch: MAIN
Changes since 1.279: +7 -5 lines
Diff to previous 1.279 (colored)

When outputting, search for the sending address on the sending interface
rather than blindly picking the first matcing address from any interface
when testing source address validity.

This allows another interface to have the same address, but be detached.

Revision 1.276.4.2 / (download) - annotate - [select for diffs], Fri May 19 00:22:58 2017 UTC (6 years, 9 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.276.4.1: +3 -3 lines
Diff to previous 1.276.4.1 (colored) to branchpoint 1.276 (colored) next main 1.277 (colored)

Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)

Revision 1.279 / (download) - annotate - [select for diffs], Fri May 12 17:53:54 2017 UTC (6 years, 9 months ago) by ryo
Branch: MAIN
CVS Tags: prg-localcount2-base3, netbsd-8-base
Branch point for: netbsd-8
Changes since 1.278: +3 -3 lines
Diff to previous 1.278 (colored)

replace in_fmtaddr() by IN_PRINT(), and delete function in_fmtaddr()

Revision 1.276.4.1 / (download) - annotate - [select for diffs], Thu May 11 02:58:41 2017 UTC (6 years, 9 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.276: +11 -17 lines
Diff to previous 1.276 (colored)

Sync with HEAD

Revision 1.278 / (download) - annotate - [select for diffs], Wed May 10 09:34:51 2017 UTC (6 years, 9 months ago) by ozaki-r
Branch: MAIN
CVS Tags: prg-localcount2-base2
Changes since 1.277: +3 -11 lines
Diff to previous 1.277 (colored)

Stop ipsec4_output returning SP to the caller

SP isn't used by the caller (ip_output) and also holding its
reference looks unnecessary.

Revision 1.277 / (download) - annotate - [select for diffs], Sun May 7 16:41:22 2017 UTC (6 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.276: +10 -8 lines
Diff to previous 1.276 (colored)

PR/52074: Frank Kardel: current npf map directive broken
Don't filter packets that can't be resolved to source interfaces because
they could have been generated by a packet filter.

Revision 1.267.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:54:06 2017 UTC (6 years, 10 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.267: +100 -42 lines
Diff to previous 1.267 (colored) next main 1.268 (colored)

Sync with HEAD

Revision 1.259.2.4 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:50 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.259.2.3: +101 -46 lines
Diff to previous 1.259.2.3 (colored) to branchpoint 1.259 (colored) next main 1.260 (colored)

Sync with HEAD

Revision 1.276 / (download) - annotate - [select for diffs], Sun Mar 5 11:07:46 2017 UTC (6 years, 11 months ago) by ozaki-r
Branch: MAIN
CVS Tags: prg-localcount2-base1, prg-localcount2-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: prg-localcount2
Changes since 1.275: +3 -3 lines
Diff to previous 1.275 (colored)

Fix the position of curlwp_bindx; it should be after if_put

Revision 1.275 / (download) - annotate - [select for diffs], Fri Mar 3 07:13:06 2017 UTC (6 years, 11 months ago) by ozaki-r
Branch: MAIN
Changes since 1.274: +6 -9 lines
Diff to previous 1.274 (colored)

Pass inpcb/in6pcb instead of socket to ip_output/ip6_output

- Passing a socket to Layer 3 is layer violation and even unnecessary
- The change makes codes of callers and IPsec a bit simple

Revision 1.274 / (download) - annotate - [select for diffs], Thu Mar 2 05:29:31 2017 UTC (6 years, 11 months ago) by ozaki-r
Branch: MAIN
Changes since 1.273: +9 -3 lines
Diff to previous 1.273 (colored)

Make sure imo_membership is protected by inp's lock (solock)

Revision 1.273 / (download) - annotate - [select for diffs], Thu Mar 2 05:24:23 2017 UTC (6 years, 11 months ago) by ozaki-r
Branch: MAIN
Changes since 1.272: +78 -28 lines
Diff to previous 1.272 (colored)

Make usages of ifp MP-safe in some functions of IP multicast

Revision 1.272 / (download) - annotate - [select for diffs], Wed Feb 22 07:05:04 2017 UTC (7 years ago) by ozaki-r
Branch: MAIN
Changes since 1.271: +8 -2 lines
Diff to previous 1.271 (colored)

Add assertions and comments for lock states of socket and pcb

Revision 1.271 / (download) - annotate - [select for diffs], Fri Feb 17 04:31:34 2017 UTC (7 years ago) by ozaki-r
Branch: MAIN
Changes since 1.270: +4 -4 lines
Diff to previous 1.270 (colored)

Make NOMPSAFE comments informative

Revision 1.270 / (download) - annotate - [select for diffs], Mon Feb 13 04:06:39 2017 UTC (7 years ago) by ozaki-r
Branch: MAIN
Changes since 1.269: +4 -5 lines
Diff to previous 1.269 (colored)

Use IFQ_LOCK instead of splnet for if_snd

Revision 1.233.2.9 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:59 2017 UTC (7 years ago) by skrll
Branch: nick-nhusb
Changes since 1.233.2.8: +13 -12 lines
Diff to previous 1.233.2.8 (colored) to branchpoint 1.233 (colored)

Sync with HEAD

Revision 1.269 / (download) - annotate - [select for diffs], Mon Jan 16 15:14:16 2017 UTC (7 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20170204
Changes since 1.268: +4 -5 lines
Diff to previous 1.268 (colored)

rename arplog -> ARPLOG to make it clear that it is a macro and tuck-in the
buffer used for address formatting.

Revision 1.268 / (download) - annotate - [select for diffs], Mon Jan 16 07:33:36 2017 UTC (7 years, 1 month ago) by ryo
Branch: MAIN
Changes since 1.267: +4 -3 lines
Diff to previous 1.267 (colored)

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

Reviewed by ozaki-r@

Revision 1.267 / (download) - annotate - [select for diffs], Wed Jan 11 13:08:29 2017 UTC (7 years, 1 month ago) by ozaki-r
Branch: MAIN
CVS Tags: bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.266: +2 -6 lines
Diff to previous 1.266 (colored)

Get rid of unnecessary header inclusions

Revision 1.266 / (download) - annotate - [select for diffs], Tue Jan 10 07:39:52 2017 UTC (7 years, 1 month ago) by knakahara
Branch: MAIN
Changes since 1.265: +3 -2 lines
Diff to previous 1.265 (colored)

avoid double rtcache_unref().

reviewed by ozaki-r@n.o.

Revision 1.259.2.3 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:51 2017 UTC (7 years, 1 month ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.259.2.2: +10 -6 lines
Diff to previous 1.259.2.2 (colored) to branchpoint 1.259 (colored)

Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.265 / (download) - annotate - [select for diffs], Mon Dec 12 03:55:57 2016 UTC (7 years, 2 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107
Changes since 1.264: +8 -6 lines
Diff to previous 1.264 (colored)

Make the routing table and rtcaches MP-safe

See the following descriptions for details.

Proposed on tech-kern and tech-net


Overview
--------

We protect the routing table with a rwock and protect
rtcaches with another rwlock. Each rtentry is protected
from being freed or updated via reference counting and psref.

Global rwlocks
--------------

There are two rwlocks; one for the routing table (rt_lock) and
the other for rtcaches (rtcache_lock). rtcache_lock covers
all existing rtcaches; there may have room for optimizations
(future work).

The locking order is rtcache_lock first and rt_lock is next.

rtentry references
------------------

References to an rtentry is managed with reference counting
and psref. Either of the two mechanisms is used depending on
where a rtentry is obtained. Reference counting is used when
we obtain a rtentry from the routing table directly via
rtalloc1 and rtrequest{,1} while psref is used when we obtain
a rtentry from a rtcache via rtcache_* APIs. In both cases,
a caller can sleep/block with holding an obtained rtentry.

The reasons why we use two different mechanisms are (i) only
using reference counting hurts the performance due to atomic
instructions (rtcache case) (ii) ease of implementation;
applying psref to APIs such rtaloc1 and rtrequest{,1} requires
additional works (adding a local variable and an argument).

We will finally migrate to use only psref but we can do it
when we have a lockless routing table alternative.

Reference counting for rtentry
------------------------------

rt_refcnt now doesn't count permanent references such as for
rt_timers and rtcaches, instead it is used only for temporal
references when obtaining a rtentry via rtalloc1 and rtrequest{,1}.
We can do so because destroying a rtentry always involves
removing references of rt_timers and rtcaches to the rtentry
and we don't need to track such references. This also makes
it easy to wait for readers to release references on deleting
or updating a rtentry, i.e., we can simply wait until the
reference counter is 0 or 1. (If there are permanent references
the counter can be arbitrary.)

rt_ref increments a reference counter of a rtentry and rt_unref
decrements it. rt_ref is called inside APIs (rtalloc1 and
rtrequest{,1} so users don't need to care about it while
users must call rt_unref to an obtained rtentry after using it.

rtfree is removed and we use rt_unref and rt_free instead.
rt_unref now just decrements the counter of a given rtentry
and rt_free just tries to destroy a given rtentry.

See the next section for destructions of rtentries by rt_free.

Destructions of rtentries
-------------------------

We destroy a rtentry only when we call rtrequst{,1}(RTM_DELETE);
the original implementation can destroy in any rtfree where it's
the last reference. If we use reference counting or psref, it's
easy to understand if the place that a rtentry is destroyed is
fixed.

rt_free waits for references to a given rtentry to be released
before actually destroying the rtentry. rt_free uses a condition
variable (cv_wait) (and psref_target_destroy for psref) to wait.

Unfortunately rtrequst{,1}(RTM_DELETE) can be called in softint
that we cannot use cv_wait. In that case, we have to defer the
destruction to a workqueue.

rtentry#rt_cv, rtentry#rt_psref and global variables
(see rt_free_global) are added to conduct the procedure.

Updates of rtentries
--------------------

One difficulty to use refcnt/psref instead of rwlock for rtentry
is updates of rtentries. We need an additional mechanism to
prevent readers from seeing inconsistency of a rtentry being
updated.

We introduce RTF_UPDATING flag to rtentries that are updating.
While the flag is set to a rtentry, users cannot acquire the
rtentry. By doing so, we avoid users to see inconsistent
rtentries.

There are two options when a user tries to acquire a rtentry
with the RTF_UPDATING flag; if a user runs in softint context
the user fails to acquire a rtentry (NULL is returned).
Otherwise a user waits until the update completes by waiting
on cv.

The procedure of a updater is simpler to destruction of
a rtentry. Wait on cv (and psref) and after all readers left,
proceed with the update.

Global variables (see rt_update_global) are added to conduct
the procedure.

Currently we apply the mechanism to only RTM_CHANGE in
rtsock.c. We would have to apply other codes. See
"Known issues" section.

psref for rtentry
-----------------

When we obtain a rtentry from a rtcache via rtcache_* APIs,
psref is used to reference to the rtentry.

rtcache_ref acquires a reference to a rtentry with psref
and rtcache_unref releases the reference after using it.
rtcache_ref is called inside rtcache_* APIs and users don't
need to take care of it while users must call rtcache_unref
to release the reference.

struct psref and int bound that is needed for psref is
embedded into struct route. By doing so we don't need to
add local variables and additional argument to APIs.

However this adds another constraint to psref other than
reference counting one's; holding a reference of an rtentry
via a rtcache is allowed by just one caller at the same time.
So we must not acquire a rtentry via a rtcache twice and
avoid a recursive use of a rtcache. And also a rtcache must
be arranged to be used by a LWP/softint at the same time
somehow. For IP forwarding case, we have per-CPU rtcaches
used in softint so the constraint is guaranteed. For a h
rtcache of a PCB case, the constraint is guaranteed by the
solock of each PCB. Any other cases (pf, ipf, stf and ipsec)
are currently guaranteed by only the existence of the global
locks (softnet_lock and/or KERNEL_LOCK). If we've found the
cases that we cannot guarantee the constraint, we would need
to introduce other rtcache APIs that use simple reference
counting.

psref of rtcache is created with IPL_SOFTNET and so rtcache
shouldn't used at an IPL higher than IPL_SOFTNET.

Note that rtcache_free is used to invalidate a given rtcache.
We don't need another care by my change; just keep them as
they are.

Performance impact
------------------

When NET_MPSAFE is disabled the performance drop is 3% while
when it's enabled the drop is increased to 11%. The difference
comes from that currently we don't take any global locks and
don't use psref if NET_MPSAFE is disabled.

We can optimize the performance of the case of NET_MPSAFE
on by reducing lookups of rtcache that uses psref;
currently we do two lookups but we should be able to trim
one of two. This is a future work.

Known issues
------------

There are two known issues to be solved; one is that
a caller of rtrequest(RTM_ADD) may change rtentry (see rtinit).
We need to prevent new references during the update. Or
we may be able to remove the code (perhaps, need more
investigations).

The other is rtredirect that updates a rtentry. We need
to apply our update mechanism, however it's not easy because
rtredirect is called in softint and we cannot apply our
mechanism simply. One solution is to defer rtredirect to
a workqueue but it requires some code restructuring.

Revision 1.264 / (download) - annotate - [select for diffs], Thu Dec 8 05:16:33 2016 UTC (7 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.263: +4 -2 lines
Diff to previous 1.263 (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.259.2.2 / (download) - annotate - [select for diffs], Fri Nov 4 14:49:21 2016 UTC (7 years, 3 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.259.2.1: +48 -4 lines
Diff to previous 1.259.2.1 (colored) to branchpoint 1.259 (colored)

Sync with HEAD

Revision 1.233.2.8 / (download) - annotate - [select for diffs], Wed Oct 5 20:56:09 2016 UTC (7 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.233.2.7: +89 -13 lines
Diff to previous 1.233.2.7 (colored) to branchpoint 1.233 (colored)

Sync with HEAD

Revision 1.263 / (download) - annotate - [select for diffs], Tue Sep 20 14:30:13 2016 UTC (7 years, 5 months ago) by roy
Branch: MAIN
CVS Tags: pgoyette-localcount-20161104, nick-nhusb-base-20161204, nick-nhusb-base-20161004
Changes since 1.262: +8 -7 lines
Diff to previous 1.262 (colored)

Drop UDP packets as well as TCP without error when sending from detached or
tentative addresses.

Revision 1.262 / (download) - annotate - [select for diffs], Sun Sep 18 02:17:43 2016 UTC (7 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.261: +4 -2 lines
Diff to previous 1.261 (colored)

Dealing with arplog is a bit more complicated...

Revision 1.261 / (download) - annotate - [select for diffs], Thu Sep 15 18:25:45 2016 UTC (7 years, 5 months ago) by roy
Branch: MAIN
Changes since 1.260: +45 -4 lines
Diff to previous 1.260 (colored)

Ensure that packets are sent from a valid address.
If the packet is TCP and the address is detached or tentative then
it's just dropped, otherwise an error is returned.

This is needed because you can bind to a valid address and it can then
become invalid.

This satisfies RFC 4862 section 5.5.4.

Revision 1.259.2.1 / (download) - annotate - [select for diffs], Sat Aug 6 00:19:10 2016 UTC (7 years, 6 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.259: +43 -11 lines
Diff to previous 1.259 (colored)

Sync with HEAD

Revision 1.260 / (download) - annotate - [select for diffs], Mon Aug 1 03:15:30 2016 UTC (7 years, 6 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20160806, localcount-20160914
Changes since 1.259: +43 -11 lines
Diff to previous 1.259 (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.233.2.7 / (download) - annotate - [select for diffs], Sat Jul 9 20:25:22 2016 UTC (7 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.233.2.6: +37 -24 lines
Diff to previous 1.233.2.6 (colored) to branchpoint 1.233 (colored)

Sync with HEAD

Revision 1.259 / (download) - annotate - [select for diffs], Fri Jul 8 04:33:30 2016 UTC (7 years, 7 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160726, nick-nhusb-base-20160907
Branch point for: pgoyette-localcount
Changes since 1.258: +6 -6 lines
Diff to previous 1.258 (colored)

Replace macros to get an IP address with proper inline functions

The inline functions are more friendly for applying psz/psref;
they consist of only simple interations.

Revision 1.258 / (download) - annotate - [select for diffs], Tue Jun 21 03:28:27 2016 UTC (7 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.257: +32 -12 lines
Diff to previous 1.257 (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.257 / (download) - annotate - [select for diffs], Mon Jun 20 06:46:38 2016 UTC (7 years, 8 months ago) by knakahara
Branch: MAIN
Changes since 1.256: +3 -10 lines
Diff to previous 1.256 (colored)

apply if_output_lock() to L3 callers which call ifp->if_output() of L2(or L3 tunneling).

Revision 1.256 / (download) - annotate - [select for diffs], Fri Jun 10 13:27:16 2016 UTC (7 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.255: +3 -3 lines
Diff to previous 1.255 (colored)

Introduce m_set_rcvif and m_reset_rcvif

The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.

Revision 1.233.2.6 / (download) - annotate - [select for diffs], Sun May 29 08:44:38 2016 UTC (7 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.233.2.5: +28 -109 lines
Diff to previous 1.233.2.5 (colored) to branchpoint 1.233 (colored)

Sync with HEAD

Revision 1.255 / (download) - annotate - [select for diffs], Mon May 9 07:02:10 2016 UTC (7 years, 9 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529
Changes since 1.254: +3 -3 lines
Diff to previous 1.254 (colored)

Fix compilation for ppc

Revision 1.254 / (download) - annotate - [select for diffs], Wed May 4 15:42:32 2016 UTC (7 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.253: +4 -4 lines
Diff to previous 1.253 (colored)

fix compilation for ppc.

Revision 1.253 / (download) - annotate - [select for diffs], Thu Apr 28 00:16:56 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.252: +5 -4 lines
Diff to previous 1.252 (colored)

Constify rtentry of if_output

We no longer need to change rtentry below if_output.

The change makes it clear where rtentries are changed (or not)
and helps forthcoming locking (os psrefing) rtentries.

Revision 1.252 / (download) - annotate - [select for diffs], Tue Apr 26 09:30:01 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.251: +23 -105 lines
Diff to previous 1.251 (colored)

Stop using rt_gwroute on packet sending paths

rt_gwroute of rtentry is a reference to a rtentry of the gateway
for a rtentry with RTF_GATEWAY. That was used by L2 (arp and ndp)
to look up L2 addresses. By separating L2 nexthop caches, we don't
need a route for the purpose and we can stop using rt_gwroute.
By doing so, we can reduce referencing and modifying rtentries,
which makes it easy to apply a lock (and/or psref) to the
routing table and rtentries.

One issue to do this is to keep RTF_REJECT behavior. It seems it
was broken when we moved rtalloc1 things from L2 output routines
(e.g., ether_output) to ip_hresolv_output, but (fortunately?)
it works unexpectedly. What we mistook are:
- RTF_REJECT was checked for any routes in L2 output routines,
  but in ip_hresolv_output it is checked only when the route
  is RTF_GATEWAY
- The RTF_REJECT check wasn't copied to IPv6 (nd6_output)

It seems that rt_gwroute checks hid the mistakes and it looked
work (unexpectedly) and removing rt_gwroute checks unveil the
issue. So we need to fix RTF_REJECT checks in ip_hresolv_output
and also add them to nd6_output.

One more point we have to care is returning an errno; we need
to mimic looutput behavior. Originally RTF_REJECT check was
done either in L2 output routines or in looutput. The latter is
applied when a reject route directs to a loopback interface.
However, now RTF_REJECT check is done before looutput so to keep
the original behavior we need to return an errno which looutput
chooses. Added rt_check_reject_route does such tweaks.

Revision 1.233.2.5 / (download) - annotate - [select for diffs], Fri Apr 22 15:44:17 2016 UTC (7 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.233.2.4: +42 -62 lines
Diff to previous 1.233.2.4 (colored) to branchpoint 1.233 (colored)

Sync with HEAD

Revision 1.251 / (download) - annotate - [select for diffs], Tue Apr 19 09:36:35 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422
Changes since 1.250: +3 -3 lines
Diff to previous 1.250 (colored)

Fix error path

Revision 1.250 / (download) - annotate - [select for diffs], Tue Apr 19 09:29:54 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.249: +36 -26 lines
Diff to previous 1.249 (colored)

Separate MPLS-related routines from ip_hresolv_output

No functional changes.

Revision 1.249 / (download) - annotate - [select for diffs], Mon Apr 18 01:28:06 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.248: +8 -38 lines
Diff to previous 1.248 (colored)

Get rid of meaningless RTF_UP check from ip_hresolv_output

The check is meaningless because
- An obtained rtentry is ensured that it's always RTF_UP by rtcache,
  rtalloc1 and rtlookup. If the rtentry isn't changed (i.e., RTF_UP gets
  dropped) during processing, the check should be unnecessary
- Even if not, i.e., an obtained rtentry can be changed during processing,
  checking only at the point doesn't help; the rtentry can be changed after
  the check

Instead we have to ensure that RTF_UP isn't dropped if someone is using it
somehow. Note that we already ensure that a rtentry being used isn't freed
by rt_refcnt.

Proposed on tech-kern and tech-net.

Revision 1.233.2.4 / (download) - annotate - [select for diffs], Sat Mar 19 11:30:33 2016 UTC (7 years, 11 months ago) by skrll
Branch: nick-nhusb
Changes since 1.233.2.3: +5 -16 lines
Diff to previous 1.233.2.3 (colored) to branchpoint 1.233 (colored)

Sync with HEAD

Revision 1.248 / (download) - annotate - [select for diffs], Wed Jan 20 22:12:22 2016 UTC (8 years, 1 month ago) by riastradh
Branch: MAIN
CVS Tags: nick-nhusb-base-20160319
Changes since 1.247: +5 -16 lines
Diff to previous 1.247 (colored)

Give proper prototype to ip_output.

Revision 1.233.2.3 / (download) - annotate - [select for diffs], Tue Sep 22 12:06:11 2015 UTC (8 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.233.2.2: +41 -13 lines
Diff to previous 1.233.2.2 (colored) to branchpoint 1.233 (colored)

Sync with HEAD

Revision 1.247 / (download) - annotate - [select for diffs], Wed Sep 2 11:35:11 2015 UTC (8 years, 5 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226, nick-nhusb-base-20150921
Changes since 1.246: +6 -3 lines
Diff to previous 1.246 (colored)

Do rt_refcnt++ when set a rtentry to another rtentry's rt_gwroute

And also do rtfree when deref a rtentry from rt_gwroute.

Revision 1.246 / (download) - annotate - [select for diffs], Mon Aug 24 22:21:26 2015 UTC (8 years, 6 months ago) by pooka
Branch: MAIN
Changes since 1.245: +4 -2 lines
Diff to previous 1.245 (colored)

sprinkle _KERNEL_OPT

Revision 1.245 / (download) - annotate - [select for diffs], Fri Aug 7 08:11:33 2015 UTC (8 years, 6 months ago) by ozaki-r
Branch: MAIN
Changes since 1.244: +3 -3 lines
Diff to previous 1.244 (colored)

Use time_uptime instead of time_second to avoid time leaps

Some codes in sys/net* use time_second to manage time periods such as
cache expirations. However, time_second doesn't increase monotonically
and can leap by say settimeofday(2) according to time_second(9). We
should use time_uptime instead of it to avoid such time leaps.

This change replaces time_second with time_uptime. Additionally it
converts a time based on time_uptime to a time based on time_second
when the kernel passes the time to userland programs that expect
the latter, and vice versa.

Note that we shouldn't leak time_uptime to other hosts over the
netowrk. My investigation shows there is no such leak:
http://mail-index.netbsd.org/tech-net/2015/08/06/msg005332.html

Discussed on tech-kern and tech-net.

Revision 1.244 / (download) - annotate - [select for diffs], Fri Jul 17 02:21:08 2015 UTC (8 years, 7 months ago) by ozaki-r
Branch: MAIN
Changes since 1.243: +23 -11 lines
Diff to previous 1.243 (colored)

Reform use of rt_refcnt

rt_refcnt of rtentry was used in bad manners, for example, direct rt_refcnt++
and rt_refcnt-- outside route.c, "rt->rt_refcnt++; rtfree(rt);" idiom, and
touching rt after rt->rt_refcnt--.

These abuses seem to be needed because rt_refcnt manages only references
between rtentry and doesn't take care of references during packet processing
(IOW references from local variables). In order to reduce the above abuses,
the latter cases should be counted by rt_refcnt as well as the former cases.

This change improves consistency of use of rt_refcnt:
- rtentry is always accessed with rt_refcnt incremented
- rtentry's rt_refcnt is decremented after use (rtfree is always used instead
  of rt_refcnt--)
- functions returning rtentry increment its rt_refcnt (and caller rtfree it)

Note that rt_refcnt prevents rtentry from being freed but doesn't prevent
rtentry from being updated. Toward MP-safe, we need to provide another
protection for rtentry, e.g., locks. (Or introduce a better data structure
allowing concurrent readers during updates.)

Revision 1.243 / (download) - annotate - [select for diffs], Tue Jul 14 08:44:59 2015 UTC (8 years, 7 months ago) by ozaki-r
Branch: MAIN
Changes since 1.242: +3 -2 lines
Diff to previous 1.242 (colored)

Move rt_gwroute operation out of stripoutput

We should do it in ip_hresolv_needed.

Revision 1.242 / (download) - annotate - [select for diffs], Wed Jul 1 03:39:36 2015 UTC (8 years, 7 months ago) by ozaki-r
Branch: MAIN
Changes since 1.241: +3 -2 lines
Diff to previous 1.241 (colored)

Use ip_hresolv_output for if_token as well

I thought we cannot apply ip_hresolv_output to if_token because
rt0 looked being needed by arpresolve in token_output. However,
rt0 is actually not used by arpresolve in NetBSD (see obsolete
ARPRESOLVE macro).

Revision 1.241 / (download) - annotate - [select for diffs], Mon Jun 8 08:19:20 2015 UTC (8 years, 8 months ago) by roy
Branch: MAIN
Changes since 1.240: +3 -3 lines
Diff to previous 1.240 (colored)

errno -> error, spotted by the hawk skrll

Revision 1.240 / (download) - annotate - [select for diffs], Mon Jun 8 08:02:43 2015 UTC (8 years, 8 months ago) by roy
Branch: MAIN
Changes since 1.239: +12 -3 lines
Diff to previous 1.239 (colored)

It's possible we could not have any ready addresses.

Revision 1.233.2.2 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:25 2015 UTC (8 years, 8 months ago) by skrll
Branch: nick-nhusb
Changes since 1.233.2.1: +180 -30 lines
Diff to previous 1.233.2.1 (colored) to branchpoint 1.233 (colored)

Sync with HEAD

Revision 1.239 / (download) - annotate - [select for diffs], Thu Jun 4 09:20:00 2015 UTC (8 years, 8 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606
Changes since 1.238: +162 -16 lines
Diff to previous 1.238 (colored)

Pull out route lookups from L2 output routines

Route lookups for routes of RTF_GATEWAY were done in L2 output
routines such as ether_output, but they should be done in L3
i.e., before L2 output routines. This change places the lookups
between L3 output routines (say ip_output) and the L2 output
routines.

The change is based on dyoung's patch submitted in the thread:
https://mail-index.netbsd.org/tech-net/2013/02/01/msg003847.html
You can find out detailed investigations by dyoung about the
issue in there.

Note that the change introduces a workaround for MPLS. ether_output
knew that it needs to fill the ethertype of a frame as MPLS,
based on a tag of an original route (rtentry), but now we don't
pass it to ehter_output. So we have to tell that in another way.
We use mtag to do so for now, which introduces some overhead.
We should fix it somehow in the future.

Discussed on tech-kern and tech-net.

Revision 1.238 / (download) - annotate - [select for diffs], Mon Apr 27 10:14:44 2015 UTC (8 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.237: +8 -4 lines
Diff to previous 1.237 (colored)

Add missing error checks on rtcache_setdst

It can fail with ENOMEM.

Revision 1.237 / (download) - annotate - [select for diffs], Fri Apr 24 00:48:47 2015 UTC (8 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.236: +13 -13 lines
Diff to previous 1.236 (colored)

KNF

Revision 1.233.2.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:23 2015 UTC (8 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.233: +25 -3 lines
Diff to previous 1.233 (colored)

Sync with HEAD

Revision 1.236 / (download) - annotate - [select for diffs], Fri Apr 3 07:55:18 2015 UTC (8 years, 10 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.235: +15 -2 lines
Diff to previous 1.235 (colored)

Don't grab KERNEL_LOCK during if_output when NET_MPSAFE

The change makes L3 MP-safe work easy. At this point
we deal with only IP forwarding.

No functional change when NET_MPSAFE isn't enabled.

Revision 1.235 / (download) - annotate - [select for diffs], Tue Mar 31 08:44:43 2015 UTC (8 years, 11 months ago) by ozaki-r
Branch: MAIN
Changes since 1.234: +4 -2 lines
Diff to previous 1.234 (colored)

Add missing ifdef IPSEC

Revision 1.234 / (download) - annotate - [select for diffs], Mon Mar 23 18:33:17 2015 UTC (8 years, 11 months ago) by roy
Branch: MAIN
Changes since 1.233: +10 -3 lines
Diff to previous 1.233 (colored)

Add RTF_BROADCAST to mark routes used for the broadcast address when
they are created on the fly. This makes it clear what the route is for
and allows an optimisation in ip_output() by avoiding a call to
in_broadcast() because most of the time we do talk to a host.
It also avoids a needless allocation for the storage of llinfo_arp and
thus vanishes from arp(8) - it showed as incomplete anyway so this
is a nice side effect.

Guard against this and routes marked with RTF_BLACKHOLE in
ip_fastforward().
While here, guard against routes marked with RTF_BLACKHOLE in
ip6_fastforward().
RTF_BROADCAST is IPv4 only, so don't bother checking that here.

Revision 1.230.2.1 / (download) - annotate - [select for diffs], Mon Dec 1 10:35:37 2014 UTC (9 years, 2 months ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Changes since 1.230: +4 -2 lines
Diff to previous 1.230 (colored) next main 1.231 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #277):
	sys/netinet/ip_output.c: revision 1.233
Call looutput with holding KERNEL_LOCK
This fixes diagnostic assertion "KERNEL_LOCKED_P()" in if_loop.c.
PR kern/49410

Revision 1.233 / (download) - annotate - [select for diffs], Wed Nov 26 10:18:37 2014 UTC (9 years, 3 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.232: +4 -2 lines
Diff to previous 1.232 (colored)

Call looutput with holding KERNEL_LOCK

This fixes diagnostic assertion "KERNEL_LOCKED_P()" in if_loop.c.

PR kern/49410

Revision 1.232 / (download) - annotate - [select for diffs], Sun Oct 12 19:00:21 2014 UTC (9 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.231: +163 -130 lines
Diff to previous 1.231 (colored)

Refactor the multicast membership code so that we can handle v4 mapped
addresses using the v6 membership ioctls.

Revision 1.231 / (download) - annotate - [select for diffs], Sat Oct 11 21:12:51 2014 UTC (9 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.230: +11 -14 lines
Diff to previous 1.230 (colored)

exposet multicast option functions which are used by the v6 code now.

Revision 1.217.2.3 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:35 2014 UTC (9 years, 6 months ago) by tls
Branch: tls-maxphys
Changes since 1.217.2.2: +187 -180 lines
Diff to previous 1.217.2.2 (colored) to branchpoint 1.217 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.224.4.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:56:25 2014 UTC (9 years, 6 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.224: +168 -176 lines
Diff to previous 1.224 (colored) next main 1.225 (colored)

Rebase.

Revision 1.230 / (download) - annotate - [select for diffs], Fri Jun 6 00:11:19 2014 UTC (9 years, 8 months ago) by rmind
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.229: +57 -53 lines
Diff to previous 1.229 (colored)

ip_output: zero iproute structure only when needed; reduce the scope
of some variables.

Revision 1.229 / (download) - annotate - [select for diffs], Fri May 30 01:39:03 2014 UTC (9 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.228: +20 -12 lines
Diff to previous 1.228 (colored)

Introduce 2 new variables: ipsec_enabled and ipsec_used.
Ipsec enabled is controlled by sysctl and determines if is allowed.
ipsec_used is set automatically based on ipsec being enabled, and
rules existing.

Revision 1.228 / (download) - annotate - [select for diffs], Thu May 29 23:02:48 2014 UTC (9 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.227: +5 -6 lines
Diff to previous 1.227 (colored)

Make IGMP and multicast group management code MP-safe.  Use a read-write
lock to protect the hash table of multicast address records; also, make it
private and eliminate some macros.  In the long term, the lookup path ought
to be optimised.

Revision 1.227 / (download) - annotate - [select for diffs], Fri May 23 00:02:14 2014 UTC (9 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.226: +6 -4 lines
Diff to previous 1.226 (colored)

Fix the assert in the previous commit.

Revision 1.226 / (download) - annotate - [select for diffs], Thu May 22 23:42:53 2014 UTC (9 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.225: +94 -113 lines
Diff to previous 1.225 (colored)

- Make ip_setmoptions(), ip_getmoptions() and ip_pcbopts() static.
- ip_output: eliminate 7th variadic argument; IP_RETURNMTU is flag
  always used to store MTU size into struct inpcb::inp_errormtu.
- Clean up these routines: reduce #ifdefs, variable scopes, etc.

Revision 1.210.2.4 / (download) - annotate - [select for diffs], Thu May 22 11:41:09 2014 UTC (9 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.210.2.3: +51 -146 lines
Diff to previous 1.210.2.3 (colored) to branchpoint 1.210 (colored) next main 1.211 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.225 / (download) - annotate - [select for diffs], Sat May 17 21:26:20 2014 UTC (9 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: rmind-smpnet-nbase, rmind-smpnet-base
Changes since 1.224: +3 -5 lines
Diff to previous 1.224 (colored)

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

Revision 1.223.2.3 / (download) - annotate - [select for diffs], Thu Oct 17 23:52:18 2013 UTC (10 years, 4 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.223.2.2: +13 -11 lines
Diff to previous 1.223.2.2 (colored) next main 1.224 (colored)

Eliminate some of the splsoftnet() calls, misc clean up.

Revision 1.223.2.2 / (download) - annotate - [select for diffs], Wed Aug 28 23:59:36 2013 UTC (10 years, 6 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.223.2.1: +4 -9 lines
Diff to previous 1.223.2.1 (colored)

sync with head

Revision 1.223.2.1 / (download) - annotate - [select for diffs], Wed Jul 17 03:16:31 2013 UTC (10 years, 7 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.223: +84 -111 lines
Diff to previous 1.223 (colored)

Checkpoint work in progress:
- Move PCB structures under __INPCB_PRIVATE, adjust most of the callers
  and thus make IPv4 PCB structures mostly opaque.  Any volunteers for
  merging in6pcb with inpcb (see rpaulo-netinet-merge-pcb branch)?
- Move various global vars to the modules where they belong, make them static.
- Some preliminary work for IPv4 PCB locking scheme.
- Make raw IP code mostly MP-safe.  Simplify some of it.
- Rework "fast" IP forwarding (ipflow) code to be mostly MP-safe.  It should
  run from a software interrupt, rather than hard.
- Rework tun(4) pseudo interface to be MP-safe.
- Work towards making some other interfaces more strict.

Revision 1.224 / (download) - annotate - [select for diffs], Sat Jun 29 21:06:58 2013 UTC (10 years, 8 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base9, 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
Branch point for: tls-earlyentropy
Changes since 1.223: +4 -9 lines
Diff to previous 1.223 (colored)

- Rewrite parts of pfil(9): use array to store hooks and thus be more cache
  friendly (there are only few hooks in the system).  Make the structures
  opaque and the interface more strict.
- Remove PFIL_HOOKS option by making pfil(9) mandatory.

Revision 1.223 / (download) - annotate - [select for diffs], Thu Jun 27 19:38:16 2013 UTC (10 years, 8 months ago) by christos
Branch: MAIN
Branch point for: rmind-smpnet
Changes since 1.222: +22 -2 lines
Diff to previous 1.222 (colored)

implement IP_PKTINFO and IP_RECVPKTINFO.

Revision 1.217.2.2 / (download) - annotate - [select for diffs], Sun Jun 23 06:20:25 2013 UTC (10 years, 8 months ago) by tls
Branch: tls-maxphys
Changes since 1.217.2.1: +27 -132 lines
Diff to previous 1.217.2.1 (colored) to branchpoint 1.217 (colored)

resync from head

Revision 1.222 / (download) - annotate - [select for diffs], Sat Jun 8 13:50:22 2013 UTC (10 years, 8 months ago) by rmind
Branch: MAIN
Changes since 1.221: +4 -4 lines
Diff to previous 1.221 (colored)

Split IPsec code in ip_input() and ip_forward() into the separate routines
ipsec4_input() and ipsec4_forward().  Tested by christos@.

Revision 1.221 / (download) - annotate - [select for diffs], Sat Jun 8 03:26:05 2013 UTC (10 years, 8 months ago) by rmind
Branch: MAIN
Changes since 1.220: +14 -111 lines
Diff to previous 1.220 (colored)

Split IPSec logic from ip_output() into a separate routine - ipsec4_output().
No change to the mechanism intended.  Tested by christos@.

Revision 1.220 / (download) - annotate - [select for diffs], Wed Jun 5 19:01:26 2013 UTC (10 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.219: +15 -15 lines
Diff to previous 1.219 (colored)

IPSEC has not come in two speeds for a long time now (IPSEC == kame,
FAST_IPSEC). Make everything refer to IPSEC to avoid confusion.

Revision 1.219 / (download) - annotate - [select for diffs], Tue Jun 4 22:47:37 2013 UTC (10 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.218: +14 -22 lines
Diff to previous 1.218 (colored)

PR/47886: Dr. Wolfgang Stukenbrock: IPSEC_NAT_T enabled kernels may access
outdated pointers and pass ESP data to UPD-sockets.
While here, simplify the code and remove the IPSEC_NAT_T option; always
compile nat-traversal in so that it does not bitrot.

Revision 1.217.2.1 / (download) - annotate - [select for diffs], Mon Feb 25 00:30:04 2013 UTC (11 years ago) by tls
Branch: tls-maxphys
Changes since 1.217: +4 -9 lines
Diff to previous 1.217 (colored)

resync with head

Revision 1.218 / (download) - annotate - [select for diffs], Sat Feb 2 07:00:40 2013 UTC (11 years ago) by kefren
Branch: MAIN
CVS Tags: khorben-n900, agc-symver-base, agc-symver
Changes since 1.217: +4 -9 lines
Diff to previous 1.217 (colored)

get rid of ip_len local variable. Use ntohs(ip->ip_len) like the rest
of the code in the two places this variable was used

Revision 1.210.2.3 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:46 2012 UTC (11 years, 3 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.210.2.2: +17 -4 lines
Diff to previous 1.210.2.2 (colored) to branchpoint 1.210 (colored)

sync with head

Revision 1.217 / (download) - annotate - [select for diffs], Mon Jun 25 15:28:39 2012 UTC (11 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6
Branch point for: tls-maxphys
Changes since 1.216: +5 -5 lines
Diff to previous 1.216 (colored)

rename rfc6056 -> portalgo, requested by yamt

Revision 1.216 / (download) - annotate - [select for diffs], Fri Jun 22 14:54:35 2012 UTC (11 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.215: +17 -4 lines
Diff to previous 1.215 (colored)

PR/46602: Move the rfc6056 port randomization to the IP layer.

Revision 1.210.6.3 / (download) - annotate - [select for diffs], Sat Jun 2 11:09:38 2012 UTC (11 years, 8 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.210.6.2: +8 -9 lines
Diff to previous 1.210.6.2 (colored) to branchpoint 1.210 (colored) next main 1.211 (colored)

sync to latest -current.

Revision 1.210.2.2 / (download) - annotate - [select for diffs], Wed May 23 10:08:16 2012 UTC (11 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.210.2.1: +10 -11 lines
Diff to previous 1.210.2.1 (colored) to branchpoint 1.210 (colored)

sync with head.

Revision 1.215 / (download) - annotate - [select for diffs], Mon Apr 30 22:51:28 2012 UTC (11 years, 10 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base5, jmcneill-usbmp-base10
Changes since 1.214: +10 -11 lines
Diff to previous 1.214 (colored)

- Replace some malloc(9) uses with kmem(9).
- G/C M_IPMOPTS, M_IPMADDR and M_BWMETER.

Revision 1.210.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:41 2012 UTC (11 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.210: +7 -187 lines
Diff to previous 1.210 (colored)

sync with head

Revision 1.210.6.2 / (download) - annotate - [select for diffs], Thu Apr 5 21:33:44 2012 UTC (11 years, 10 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.210.6.1: +5 -185 lines
Diff to previous 1.210.6.1 (colored) to branchpoint 1.210 (colored)

sync to latest -current.

Revision 1.214 / (download) - annotate - [select for diffs], Thu Mar 22 20:34:39 2012 UTC (11 years, 11 months ago) by drochner
Branch: MAIN
CVS Tags: yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8
Changes since 1.213: +5 -185 lines
Diff to previous 1.213 (colored)

remove KAME IPSEC, replaced by FAST_IPSEC

Revision 1.210.6.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:39 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.210: +18 -18 lines
Diff to previous 1.210 (colored)

merge to -current.

Revision 1.213 / (download) - annotate - [select for diffs], Wed Feb 15 16:11:23 2012 UTC (12 years ago) by drochner
Branch: MAIN
CVS Tags: 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-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Changes since 1.212: +3 -3 lines
Diff to previous 1.212 (colored)

fix for IPSEC tunnel + NAT-T + esp_frag:
Output packets larger than "esp_frag" are fragmented first
and then reinjected into ip_output for encapsulation
and transfer. The problem was that each packet got a new
ip_id value assigned, so that fragments couldn't be matched
by the receiver. Offset information was overwritten too.
approved by releng

Revision 1.212 / (download) - annotate - [select for diffs], Sat Dec 31 20:41:59 2011 UTC (12 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.211: +3 -3 lines
Diff to previous 1.211 (colored)

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

Revision 1.211 / (download) - annotate - [select for diffs], Mon Dec 19 11:59:57 2011 UTC (12 years, 2 months ago) by drochner
Branch: MAIN
Changes since 1.210: +16 -16 lines
Diff to previous 1.210 (colored)

rename the IPSEC in-kernel CPP variable and config(8) option to
KAME_IPSEC, and make IPSEC define it so that existing kernel
config files work as before
Now the default can be easily be changed to FAST_IPSEC just by
setting the IPSEC alias to FAST_IPSEC.

Revision 1.210 / (download) - annotate - [select for diffs], Mon Oct 31 13:16:01 2011 UTC (12 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.209: +22 -17 lines
Diff to previous 1.209 (colored)

redo ip_output.c rev.1.206 and 1.207 differently.  PR/43664.
ok'ed by martin@

Revision 1.209 / (download) - annotate - [select for diffs], Sun Jul 17 20:54:53 2011 UTC (12 years, 7 months ago) by joerg
Branch: MAIN
Changes since 1.208: +2 -4 lines
Diff to previous 1.208 (colored)

Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.

Revision 1.205.6.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:55 2011 UTC (12 years, 8 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.205: +19 -9 lines
Diff to previous 1.205 (colored) next main 1.206 (colored)

Sync with HEAD.

Revision 1.205.4.1 / (download) - annotate - [select for diffs], Thu Apr 21 01:42:14 2011 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.205: +19 -9 lines
Diff to previous 1.205 (colored) next main 1.206 (colored)

sync with head

Revision 1.208 / (download) - annotate - [select for diffs], Thu Apr 14 15:53:36 2011 UTC (12 years, 10 months ago) by yamt
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Changes since 1.207: +6 -2 lines
Diff to previous 1.207 (colored)

after ip_input.c rev.1.285 and 1.286, restore kernel_lock for if_output.

Revision 1.207 / (download) - annotate - [select for diffs], Sat Apr 9 21:00:53 2011 UTC (12 years, 10 months ago) by martin
Branch: MAIN
Changes since 1.206: +5 -4 lines
Diff to previous 1.206 (colored)

PR kern/43664:
mlelstv pointed out that we sometimes may use checksums on loopback
interfaces. Make the test consistent with the code path selecting
the checksum operation before invoking fragmentation.

Revision 1.206 / (download) - annotate - [select for diffs], Sat Apr 9 20:34:36 2011 UTC (12 years, 10 months ago) by martin
Branch: MAIN
Changes since 1.205: +14 -9 lines
Diff to previous 1.205 (colored)

We do not do checksums on loopback interfaces, not even if fragmenting.
Fixes PR kern/43664.

Revision 1.200.10.1.2.1 / (download) - annotate - [select for diffs], Wed Apr 21 00:28:22 2010 UTC (13 years, 10 months ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.200.10.1: +2 -2 lines
Diff to previous 1.200.10.1 (colored) next main 1.201 (colored)

sync to netbsd-5

Revision 1.195.2.5 / (download) - annotate - [select for diffs], Wed Aug 19 18:48:24 2009 UTC (14 years, 6 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.195.2.4: +15 -2 lines
Diff to previous 1.195.2.4 (colored) to branchpoint 1.195 (colored) next main 1.196 (colored)

sync with head.

Revision 1.200.8.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:32:48 2009 UTC (14 years, 7 months ago) by jym
Branch: jym-xensuspend
Changes since 1.200.8.1: +28 -3 lines
Diff to previous 1.200.8.1 (colored) to branchpoint 1.200 (colored) next main 1.201 (colored)

Sync with HEAD.

Revision 1.195.2.4 / (download) - annotate - [select for diffs], Sat Jul 18 14:53:25 2009 UTC (14 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.195.2.3: +15 -3 lines
Diff to previous 1.195.2.3 (colored) to branchpoint 1.195 (colored)

sync with head.

Revision 1.205 / (download) - annotate - [select for diffs], Fri Jul 17 22:02:54 2009 UTC (14 years, 7 months ago) by minskim
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, yamt-nfs-mp-base8, yamt-nfs-mp-base7, 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.204: +15 -2 lines
Diff to previous 1.204 (colored)

Add the IP_MINTTL socket option.

The IP_MINTTL option may be used on SOCK_STREAM sockets to discard
packets with a TTL lower than the option value.  This can be used to
implement the Generalized TTL Security Mechanism (GTSM) according to
RFC 3682.

OK'ed by christos@.

Revision 1.204 / (download) - annotate - [select for diffs], Thu Jul 16 04:09:51 2009 UTC (14 years, 7 months ago) by minskim
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6
Changes since 1.203: +12 -2 lines
Diff to previous 1.203 (colored)

Add the IP_RECVTTL option support.

If the IP_RECVTTL option is enabled on a SOCK_DGRAM socket, the
recvmsg(2) call will return the TTL of the received datagram.  The
msg_control field in the msghdr structure points to a buffer that
contains a cmsghdr structure followed by the TTL value.

Modeled after FreeBSD implementation.

Revision 1.200.4.1 / (download) - annotate - [select for diffs], Thu Jul 9 19:38:27 2009 UTC (14 years, 7 months ago) by snj
Branch: netbsd-5
CVS Tags: 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, matt-nb5-pq3-base, matt-nb5-pq3
Changes since 1.200: +5 -3 lines
Diff to previous 1.200 (colored) next main 1.201 (colored)

Pull up following revision(s) (requested by martin in ticket #847):
	sys/netinet/ip_output.c: revision 1.203
From Wolfgang Stukenbrock in PR kern/41659: add missing splx().

Revision 1.200.10.1 / (download) - annotate - [select for diffs], Thu Jul 9 19:35:56 2009 UTC (14 years, 7 months ago) by snj
Branch: netbsd-5-0
CVS Tags: netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b
Branch point for: matt-nb5-mips64
Changes since 1.200: +5 -3 lines
Diff to previous 1.200 (colored) next main 1.201 (colored)

Pull up following revision(s) (requested by martin in ticket #847):
	sys/netinet/ip_output.c: revision 1.203
From Wolfgang Stukenbrock in PR kern/41659: add missing splx().

Revision 1.203 / (download) - annotate - [select for diffs], Wed Jul 1 14:47:54 2009 UTC (14 years, 8 months ago) by martin
Branch: MAIN
Changes since 1.202: +5 -3 lines
Diff to previous 1.202 (colored)

From Wolfgang Stukenbrock in PR kern/41659: add missing splx().

Revision 1.195.2.3 / (download) - annotate - [select for diffs], Sat May 16 10:41:50 2009 UTC (14 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.195.2.2: +3 -15 lines
Diff to previous 1.195.2.2 (colored) to branchpoint 1.195 (colored)

sync with head

Revision 1.200.8.1 / (download) - annotate - [select for diffs], Wed May 13 17:22:28 2009 UTC (14 years, 9 months ago) by jym
Branch: jym-xensuspend
Changes since 1.200: +4 -16 lines
Diff to previous 1.200 (colored)

Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.202 / (download) - annotate - [select for diffs], Wed May 6 21:41:59 2009 UTC (14 years, 9 months ago) by elad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base5, yamt-nfs-mp-base4, jym-xensuspend-base
Changes since 1.201: +3 -15 lines
Diff to previous 1.201 (colored)

Remove some usage of "priv" and "privileged" variables and instead pass
around credentials. Also push down kauth(9) calls closer to where the
operation is done.

Mailing list reference:

	http://mail-index.netbsd.org/tech-net/2009/04/30/msg001270.html

Revision 1.195.2.2 / (download) - annotate - [select for diffs], Mon May 4 08:14:17 2009 UTC (14 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.195.2.1: +208 -213 lines
Diff to previous 1.195.2.1 (colored) to branchpoint 1.195 (colored)

sync with head.

Revision 1.200.2.1 / (download) - annotate - [select for diffs], Tue Apr 28 07:37:22 2009 UTC (14 years, 10 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.200: +3 -3 lines
Diff to previous 1.200 (colored) next main 1.201 (colored)

Sync with HEAD.

Revision 1.201 / (download) - annotate - [select for diffs], Wed Mar 18 16:00:22 2009 UTC (14 years, 11 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Changes since 1.200: +3 -3 lines
Diff to previous 1.200 (colored)

bzero -> memset

Revision 1.192.6.3 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:32 2009 UTC (15 years, 1 month ago) by mjf
Branch: mjf-devfs2
Changes since 1.192.6.2: +85 -75 lines
Diff to previous 1.192.6.2 (colored) to branchpoint 1.192 (colored) next main 1.193 (colored)

Sync with HEAD.

Revision 1.196.6.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:46 2008 UTC (15 years, 4 months ago) by haad
Branch: haad-dm
Changes since 1.196: +207 -212 lines
Diff to previous 1.196 (colored) next main 1.197 (colored)

Sync with HEAD.

Revision 1.200 / (download) - annotate - [select for diffs], Sun Oct 12 11:15:54 2008 UTC (15 years, 4 months ago) by plunky
Branch: MAIN
CVS Tags: nick-hppapmap-base2, netbsd-5-base, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, mjf-devfs2-base, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5-0, netbsd-5, jym-xensuspend
Changes since 1.199: +77 -72 lines
Diff to previous 1.199 (colored)

update ip_pcbopts() to use sockopt(9) API.

cleans up function and one small fix is that we now stop copying user
options to the mbuf when the _EOL is given, previously this function
would continue to copy options.

Revision 1.199 / (download) - annotate - [select for diffs], Sun Oct 12 10:23:18 2008 UTC (15 years, 4 months ago) by plunky
Branch: MAIN
Changes since 1.198: +11 -6 lines
Diff to previous 1.198 (colored)

do not sleep while allocating memory here as socket lock is held

Revision 1.192.6.2 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:58 2008 UTC (15 years, 5 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.192.6.1: +139 -154 lines
Diff to previous 1.192.6.1 (colored) to branchpoint 1.192 (colored)

Sync with HEAD.

Revision 1.196.2.1 / (download) - annotate - [select for diffs], Thu Sep 18 04:37:01 2008 UTC (15 years, 5 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.196: +141 -156 lines
Diff to previous 1.196 (colored) next main 1.197 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.198 / (download) - annotate - [select for diffs], Sat Aug 16 21:51:43 2008 UTC (15 years, 6 months ago) by plunky
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2
Changes since 1.197: +4 -4 lines
Diff to previous 1.197 (colored)

constify sockopt in the PRCO_SETOPT path

Revision 1.197 / (download) - annotate - [select for diffs], Wed Aug 6 15:01:23 2008 UTC (15 years, 6 months ago) by plunky
Branch: MAIN
Changes since 1.196: +141 -156 lines
Diff to previous 1.196 (colored)

Convert socket options code to use a sockopt structure
instead of laying everything into an mbuf.

approved by core

Revision 1.192.6.1 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:24 2008 UTC (15 years, 8 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.192: +18 -23 lines
Diff to previous 1.192 (colored)

Sync with HEAD.

Revision 1.194.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:29 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-pf42
Changes since 1.194: +5 -11 lines
Diff to previous 1.194 (colored) next main 1.195 (colored)

sync with head.

Revision 1.195.2.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:42 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.195: +2 -9 lines
Diff to previous 1.195 (colored)

sync with head.

Revision 1.196 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:09 2008 UTC (15 years, 10 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa, haad-dm
Changes since 1.195: +2 -9 lines
Diff to previous 1.195 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.195 / (download) - annotate - [select for diffs], Wed Apr 23 06:09:04 2008 UTC (15 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.194: +5 -4 lines
Diff to previous 1.194 (colored)

Make IPSEC and FAST_IPSEC stats per-cpu.  Use <net/net_stats.h> and
netstat_sysctl().

Revision 1.194 / (download) - annotate - [select for diffs], Sat Apr 12 05:58:22 2008 UTC (15 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Changes since 1.193: +15 -14 lines
Diff to previous 1.193 (colored)

Make IP, TCP, UDP, and ICMP statistics per-CPU.  The stats are collated
when the user requests them via sysctl.

Revision 1.193 / (download) - annotate - [select for diffs], Mon Apr 7 06:31:28 2008 UTC (15 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.192: +14 -14 lines
Diff to previous 1.192 (colored)

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

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

Revision 1.180.8.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:06 2008 UTC (15 years, 11 months ago) by matt
Branch: matt-armv6
Changes since 1.180.8.2: +36 -34 lines
Diff to previous 1.180.8.2 (colored) to branchpoint 1.180 (colored) next main 1.181 (colored)

sync with HEAD

Revision 1.184.6.3 / (download) - annotate - [select for diffs], Mon Feb 18 21:07:08 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs
Changes since 1.184.6.2: +93 -148 lines
Diff to previous 1.184.6.2 (colored) to branchpoint 1.184 (colored) next main 1.185 (colored)

Sync with HEAD.

Revision 1.153.2.8 / (download) - annotate - [select for diffs], Mon Feb 11 15:00:05 2008 UTC (16 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.153.2.7: +27 -24 lines
Diff to previous 1.153.2.7 (colored) next main 1.154 (colored)

sync with head.

Revision 1.192 / (download) - annotate - [select for diffs], Wed Feb 6 03:20:51 2008 UTC (16 years ago) by matt
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: mjf-devfs2
Changes since 1.191: +27 -24 lines
Diff to previous 1.191 (colored)

Add a new ip_id generation scheme based on a Fisher-Yates shuffle over a
sliding window.  XXX replace use of arc4random RSN.

Revision 1.153.2.7 / (download) - annotate - [select for diffs], Mon Jan 21 09:47:16 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.153.2.6: +88 -140 lines
Diff to previous 1.153.2.6 (colored)

sync with head

Revision 1.185.6.2 / (download) - annotate - [select for diffs], Sat Jan 19 12:15:32 2008 UTC (16 years, 1 month ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.185.6.1: +9 -10 lines
Diff to previous 1.185.6.1 (colored) to branchpoint 1.185 (colored) next main 1.186 (colored)

Sync with HEAD

Revision 1.191 / (download) - annotate - [select for diffs], Mon Jan 14 04:19:09 2008 UTC (16 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.190: +5 -5 lines
Diff to previous 1.190 (colored)

Use rtcache_validate() instead of rtcache_getrt().  Shorten staircase
in in_losing().

Revision 1.190 / (download) - annotate - [select for diffs], Sat Jan 12 02:58:58 2008 UTC (16 years, 1 month ago) by dyoung
Branch: MAIN
Changes since 1.189: +8 -9 lines
Diff to previous 1.189 (colored)

Good-bye, rtcache_check().  Call both rtcache_validate() and
rtcache_update(,1) instead of rtcache_check().

Revision 1.180.8.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:57:28 2008 UTC (16 years, 1 month ago) by matt
Branch: matt-armv6
Changes since 1.180.8.1: +85 -142 lines
Diff to previous 1.180.8.1 (colored) to branchpoint 1.180 (colored)

sync with HEAD

Revision 1.185.6.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:57:22 2008 UTC (16 years, 1 month ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.185: +85 -136 lines
Diff to previous 1.185 (colored)

Sync with HEAD

Revision 1.189 / (download) - annotate - [select for diffs], Sat Dec 29 15:13:55 2007 UTC (16 years, 2 months ago) by degroote
Branch: MAIN
CVS Tags: matt-armv6-base
Changes since 1.188: +3 -2 lines
Diff to previous 1.188 (colored)

Restore correctly the sp level in case of FAST_IPSEC + IPSEC_NAT_T

Revision 1.188 / (download) - annotate - [select for diffs], Sat Dec 29 14:53:25 2007 UTC (16 years, 2 months ago) by degroote
Branch: MAIN
Changes since 1.187: +58 -116 lines
Diff to previous 1.187 (colored)

Simplify the FAST_IPSEC output path
Only record an IPSEC_OUT_DONE tag when we have finished the processing
In ip{,6}_output, check this tag to know if we have already processed this
packet.
Remove some dead code (IPSEC_PENDING_TDB is not used in NetBSD)

Fix pr/36870

Revision 1.184.6.2 / (download) - annotate - [select for diffs], Thu Dec 27 00:46:30 2007 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.184.6.1: +28 -22 lines
Diff to previous 1.184.6.1 (colored) to branchpoint 1.184 (colored)

Sync with HEAD.

Revision 1.185.2.1 / (download) - annotate - [select for diffs], Wed Dec 26 19:57:40 2007 UTC (16 years, 2 months ago) by ad
Branch: vmlocking2
Changes since 1.185: +28 -22 lines
Diff to previous 1.185 (colored) next main 1.186 (colored)

Sync with head.

Revision 1.187 / (download) - annotate - [select for diffs], Fri Dec 21 02:07:55 2007 UTC (16 years, 2 months ago) by matt
Branch: MAIN
CVS Tags: vmlocking2-base3
Changes since 1.186: +5 -3 lines
Diff to previous 1.186 (colored)

Add fix for ip_id information leakage.  Since the leakage information is
primarily used with TCP SYN and RST packets and such packets are less than
the smallest sized packet that an IP stack is allowed to fragment, we simply
set ip_id to 0 for all packets 68 bytes or less.

Revision 1.186 / (download) - annotate - [select for diffs], Thu Dec 20 19:53:32 2007 UTC (16 years, 2 months ago) by dyoung
Branch: MAIN
Changes since 1.185: +25 -21 lines
Diff to previous 1.185 (colored)

Poison struct route->ro_rt uses in the kernel by changing the name
to _ro_rt.  Use rtcache_getrt() to access a route cache's struct
rtentry *.

Introduce struct ifnet->if_dl that always points at the interface
identifier/link-layer address.  Make code that treated the first
ifaddr on struct ifnet->if_addrlist as the interface address use
if_dl, instead.

Remove stale debugging code from net/route.c.  Move the rtflush()
code into rtcache_clear() and delete rtflush().  Delete rtalloc(),
because nothing uses it any more.

Make ND6_HINT an inline, lowercase subroutine, nd6_hint.

I've done my best to convert IP Filter, the ISO stack, and the
AppleTalk stack to rtcache_getrt().  They compile, but I have not
tested them.  I have given the changes to PF, GRE, IPv4 and IPv6
stacks a lot of exercise.

Revision 1.184.6.1 / (download) - annotate - [select for diffs], Sat Dec 8 18:21:13 2007 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.184: +2 -8 lines
Diff to previous 1.184 (colored)

Sync with HEAD.

Revision 1.153.2.6 / (download) - annotate - [select for diffs], Fri Dec 7 17:34:31 2007 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.153.2.5: +2 -8 lines
Diff to previous 1.153.2.5 (colored)

sync with head

Revision 1.180.6.3 / (download) - annotate - [select for diffs], Mon Dec 3 16:15:10 2007 UTC (16 years, 2 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.180.6.2: +2 -8 lines
Diff to previous 1.180.6.2 (colored) to branchpoint 1.180 (colored) next main 1.181 (colored)

Sync with HEAD.

Revision 1.185 / (download) - annotate - [select for diffs], Wed Nov 28 04:14:11 2007 UTC (16 years, 3 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: vmlocking2, bouyer-xeni386
Changes since 1.184: +2 -8 lines
Diff to previous 1.184 (colored)

Move IN_NEED_CHECKSUM() to in_offload.h for re-use.

Revision 1.180.8.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:33:50 2007 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.180: +21 -9 lines
Diff to previous 1.180 (colored)

sync with HEAD

Revision 1.153.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:36:08 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.153.2.4: +8 -4 lines
Diff to previous 1.153.2.4 (colored)

sync with head.

Revision 1.179.2.2 / (download) - annotate - [select for diffs], Tue Oct 9 13:44:50 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.179.2.1: +21 -9 lines
Diff to previous 1.179.2.1 (colored) to branchpoint 1.179 (colored) next main 1.180 (colored)

Sync with head.

Revision 1.180.6.2 / (download) - annotate - [select for diffs], Tue Oct 2 18:29:20 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.180.6.1: +8 -4 lines
Diff to previous 1.180.6.1 (colored) to branchpoint 1.180 (colored)

Sync with HEAD.

Revision 1.184 / (download) - annotate - [select for diffs], Wed Sep 19 04:33:43 2007 UTC (16 years, 5 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: mjf-devfs
Changes since 1.183: +8 -4 lines
Diff to previous 1.183 (colored)

1) Introduce a new socket option, (SOL_SOCKET, SO_NOHEADER), that
   tells a socket that it should both add a protocol header to tx'd
   datagrams and remove the header from rx'd datagrams:

        int onoff = 1, s = socket(...);
        setsockopt(s, SOL_SOCKET, SO_NOHEADER, &onoff);

2) Add an implementation of (SOL_SOCKET, SO_NOHEADER) for raw IPv4
   sockets.

3) Reorganize the protocols' pr_ctloutput implementations a bit.
   Consistently return ENOPROTOOPT when an option is unsupported,
   and EINVAL if a supported option's arguments are incorrect.
   Reorganize the flow of code so that it's more clear how/when
   options are passed down the stack until they are handled.

   Shorten some pr_ctloutput staircases for readability.

4) Extract common mbuf code into subroutines, add new sockaddr
   methods, and introduce a new subroutine, fsocreate(), for reuse
   later; use it first in sys_socket():

struct mbuf *m_getsombuf(struct socket *so)

        Create an mbuf and make its owner the socket `so'.

struct mbuf *m_intopt(struct socket *so, int val)

        Create an mbuf, make its owner the socket `so', put the
        int `val' into it, and set its length to sizeof(int).


int fsocreate(..., int *fd)

        Create a socket, a la socreate(9), put the socket into the
        given LWP's descriptor table, return the descriptor at `fd'
        on success.

void *sockaddr_addr(struct sockaddr *sa, socklen_t *slenp)
const void *sockaddr_const_addr(const struct sockaddr *sa, socklen_t *slenp)

        Extract a pointer to the address part of a sockaddr.  Write
        the length of the address  part at `slenp', if `slenp' is
        not NULL.

socklen_t sockaddr_getlen(const struct sockaddr *sa)

        Return the length of a sockaddr.  This just evaluates to
        sa->sa_len.  I only add this for consistency with code that
        appears in a portable userland library that I am going to
        import.

const struct sockaddr *sockaddr_any(const struct sockaddr *sa)

        Return the "don't care" sockaddr in the same family as
        `sa'.  This is the address a client should sobind(9) if it
        does not care the source address and, if applicable, the
        port et cetera that it uses.

const void *sockaddr_anyaddr(const struct sockaddr *sa, socklen_t *slenp)

        Return the "don't care" sockaddr in the same family as
        `sa'.  This is the address a client should sobind(9) if it
        does not care the source address and, if applicable, the
        port et cetera that it uses.

Revision 1.180.6.1 / (download) - annotate - [select for diffs], Mon Sep 3 16:49:06 2007 UTC (16 years, 5 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.180: +15 -7 lines
Diff to previous 1.180 (colored)

Sync with HEAD.

Revision 1.153.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:42:59 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.153.2.3: +79 -65 lines
Diff to previous 1.153.2.3 (colored)

sync with head.

Revision 1.180.2.1 / (download) - annotate - [select for diffs], Mon Sep 3 10:23:46 2007 UTC (16 years, 5 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.180: +15 -7 lines
Diff to previous 1.180 (colored) next main 1.181 (colored)

Sync with HEAD.

Revision 1.183 / (download) - annotate - [select for diffs], Sun Sep 2 07:18:55 2007 UTC (16 years, 5 months ago) by dyoung
Branch: MAIN
CVS Tags: nick-csl-alignment-base5
Changes since 1.182: +3 -3 lines
Diff to previous 1.182 (colored)

m_copym(..., 0, M_COPYALL, ...) -> m_copypacket(..., ...).

Revision 1.182 / (download) - annotate - [select for diffs], Sun Sep 2 03:12:23 2007 UTC (16 years, 5 months ago) by dyoung
Branch: MAIN
Changes since 1.181: +4 -4 lines
Diff to previous 1.181 (colored)

m_copy() was deprecated, apparently, long ago.  m_copy(...) ->
m_copym(..., M_DONTWAIT).

Revision 1.181 / (download) - annotate - [select for diffs], Tue Aug 28 23:45:39 2007 UTC (16 years, 6 months ago) by cube
Branch: MAIN
Changes since 1.180: +13 -5 lines
Diff to previous 1.180 (colored)

Fix ipv4 multicast that could sometimes send packets with the wrong
Ethernet multicast address.

Reported by jmcneill@, fix discussed with dyoung@, _very_ light testing by
myself, some more money for my dealer of anxiolytics after reading
ip_output()'s twisted code maze.

Revision 1.179.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:11:25 2007 UTC (16 years, 7 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.179: +54 -48 lines
Diff to previous 1.179 (colored) next main 1.180 (colored)

Sync with head.

Revision 1.179.2.1 / (download) - annotate - [select for diffs], Fri Jun 8 14:17:46 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.179: +54 -48 lines
Diff to previous 1.179 (colored)

Sync with head.

Revision 1.177.2.4 / (download) - annotate - [select for diffs], Mon May 7 10:55:59 2007 UTC (16 years, 9 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.177.2.3: +54 -48 lines
Diff to previous 1.177.2.3 (colored) next main 1.178 (colored)

sync with head.

Revision 1.180 / (download) - annotate - [select for diffs], Wed May 2 20:40:25 2007 UTC (16 years, 10 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, nick-csl-alignment-base, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: nick-csl-alignment, matt-armv6, jmcneill-pm
Changes since 1.179: +54 -48 lines
Diff to previous 1.179 (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.149.2.5 / (download) - annotate - [select for diffs], Sat Mar 31 14:15:43 2007 UTC (16 years, 11 months ago) by bouyer
Branch: netbsd-3
Changes since 1.149.2.4: +4 -7 lines
Diff to previous 1.149.2.4 (colored) to branchpoint 1.149 (colored) next main 1.150 (colored)

Pull up following revision(s) (requested by joerg in ticket #1734):
	sys/netinet/ip_output.c: revision 1.167.2.2
Unconditionally zero and free iproute. Before IPsec tunnel packets e.g.
from ICMP could end up in leaking the reference in iproute, as
ipsec4_output would overwrite the ro pointer in state.
Tested by Juraj Hercek and supposed to fix PR kern/35273 and kern/35318.

Revision 1.167.2.2 / (download) - annotate - [select for diffs], Wed Mar 28 20:46:13 2007 UTC (16 years, 11 months ago) by jdc
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, 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
Changes since 1.167.2.1: +6 -9 lines
Diff to previous 1.167.2.1 (colored) to branchpoint 1.167 (colored) next main 1.168 (colored)

Pull up revision 1.174 (requested by joerg in ticket #524).

Unconditionally zero and free iproute. Before IPsec tunnel packets e.g.
from ICMP could end up in leaking the reference in iproute, as
ipsec4_output would overwrite the ro pointer in state.

Tested by Juraj Hercek and supposed to fix PR kern/35273 and kern/35318.

Revision 1.177.2.3 / (download) - annotate - [select for diffs], Mon Mar 12 05:59:38 2007 UTC (16 years, 11 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.177.2.2: +17 -17 lines
Diff to previous 1.177.2.2 (colored)

Sync with HEAD.

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

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

Revision 1.177.2.2 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:56 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.177.2.1: +1979 -0 lines
Diff to previous 1.177.2.1 (colored)

- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.153.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:45 2007 UTC (17 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.153.2.2: +14 -20 lines
Diff to previous 1.153.2.2 (colored)

sync with head.

Revision 1.178 / (download) - annotate - [select for diffs], Sat Feb 17 22:34:11 2007 UTC (17 years ago) by dyoung
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.177: +5 -5 lines
Diff to previous 1.177 (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.177.2.1, Sat Feb 17 05:36:29 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.177: +0 -1979 lines
FILE REMOVED

file ip_output.c was added on branch yamt-idlelwp on 2007-02-27 16:54:56 +0000

Revision 1.177 / (download) - annotate - [select for diffs], Sat Feb 17 05:36:29 2007 UTC (17 years ago) by dyoung
Branch: MAIN
Branch point for: yamt-idlelwp
Changes since 1.176: +3 -4 lines
Diff to previous 1.176 (colored)

Join lines.

Revision 1.165.4.3 / (download) - annotate - [select for diffs], Thu Feb 1 08:48:43 2007 UTC (17 years ago) by ad
Branch: newlock2
Changes since 1.165.4.2: +8 -14 lines
Diff to previous 1.165.4.2 (colored) to branchpoint 1.165 (colored) next main 1.166 (colored)

Sync with head.

Revision 1.176 / (download) - annotate - [select for diffs], Mon Jan 29 06:00:11 2007 UTC (17 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: post-newlock2-merge, newlock2-nbase, newlock2-base
Changes since 1.175: +5 -5 lines
Diff to previous 1.175 (colored)

bzero -> memset.

Revision 1.175 / (download) - annotate - [select for diffs], Mon Jan 29 05:59:30 2007 UTC (17 years, 1 month ago) by dyoung
Branch: MAIN
Changes since 1.174: +3 -7 lines
Diff to previous 1.174 (colored)

In ip_setmoptions(), don't leave a route cache (struct route) on
the stack if we exit with EADDRNOTAVAIL.

Revision 1.149.2.3.2.1 / (download) - annotate - [select for diffs], Sun Jan 28 19:39:30 2007 UTC (17 years, 1 month ago) by tron
Branch: netbsd-3-0
CVS Tags: netbsd-3-0-3-RELEASE
Changes since 1.149.2.3: +3 -2 lines
Diff to previous 1.149.2.3 (colored) next main 1.149.2.4 (colored)

Pull up following revision(s) (requested by yamt in ticket #1656):
	sys/netinet/ip_output.c: revision 1.173
ip_output: reload ip_len after running pfil_run_hooks.
pf "fragment reassemble" rule can change it, at least.

Revision 1.149.2.3.4.1 / (download) - annotate - [select for diffs], Sun Jan 28 19:38:42 2007 UTC (17 years, 1 month ago) by tron
Branch: netbsd-3-1
CVS Tags: netbsd-3-1-1-RELEASE
Changes since 1.149.2.3: +3 -2 lines
Diff to previous 1.149.2.3 (colored) next main 1.149.2.4 (colored)

Pull up following revision(s) (requested by yamt in ticket #1656):
	sys/netinet/ip_output.c: revision 1.173
ip_output: reload ip_len after running pfil_run_hooks.
pf "fragment reassemble" rule can change it, at least.

Revision 1.149.2.4 / (download) - annotate - [select for diffs], Sun Jan 28 19:37:20 2007 UTC (17 years, 1 month ago) by tron
Branch: netbsd-3
Changes since 1.149.2.3: +3 -2 lines
Diff to previous 1.149.2.3 (colored) to branchpoint 1.149 (colored)

Pull up following revision(s) (requested by yamt in ticket #1656):
	sys/netinet/ip_output.c: revision 1.173
ip_output: reload ip_len after running pfil_run_hooks.
pf "fragment reassemble" rule can change it, at least.

Revision 1.167.2.1 / (download) - annotate - [select for diffs], Thu Jan 18 13:09:33 2007 UTC (17 years, 1 month ago) by tron
Branch: netbsd-4
Changes since 1.167: +3 -2 lines
Diff to previous 1.167 (colored)

Pull up following revision(s) (requested by yamt in ticket #361):
	sys/netinet/ip_output.c: revision 1.173
ip_output: reload ip_len after running pfil_run_hooks.
pf "fragment reassemble" rule can change it, at least.

Revision 1.174 / (download) - annotate - [select for diffs], Sat Jan 13 23:13:46 2007 UTC (17 years, 1 month ago) by joerg
Branch: MAIN
Changes since 1.173: +5 -7 lines
Diff to previous 1.173 (colored)

Unconditionally zero and free iproute. Before IPsec tunnel packets e.g.
from ICMP could end up in leaking the reference in iproute, as
ipsec4_output would overwrite the ro pointer in state.

Tested by Juraj Hercek and supposed to fix PR kern/35273 and kern/35318.

Revision 1.165.4.2 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:14 2007 UTC (17 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.165.4.1: +18 -53 lines
Diff to previous 1.165.4.1 (colored) to branchpoint 1.165 (colored)

Sync with head.

Revision 1.173 / (download) - annotate - [select for diffs], Mon Jan 8 04:14:54 2007 UTC (17 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.172: +3 -2 lines
Diff to previous 1.172 (colored)

ip_output: reload ip_len after running pfil_run_hooks.
pf "fragment reassemble" rule can change it, at least.

Revision 1.172 / (download) - annotate - [select for diffs], Thu Jan 4 19:07:03 2007 UTC (17 years, 1 month ago) by elad
Branch: MAIN
Changes since 1.171: +3 -3 lines
Diff to previous 1.171 (colored)

Consistent usage of KAUTH_GENERIC_ISSUSER.

Revision 1.153.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:33 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.153.2.1: +42 -57 lines
Diff to previous 1.153.2.1 (colored)

sync with head.

Revision 1.165.6.2 / (download) - annotate - [select for diffs], Mon Dec 18 11:42:21 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.165.6.1: +12 -11 lines
Diff to previous 1.165.6.1 (colored) to branchpoint 1.165 (colored) next main 1.166 (colored)

sync with head.

Revision 1.171 / (download) - annotate - [select for diffs], Fri Dec 15 21:18:54 2006 UTC (17 years, 2 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4
Changes since 1.170: +12 -11 lines
Diff to previous 1.170 (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.165.6.1 / (download) - annotate - [select for diffs], Sun Dec 10 07:19:11 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.165: +23 -50 lines
Diff to previous 1.165 (colored)

sync with head.

Revision 1.170 / (download) - annotate - [select for diffs], Sat Dec 9 05:33:04 2006 UTC (17 years, 2 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-splraiseipl-base3
Changes since 1.169: +9 -14 lines
Diff to previous 1.169 (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.169 / (download) - annotate - [select for diffs], Wed Dec 6 04:29:09 2006 UTC (17 years, 2 months ago) by dyoung
Branch: MAIN
Changes since 1.168: +3 -3 lines
Diff to previous 1.168 (colored)

Remove stray curly brace.  Thanks, yamt!

Revision 1.168 / (download) - annotate - [select for diffs], Wed Dec 6 00:41:59 2006 UTC (17 years, 2 months ago) by dyoung
Branch: MAIN
Changes since 1.167: +5 -5 lines
Diff to previous 1.167 (colored)

KNF.

Revision 1.167 / (download) - annotate - [select for diffs], Sat Nov 25 18:41:36 2006 UTC (17 years, 3 months ago) by yamt
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: netbsd-4
Changes since 1.166: +2 -34 lines
Diff to previous 1.166 (colored)

move tso-by-software code to their own files.  no functional changes.

Revision 1.165.4.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:39:36 2006 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.165: +13 -3 lines
Diff to previous 1.165 (colored)

Sync with head.

Revision 1.166 / (download) - annotate - [select for diffs], Mon Nov 13 05:13:42 2006 UTC (17 years, 3 months ago) by dyoung
Branch: MAIN
Changes since 1.165: +13 -3 lines
Diff to previous 1.165 (colored)

Add a source-address selection policy mechanism to the kernel.

Also, add ioctls SIOCGIFADDRPREF/SIOCSIFADDRPREF to get/set preference
numbers for addresses.  Make ifconfig(8) set/display preference
numbers.

To activate source-address selection policies in your kernel, add
'options IPSELSRC' to your kernel configuration.

Miscellaneous changes in support of source-address selection:

        1 Factor out some common code, producing rt_replace_ifa().

        2 Abbreviate a for-loop with TAILQ_FOREACH().

        3 Add the predicates on IPv4 addresses IN_LINKLOCAL() and
          IN_PRIVATE(), that are true for link-local unicast
          (169.254/16) and RFC1918 private addresses, respectively.
          Add the predicate IN_ANY_LOCAL() that is true for link-local
          unicast and multicast.

        4 Add IPv4-specific interface attach/detach routines,
          in_domifattach and in_domifdetach, which build #ifdef
          IPSELSRC.

See in_getifa(9) for a more thorough description of source-address
selection policy.

Revision 1.159.4.2 / (download) - annotate - [select for diffs], Sat Sep 9 02:58:47 2006 UTC (17 years, 5 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.159.4.1: +40 -11 lines
Diff to previous 1.159.4.1 (colored) next main 1.160 (colored)

sync with head

Revision 1.160.2.2 / (download) - annotate - [select for diffs], Fri Aug 11 15:46:33 2006 UTC (17 years, 6 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.160.2.1: +17 -6 lines
Diff to previous 1.160.2.1 (colored) to branchpoint 1.160 (colored) next main 1.161 (colored)

sync with head

Revision 1.165 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:13 2006 UTC (17 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2, yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.164: +5 -5 lines
Diff to previous 1.164 (colored)

Use the LWP cached credentials where sane.

Revision 1.162.4.1 / (download) - annotate - [select for diffs], Thu Jul 13 17:50:05 2006 UTC (17 years, 7 months ago) by gdamore
Branch: gdamore-uart
Changes since 1.162: +14 -3 lines
Diff to previous 1.162 (colored) next main 1.163 (colored)

Merge from HEAD.

Revision 1.164 / (download) - annotate - [select for diffs], Wed Jul 12 14:07:02 2006 UTC (17 years, 7 months ago) by tron
Branch: MAIN
Changes since 1.163: +3 -4 lines
Diff to previous 1.163 (colored)

Remove test for M_CSUM_TSOv6 flag which is not (yet) defined in
NetBSD-current.

Revision 1.163 / (download) - annotate - [select for diffs], Wed Jul 12 13:11:27 2006 UTC (17 years, 7 months ago) by tron
Branch: MAIN
Changes since 1.162: +15 -3 lines
Diff to previous 1.162 (colored)

Add diagnostic checks for hardware-assisted checksum related flags in
the mbuf which supposed to get sent out:
- Complain in ip_output() if any of the IPv6 related flags are set.
- Complain in ip6_output() if any of the IPv4 related flags are set.
- Complain in both functions if the flags indicate that both a TCP and
  UCP checksum should be calculated by the hardware.

Revision 1.153.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:11:01 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.153: +57 -28 lines
Diff to previous 1.153 (colored)

sync with head.

Revision 1.159.6.2 / (download) - annotate - [select for diffs], Thu Jun 1 22:38:47 2006 UTC (17 years, 9 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.159.6.1: +5 -3 lines
Diff to previous 1.159.6.1 (colored) next main 1.160 (colored)

Sync with head.

Revision 1.160.6.1 / (download) - annotate - [select for diffs], Wed May 24 15:50:45 2006 UTC (17 years, 9 months ago) by tron
Branch: peter-altq
Changes since 1.160: +5 -3 lines
Diff to previous 1.160 (colored) next main 1.161 (colored)

Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.160.2.1 / (download) - annotate - [select for diffs], Wed May 24 10:59:03 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.160: +5 -3 lines
Diff to previous 1.160 (colored)

sync with head.

Revision 1.162 / (download) - annotate - [select for diffs], Mon May 15 00:05:17 2006 UTC (17 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base, chap-midi-nbase, chap-midi-base, chap-midi
Branch point for: gdamore-uart
Changes since 1.161: +3 -2 lines
Diff to previous 1.161 (colored)

kauth fallout

Revision 1.161 / (download) - annotate - [select for diffs], Sun May 14 21:19:34 2006 UTC (17 years, 9 months ago) by elad
Branch: MAIN
Changes since 1.160: +4 -3 lines
Diff to previous 1.160 (colored)

integrate kauth.

Revision 1.159.6.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:40:10 2006 UTC (17 years, 10 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.159: +24 -8 lines
Diff to previous 1.159 (colored)

Sync with head.

Revision 1.160.4.2 / (download) - annotate - [select for diffs], Fri Mar 10 15:20:54 2006 UTC (17 years, 11 months ago) by elad
Branch: elad-kernelauth
Changes since 1.160.4.1: +3 -3 lines
Diff to previous 1.160.4.1 (colored) to branchpoint 1.160 (colored) next main 1.161 (colored)

generic_authorize() -> kauth_authorize_generic().

Revision 1.160.4.1 / (download) - annotate - [select for diffs], Wed Mar 8 01:19:40 2006 UTC (17 years, 11 months ago) by elad
Branch: elad-kernelauth
Changes since 1.160: +4 -3 lines
Diff to previous 1.160 (colored)

Adapt to kernel authorization KPI.

Revision 1.159.2.1 / (download) - annotate - [select for diffs], Wed Mar 1 09:28:47 2006 UTC (18 years ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.159: +24 -8 lines
Diff to previous 1.159 (colored) next main 1.160 (colored)

sync with head.

Revision 1.160 / (download) - annotate - [select for diffs], Thu Feb 23 01:35:19 2006 UTC (18 years ago) by christos
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base, elad-kernelauth-base
Branch point for: yamt-pdpolicy, peter-altq, elad-kernelauth
Changes since 1.159: +24 -8 lines
Diff to previous 1.159 (colored)

Handle IPSEC_NAT_T in the FAST_IPSEC case.
XXX: need to fix the FAST_IPSEC code now.

Revision 1.159.4.1 / (download) - annotate - [select for diffs], Tue Feb 7 16:51:50 2006 UTC (18 years ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.159: +3 -3 lines
Diff to previous 1.159 (colored)

sotoinpcb_hdr -> sotoinpcb.

Revision 1.159 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:57 2005 UTC (18 years, 2 months ago) by christos
Branch: MAIN
Branch point for: yamt-uio_vmspace, simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.158: +2 -2 lines
Diff to previous 1.158 (colored)

merge ktrace-lwp.

Revision 1.107.2.11 / (download) - annotate - [select for diffs], Thu Nov 10 14:11:07 2005 UTC (18 years, 3 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.107.2.10: +118 -29 lines
Diff to previous 1.107.2.10 (colored) next main 1.108 (colored)

Sync with HEAD. Here we go again...

Revision 1.149.2.3 / (download) - annotate - [select for diffs], Fri Oct 21 18:55:52 2005 UTC (18 years, 4 months ago) by riz
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, 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-2-RELEASE, netbsd-3-0-1-RELEASE
Branch point for: netbsd-3-1, netbsd-3-0
Changes since 1.149.2.2: +31 -14 lines
Diff to previous 1.149.2.2 (colored) to branchpoint 1.149 (colored)

Pull up following revision(s) (requested by seb in ticket #903):
	sys/netinet/ip_output.c: revisions 1.156 - 1.157
Allow the multicast_ttl and the multicast_loop options to be set with both
u_char and u_int option variables. Original patch from seb.

Revision 1.158 / (download) - annotate - [select for diffs], Mon Sep 19 05:28:46 2005 UTC (18 years, 5 months ago) by dyoung
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
Changes since 1.157: +2 -4 lines
Diff to previous 1.157 (colored)

People have to read this code, so I am removing the double-negative
tautology, #ifndef notdef, which is not only superfluous, but easily
misread as #ifdef notyet.

Revision 1.157 / (download) - annotate - [select for diffs], Sun Sep 11 22:15:19 2005 UTC (18 years, 5 months ago) by seb
Branch: MAIN
Changes since 1.156: +3 -3 lines
Diff to previous 1.156 (colored)

Replace plain 255 by MAXTTL.

Revision 1.156 / (download) - annotate - [select for diffs], Sun Sep 11 21:57:24 2005 UTC (18 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.155: +31 -14 lines
Diff to previous 1.155 (colored)

Allow the multicast_ttl and the multicast_loop options to be set with both
u_char and u_int option variables. Original patch from seb.

Revision 1.155 / (download) - annotate - [select for diffs], Thu Aug 18 00:30:59 2005 UTC (18 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.154: +3 -5 lines
Diff to previous 1.154 (colored)

- introduce M_MOVE_PKTHDR and use it where appropriate.
  intended to be mostly API compatible with openbsd/freebsd.
- remove a glue #define in netipsec/ipsec_osdep.h.

Revision 1.154 / (download) - annotate - [select for diffs], Wed Aug 10 13:06:49 2005 UTC (18 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.153: +2 -4 lines
Diff to previous 1.153 (colored)

move {tcp,udp}_do_loopback_cksum back to tcp/udp
so that they can be referenced by ipv6.

Revision 1.153 / (download) - annotate - [select for diffs], Sun May 29 21:41:23 2005 UTC (18 years, 9 months ago) by christos
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.152: +6 -6 lines
Diff to previous 1.152 (colored)

- add const
- remove bogus casts
- avoid nested variables

Revision 1.149.2.2 / (download) - annotate - [select for diffs], Fri May 6 08:39:44 2005 UTC (18 years, 9 months ago) by tron
Branch: netbsd-3
Changes since 1.149.2.1: +21 -4 lines
Diff to previous 1.149.2.1 (colored) to branchpoint 1.149 (colored)

Pull up revision 1.151 (requested by yamt in ticket #251):
fix problems related to loopback interface checksum omission.  PR/29971.
- for ipv4, defer decision to ip layer as h/w checksum offloading does
  so that it can check the actual interface the packet is going to.
- for ipv6, disable it.
  (maybe will be revisited when it implements h/w checksum offloading.)
ok'ed by Jason Thorpe.

Revision 1.138.2.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:33 2005 UTC (18 years, 10 months ago) by kent
Branch: kent-audio2
Changes since 1.138: +170 -69 lines
Diff to previous 1.138 (colored) next main 1.139 (colored)

sync with -current

Revision 1.152 / (download) - annotate - [select for diffs], Mon Apr 18 22:06:28 2005 UTC (18 years, 10 months ago) by yamt
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.151: +45 -3 lines
Diff to previous 1.151 (colored)

ip_output: handle the case M_CSUM_TSOv4 but !IFCAP_TSOv4.

Revision 1.151 / (download) - annotate - [select for diffs], Mon Apr 18 21:50:25 2005 UTC (18 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.150: +23 -6 lines
Diff to previous 1.150 (colored)

fix problems related to loopback interface checksum omission.  PR/29971.

- for ipv4, defer decision to ip layer as h/w checksum offloading does
  so that it can check the actual interface the packet is going to.
- for ipv6, disable it.
  (maybe will be revisited when it implements h/w checksum offloading.)

ok'ed by Jason Thorpe.

Revision 1.149.2.1 / (download) - annotate - [select for diffs], Wed Apr 13 21:34:51 2005 UTC (18 years, 10 months ago) by tron
Branch: netbsd-3
Changes since 1.149: +22 -3 lines
Diff to previous 1.149 (colored)

Pull up revision 1.150 (requested by yamt in ticket #145):
when doing TSO, avoid to use duplicated ip_id heavily.
XXX ip_randomid

Revision 1.150 / (download) - annotate - [select for diffs], Thu Apr 7 12:22:47 2005 UTC (18 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.149: +22 -3 lines
Diff to previous 1.149 (colored)

when doing TSO, avoid to use duplicated ip_id heavily.
XXX ip_randomid

Revision 1.107.2.10 / (download) - annotate - [select for diffs], Fri Apr 1 14:31:50 2005 UTC (18 years, 11 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.107.2.9: +26 -33 lines
Diff to previous 1.107.2.9 (colored)

Sync with HEAD.

Revision 1.138.4.2 / (download) - annotate - [select for diffs], Sat Mar 19 08:36:38 2005 UTC (18 years, 11 months ago) by yamt
Branch: yamt-km
Changes since 1.138.4.1: +36 -26 lines
Diff to previous 1.138.4.1 (colored) to branchpoint 1.138 (colored) next main 1.139 (colored)

sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.149 / (download) - annotate - [select for diffs], Fri Mar 11 17:07:51 2005 UTC (18 years, 11 months ago) by matt
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Changes since 1.148: +3 -9 lines
Diff to previous 1.148 (colored)

Set ip_len to 0 in the wm driver when TSO is being used.

Revision 1.148 / (download) - annotate - [select for diffs], Thu Mar 10 06:03:00 2005 UTC (18 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.147: +5 -4 lines
Diff to previous 1.147 (colored)

In ip_fragment():
- Use the correct IP header length variable for other-than-first packets.
- Remove redundant setting of the original IP header length in the first
  packet's csum_data.  (It's already set before ip_fragment() is called
  in 1.147.)

Revision 1.147 / (download) - annotate - [select for diffs], Wed Mar 9 03:39:27 2005 UTC (18 years, 11 months ago) by matt
Branch: MAIN
Changes since 1.146: +29 -31 lines
Diff to previous 1.146 (colored)

Move all the hardware-assisted checksum/segment offload code together.

Revision 1.107.2.9 / (download) - annotate - [select for diffs], Tue Mar 8 13:53:12 2005 UTC (18 years, 11 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.107.2.8: +21 -5 lines
Diff to previous 1.107.2.8 (colored)

Sync with HEAD.

Revision 1.146 / (download) - annotate - [select for diffs], Sun Mar 6 00:35:07 2005 UTC (18 years, 11 months ago) by matt
Branch: MAIN
Changes since 1.145: +18 -4 lines
Diff to previous 1.145 (colored)

Add IPv4/TCP hooks for TCP Segment Offload on transmit.

Revision 1.145 / (download) - annotate - [select for diffs], Sat Mar 5 02:46:38 2005 UTC (18 years, 11 months ago) by briggs
Branch: MAIN
Changes since 1.144: +5 -3 lines
Diff to previous 1.144 (colored)

Fix checksum offload for fragmented packets.  From John Heasley
on gnats-bugs in PR kern/29544.
Tested with an NFS client using default rwsize on an NFS server
with wm(4) interface configured IP4CSUM,TCP4CSUM,UDP4CSUM.
Prior revision required the server to have checksum offload disabled.

Revision 1.107.2.8 / (download) - annotate - [select for diffs], Fri Mar 4 16:53:29 2005 UTC (18 years, 11 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.107.2.7: +11 -41 lines
Diff to previous 1.107.2.7 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.144 / (download) - annotate - [select for diffs], Sat Feb 26 22:45:12 2005 UTC (19 years ago) by perry
Branch: MAIN
Changes since 1.143: +9 -9 lines
Diff to previous 1.143 (colored)

nuke trailing whitespace

Revision 1.143 / (download) - annotate - [select for diffs], Fri Feb 18 00:52:56 2005 UTC (19 years ago) by heas
Branch: MAIN
Changes since 1.142: +4 -34 lines
Diff to previous 1.142 (colored)

My last change for pseudo-header checksums was flawed.  The pseudo-header
checksum is always in the L4 header by the time we get to this point.  It
was occasionally not there due to a bug in tcp_respond, which has since
been fixed.
So, instead just stash the length of the L3 header in the high 16 bits of
csum_data.

Revision 1.107.2.7 / (download) - annotate - [select for diffs], Tue Feb 15 21:33:39 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.107.2.6: +75 -7 lines
Diff to previous 1.107.2.6 (colored)

Sync with HEAD.

Revision 1.142 / (download) - annotate - [select for diffs], Sat Feb 12 23:25:29 2005 UTC (19 years ago) by heas
Branch: MAIN
Changes since 1.141: +33 -2 lines
Diff to previous 1.141 (colored)

For controllers (eg: hme & gem) that can only perform linear hardware checksums
(from an offset to the end of the packet), the pseudo-header checksum must be
calculated by software.  So, provide it in the TCP/UDP header when
M_CSUM_NO_PSEUDOHDR is set in the interface's if_csum_flags_tx.

The start offset, the end of the IP header, is also provided in the high 16
bits of pkthdr.csum_data.  Such that the driver need not examine the packet
at all.

XXX At the request of Jonathan Stone, note that sharing of if_csum_flags_tx &
    pkthdr.csum_flags for checksum quirks should be re-evaluated.

Revision 1.138.4.1 / (download) - annotate - [select for diffs], Sat Feb 12 18:17:54 2005 UTC (19 years ago) by yamt
Branch: yamt-km
Changes since 1.138: +59 -46 lines
Diff to previous 1.138 (colored)

sync with head.

Revision 1.141 / (download) - annotate - [select for diffs], Sat Feb 12 12:31:07 2005 UTC (19 years ago) by manu
Branch: MAIN
CVS Tags: yamt-km-base2
Changes since 1.140: +44 -7 lines
Diff to previous 1.140 (colored)

Add support for IPsec Network Address Translator traversal (NAT-T), as
described by RFC 3947 and 3948.

Revision 1.107.2.6 / (download) - annotate - [select for diffs], Fri Feb 4 11:47:48 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.107.2.5: +17 -41 lines
Diff to previous 1.107.2.5 (colored)

Sync with HEAD.

Revision 1.140 / (download) - annotate - [select for diffs], Thu Feb 3 23:13:20 2005 UTC (19 years ago) by perry
Branch: MAIN
Changes since 1.139: +14 -37 lines
Diff to previous 1.139 (colored)

ANSIfy function declarations

Revision 1.139 / (download) - annotate - [select for diffs], Wed Feb 2 21:41:55 2005 UTC (19 years ago) by perry
Branch: MAIN
Changes since 1.138: +5 -6 lines
Diff to previous 1.138 (colored)

de-__P -- will ANSIfy .c files later.

Revision 1.107.2.5 / (download) - annotate - [select for diffs], Sat Dec 18 09:33:05 2004 UTC (19 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.107.2.4: +7 -4 lines
Diff to previous 1.107.2.4 (colored)

Sync with HEAD.

Revision 1.138 / (download) - annotate - [select for diffs], Wed Dec 15 04:25:19 2004 UTC (19 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-km-base, kent-audio1-beforemerge
Branch point for: yamt-km, kent-audio2
Changes since 1.137: +6 -3 lines
Diff to previous 1.137 (colored)

Don't perform checksums on loopback interfaces.  They can be reenabled with
the net.inet.*.do_loopback_cksum sysctl.

Approved by: groo

Revision 1.137 / (download) - annotate - [select for diffs], Sat Dec 4 16:10:25 2004 UTC (19 years, 2 months ago) by peter
Branch: MAIN
CVS Tags: kent-audio1-base, kent-audio1
Changes since 1.136: +3 -3 lines
Diff to previous 1.136 (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.107.2.4 / (download) - annotate - [select for diffs], Tue Oct 19 15:58:15 2004 UTC (19 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.107.2.3: +11 -14 lines
Diff to previous 1.107.2.3 (colored)

Sync with HEAD

Revision 1.136 / (download) - annotate - [select for diffs], Wed Oct 6 05:42:24 2004 UTC (19 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.135: +11 -14 lines
Diff to previous 1.135 (colored)

Slight simplification to IFA_STATS handling.

Revision 1.107.2.3 / (download) - annotate - [select for diffs], Tue Sep 21 13:37:12 2004 UTC (19 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.107.2.2: +2 -2 lines
Diff to previous 1.107.2.2 (colored)

Fix the sync with head I botched.

Revision 1.107.2.2 / (download) - annotate - [select for diffs], Sat Sep 18 14:54:54 2004 UTC (19 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.107.2.1: +14 -11 lines
Diff to previous 1.107.2.1 (colored)

Sync with HEAD.

Revision 1.135 / (download) - annotate - [select for diffs], Sat Sep 4 23:30:07 2004 UTC (19 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.134: +14 -11 lines
Diff to previous 1.134 (colored)

IPv4 PIM support, based on a submission from Pavlin Radoslavov posted on
tech-net@

Revision 1.107.2.1 / (download) - annotate - [select for diffs], Tue Aug 3 10:54:41 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.107: +285 -91 lines
Diff to previous 1.107 (colored)

Sync with HEAD

Revision 1.134 / (download) - annotate - [select for diffs], Tue Jul 6 04:30:27 2004 UTC (19 years, 7 months ago) by minoura
Branch: MAIN
CVS Tags: BEFORE-IPF413
Changes since 1.133: +4 -3 lines
Diff to previous 1.133 (colored)

Remove broken code for now: getsockopt(s, IPPROTO_IP, IP_IPSEC_POLICY,...).
It returned EINVAL, now returns ENOPROTOOPT.
Ok'd by itojun.

Revision 1.133 / (download) - annotate - [select for diffs], Tue Jun 1 05:06:56 2004 UTC (19 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.132: +6 -3 lines
Diff to previous 1.132 (colored)

update mtu value if outgoing interface changes with ipsec ops
(draft-touch-vpn case only?)  iij seil team

Revision 1.132 / (download) - annotate - [select for diffs], Tue May 18 16:47:08 2004 UTC (19 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.131: +5 -5 lines
Diff to previous 1.131 (colored)

Fix buffer overrun in in_pcbopts() (FreeBSD PR/66386)

Revision 1.131 / (download) - annotate - [select for diffs], Mon Apr 26 01:31:57 2004 UTC (19 years, 10 months ago) by matt
Branch: MAIN
Changes since 1.130: +2 -8 lines
Diff to previous 1.130 (colored)

Remove #else clause of __STDC__

Revision 1.130 / (download) - annotate - [select for diffs], Tue Mar 2 02:28:28 2004 UTC (20 years ago) by thorpej
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, BEFORE-IPF411
Changes since 1.129: +11 -4 lines
Diff to previous 1.129 (colored)

Use the new IPSEC_PCB_SKIP_IPSEC() to bypass a socket policy lookup
when possible.  This shaves several cycles from the output path for
non-IPsec connections, even if the policy is cached in the PCB.

Revision 1.129 / (download) - annotate - [select for diffs], Wed Dec 10 11:46:33 2003 UTC (20 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.128: +5 -3 lines
Diff to previous 1.128 (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.128 / (download) - annotate - [select for diffs], Wed Nov 19 18:39:34 2003 UTC (20 years, 3 months ago) by jonathan
Branch: MAIN
Changes since 1.127: +3 -2 lines
Diff to previous 1.127 (colored)

Patch back support for (badly) randomized IP ids, by request:

* Include "opt_inet.h" everywhere IP-ids are generated with ip_newid(),
  so the RANDOM_IP_ID option is visible. Also in ip_id(), to ensure
  the prototype for ip_randomid() is made visible.

* Add new sysctl to enable randomized IP-ids, provided the kernel was
  configured with RANDOM_IP_ID. (The sysctl defaults to zero, and is
  a read-only zero if RANDOM_IP_ID is not configured).

Note that the implementation of randomized IP ids is still defective,
and should not be enabled at all (even if configured) without
very careful deliberation. Caveat emptor.

Revision 1.127 / (download) - annotate - [select for diffs], Mon Nov 17 21:34:27 2003 UTC (20 years, 3 months ago) by jonathan
Branch: MAIN
Changes since 1.126: +3 -3 lines
Diff to previous 1.126 (colored)

Revert the (default) ip_id algorithm to the pre-randomid algorithm,
due to demonstrated low-period repeated IDs from the randomized IP_id
code.  Consensus is that the low-period repetition (much less than
2^15) is not suitable for general-purpose use.

Allocators of new IPv4 IDs should now call the function ip_newid().
Randomized IP_ids is now a config-time option, "options RANDOM_IP_ID".
ip_newid() can use ip_random-id()_IP_ID if and only if configured
with RANDOM_IP_ID. A sysctl knob should be  provided.

This API may be reworked in the near future to support linear ip_id
counters per (src,dst) IP-address pair.

Revision 1.126 / (download) - annotate - [select for diffs], Fri Oct 17 20:31:12 2003 UTC (20 years, 4 months ago) by enami
Branch: MAIN
Changes since 1.125: +7 -3 lines
Diff to previous 1.125 (colored)

Increment stats when packet is dropped since there is no room
to put all fragments in the interfaces's send queue.  Some large
UDP packets are dropped here and administrator may want to bump ifqmaxlen.

Revision 1.125 / (download) - annotate - [select for diffs], Tue Oct 14 06:36:48 2003 UTC (20 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.124: +3 -3 lines
Diff to previous 1.124 (colored)

more correction to ip_fragment; free mbuf correctly if ENOBUFS is raised
during fragmenting.

Revision 1.124 / (download) - annotate - [select for diffs], Tue Oct 14 03:38:49 2003 UTC (20 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.123: +15 -4 lines
Diff to previous 1.123 (colored)

avoid mbuf leak on ip_fragment(); obey 4.4bsd mbuf passing rule (mbuf passed
to a function must be freed by the called function on error).
pointed out by enami

Revision 1.123 / (download) - annotate - [select for diffs], Fri Oct 3 20:56:11 2003 UTC (20 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.122: +4 -3 lines
Diff to previous 1.122 (colored)

when dropping M_PKTHDR, need to free m_tag associated with it.

Revision 1.122 / (download) - annotate - [select for diffs], Wed Oct 1 23:54:40 2003 UTC (20 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.121: +6 -5 lines
Diff to previous 1.121 (colored)

correct ip_fragment() wrt ip->ip_off handling.
do not send out incomplete fragment due to ENOBUFS (behavior change from 4.4BSD)

Revision 1.121 / (download) - annotate - [select for diffs], Fri Sep 19 00:27:56 2003 UTC (20 years, 5 months ago) by jonathan
Branch: MAIN
Changes since 1.120: +3 -3 lines
Diff to previous 1.120 (colored)

Fast-ipsec can call ip_output() with a null 'struct socket *so'
argument.  So check so is non-NULL before doing the pointer-chasing
dance to find the PCB. (Unless and until we rework fast-ipsec and
KAME, to pass a struct in_pcbhdr * instead of the struct socket *).

Revision 1.120 / (download) - annotate - [select for diffs], Sat Sep 6 03:36:30 2003 UTC (20 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.119: +3 -3 lines
Diff to previous 1.119 (colored)

randomize IPv4/v6 fragment ID and IPv6 flowlabel.  avoids predictability
of these fields.  ip_id.c is from openbsd.  ip6_id.c is adapted by kame.

Revision 1.119 / (download) - annotate - [select for diffs], Wed Aug 27 02:09:59 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.118: +3 -3 lines
Diff to previous 1.118 (colored)

don't intiialize m by m0, m0 is not initialized (by introduction of ip_fragment)

Revision 1.118 / (download) - annotate - [select for diffs], Sat Aug 23 01:41:10 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.117: +5 -2 lines
Diff to previous 1.117 (colored)

need sys/domain.h for FAST_IPSEC case; jonathan

Revision 1.117 / (download) - annotate - [select for diffs], Fri Aug 22 22:00:37 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.116: +2 -6 lines
Diff to previous 1.116 (colored)

remove ipsec_set/getsocket.  now we explicitly pass socket * to ip{,6}_output.

Revision 1.116 / (download) - annotate - [select for diffs], Fri Aug 22 21:53:04 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.115: +12 -7 lines
Diff to previous 1.115 (colored)

change the additional arg to be passed to ip{,6}_output to struct socket *.

this fixes KAME policy lookup which was broken by the previous commit.

Revision 1.115 / (download) - annotate - [select for diffs], Fri Aug 22 20:29:00 2003 UTC (20 years, 6 months ago) by jonathan
Branch: MAIN
Changes since 1.114: +5 -4 lines
Diff to previous 1.114 (colored)

Change KAME code for ip_output()/ip6_output() to obtain struct socket*
from the explicit inpcb*/in6pcb* argument.  set_socket() becomes redundant.

Revision 1.114 / (download) - annotate - [select for diffs], Tue Aug 19 08:00:54 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.113: +2 -4 lines
Diff to previous 1.113 (colored)

remove unneeded #ifdef __NetBSD__

Revision 1.113 / (download) - annotate - [select for diffs], Tue Aug 19 01:20:03 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.112: +3 -4 lines
Diff to previous 1.112 (colored)

make ip_fragment public (it is for coming PF integration)

Revision 1.112 / (download) - annotate - [select for diffs], Tue Aug 19 00:54:41 2003 UTC (20 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.111: +4 -3 lines
Diff to previous 1.111 (colored)

make ip_fragment static and add prototype.

Revision 1.111 / (download) - annotate - [select for diffs], Tue Aug 19 00:17:38 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.110: +6 -4 lines
Diff to previous 1.110 (colored)

correct ip_multicast_if fix to always set ifp (tnx Shiva)

Revision 1.110 / (download) - annotate - [select for diffs], Mon Aug 18 22:23:22 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.109: +88 -64 lines
Diff to previous 1.109 (colored)

fix problem we can't drop membership on !IFF_UP interface.
reported by Shiva Shenoy

while we're here, fix another problem when the same interface address is
assigned to !IFF_MULTICAST and IFF_MULTICAST interface.  if ip_multicast_if()
returns the first one, join/leave will fail, which is not an desired effect.

Revision 1.109 / (download) - annotate - [select for diffs], Fri Aug 15 03:42:03 2003 UTC (20 years, 6 months ago) by jonathan
Branch: MAIN
Changes since 1.108: +150 -6 lines
Diff to previous 1.108 (colored)

(fast-ipsec): Add hooks to pass IPv4 IPsec traffic into fast-ipsec, if
configured with ``options FAST_IPSEC''.  Kernels with KAME IPsec or
with no IPsec should work as before.

All calls to ip_output() now always pass an additional compulsory
argument: the inpcb associated with the packet being sent,
or 0 if no inpcb is available.

Fast-ipsec tested with ICMP or UDP over ESP. TCP doesn't work, yet.

Revision 1.108 / (download) - annotate - [select for diffs], Thu Aug 7 16:33:14 2003 UTC (20 years, 6 months ago) by agc
Branch: MAIN
Changes since 1.107: +3 -7 lines
Diff to previous 1.107 (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.74.4.4 / (download) - annotate - [select for diffs], Mon Aug 4 19:48:36 2003 UTC (20 years, 6 months ago) by msaitoh
Branch: netbsd-1-5
Changes since 1.74.4.3: +2 -5 lines
Diff to previous 1.74.4.3 (colored) to branchpoint 1.74 (colored) next main 1.75 (colored)

Pull up revision 1.106-1.107 (requested by itojun in ticket #53):
 after pfil_run_hooks, need to fix hlen as well.
 freebsd code somehow crept in.

Revision 1.95.10.3 / (download) - annotate - [select for diffs], Mon Jun 30 03:25:22 2003 UTC (20 years, 8 months ago) by grant
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002
Changes since 1.95.10.2: +4 -8 lines
Diff to previous 1.95.10.2 (colored) to branchpoint 1.95 (colored) next main 1.96 (colored)

Pull up revisions 1.106-1.107 (requested by itojun in ticket #1358):

after pfil_run_hooks, need to fix hlen as well

freebsd code somehow crept in

Revision 1.107 / (download) - annotate - [select for diffs], Mon Jun 30 02:08:28 2003 UTC (20 years, 8 months ago) by itojun
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.106: +2 -6 lines
Diff to previous 1.106 (colored)

freebsd code somehow crept in

Revision 1.106 / (download) - annotate - [select for diffs], Mon Jun 30 01:22:51 2003 UTC (20 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.105: +4 -4 lines
Diff to previous 1.105 (colored)

after pfil_run_hooks, need to fix hlen as well

Revision 1.105 / (download) - annotate - [select for diffs], Thu Jun 26 00:43:32 2003 UTC (20 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.104: +3 -3 lines
Diff to previous 1.104 (colored)

tabify

Revision 1.104 / (download) - annotate - [select for diffs], Mon May 26 15:12:11 2003 UTC (20 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.103: +22 -10 lines
Diff to previous 1.103 (colored)

- don't pass mbufs with M_CSUM_* flags which isn't supported by the interface
  to if_output.
- offload ip-checksumming for each fragmented packets as well.

Revision 1.103 / (download) - annotate - [select for diffs], Wed Feb 26 06:31:15 2003 UTC (21 years ago) by matt
Branch: MAIN
Changes since 1.102: +10 -2 lines
Diff to previous 1.102 (colored)

Add MBUFTRACE kernel option.
Do a little mbuf rework while here.  Change all uses of MGET*(*, M_WAIT, *)
to m_get*(M_WAIT, *).  These are not performance critical and making them
call m_get saves considerable space.  Add m_clget analogue of MCLGET and
make corresponding change for M_WAIT uses.
Modify netinet, gem, fxp, tulip, nfs to support MBUFTRACE.
Begin to change netstat to use sysctl.

Revision 1.74.4.3 / (download) - annotate - [select for diffs], Sun Dec 15 15:20:21 2002 UTC (21 years, 2 months ago) by he
Branch: netbsd-1-5
Changes since 1.74.4.2: +4 -2 lines
Diff to previous 1.74.4.2 (colored) to branchpoint 1.74 (colored)

Pull up revision 1.102 (requested by darrenr):
  Initialize len and check what ip_insertoptions() returns.
  In some rare cases there might not be sufficient room for
  the options.

Revision 1.95.10.2 / (download) - annotate - [select for diffs], Fri Nov 1 12:14:28 2002 UTC (21 years, 4 months ago) by tron
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Changes since 1.95.10.1: +21 -8 lines
Diff to previous 1.95.10.1 (colored) to branchpoint 1.95 (colored)

Pull up revision 1.98-1.99 (requested by itojun in ticket #356):
do not consult routing table under the following condition:
- - the destination is IPv4 multicast or 255.255.255.255, and
- - outgoing interface is specified via socket option
this simplifies operation of routed
(no longer require 224.0.0.0/4 to be set up)

Revision 1.86.2.7 / (download) - annotate - [select for diffs], Thu Oct 10 18:44:02 2002 UTC (21 years, 4 months ago) by jdolecek
Branch: kqueue
Changes since 1.86.2.6: +6 -4 lines
Diff to previous 1.86.2.6 (colored) next main 1.87 (colored)

sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work

Revision 1.95.10.1 / (download) - annotate - [select for diffs], Mon Sep 30 13:05:29 2002 UTC (21 years, 5 months ago) by lukem
Branch: netbsd-1-6
Changes since 1.95: +5 -3 lines
Diff to previous 1.95 (colored)

Pull up revision 1.102 (requested by darrenr in ticket #842):
From FreeBSD (1.164) courtesy of Maxim Konovalov:
"In rare cases when there is no room for ip options ip_insertoptions()
can fail and corrupt a header length.  Initialize len and check what
ip_insertoptions() returns."

Revision 1.83.2.16 / (download) - annotate - [select for diffs], Fri Sep 20 23:40:51 2002 UTC (21 years, 5 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.83.2.15: +5 -3 lines
Diff to previous 1.83.2.15 (colored) next main 1.84 (colored)

Sync with HEAD.

Revision 1.83.2.15 / (download) - annotate - [select for diffs], Tue Sep 17 21:23:05 2002 UTC (21 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.83.2.14: +1 -1 lines
Diff to previous 1.83.2.14 (colored)

Catch up to -current.

Revision 1.102 / (download) - annotate - [select for diffs], Tue Sep 17 13:10:59 2002 UTC (21 years, 5 months ago) by darrenr
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
Changes since 1.101: +5 -3 lines
Diff to previous 1.101 (colored)

From FreeBSD (1.164) courtesy of Maxim Konovalov:
"In rare cases when there is no room for ip options ip_insertoptions()
can fail and corrupt a header length.  Initialize len and check what
ip_insertoptions() returns."

Revision 1.101 / (download) - annotate - [select for diffs], Wed Sep 11 02:46:43 2002 UTC (21 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.100: +3 -3 lines
Diff to previous 1.100 (colored)

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

Revision 1.86.2.6 / (download) - annotate - [select for diffs], Fri Sep 6 08:49:16 2002 UTC (21 years, 5 months ago) by jdolecek
Branch: kqueue
Changes since 1.86.2.5: +36 -39 lines
Diff to previous 1.86.2.5 (colored)

sync kqueue branch with HEAD

Revision 1.95.8.3 / (download) - annotate - [select for diffs], Thu Aug 29 00:56:47 2002 UTC (21 years, 6 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.95.8.2: +17 -33 lines
Diff to previous 1.95.8.2 (colored) to branchpoint 1.95 (colored) next main 1.96 (colored)

catch up with -current.

Revision 1.83.2.14 / (download) - annotate - [select for diffs], Tue Aug 27 23:48:02 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.83.2.13: +15 -31 lines
Diff to previous 1.83.2.13 (colored)

Catch up to -current.

Revision 1.100 / (download) - annotate - [select for diffs], Wed Aug 14 00:23:32 2002 UTC (21 years, 6 months ago) by itojun
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.99: +17 -33 lines
Diff to previous 1.99 (colored)

avoid swapping endian of ip_len and ip_off on mbuf, to meet with M_LEADINGSPACE
optimization made last year.  should solve PR 17867 and 10195.

IP_HDRINCL behavior of raw ip socket is kept unchanged.  we may want to
provide IP_HDRINCL variant that does not swap endian.

Revision 1.83.2.13 / (download) - annotate - [select for diffs], Thu Aug 1 02:46:48 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.83.2.12: +21 -8 lines
Diff to previous 1.83.2.12 (colored)

Catch up to -current.

Revision 1.95.8.2 / (download) - annotate - [select for diffs], Mon Jul 15 10:36:59 2002 UTC (21 years, 7 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.95.8.1: +21 -8 lines
Diff to previous 1.95.8.1 (colored) to branchpoint 1.95 (colored)

catch up with -current.

Revision 1.83.2.12 / (download) - annotate - [select for diffs], Fri Jul 12 01:40:32 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.83.2.11: +2 -3 lines
Diff to previous 1.83.2.11 (colored)

No longer need to pull in lwp.h; proc.h pulls it in for us.

Revision 1.83.2.11 / (download) - annotate - [select for diffs], Mon Jun 24 22:11:47 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.83.2.10: +3 -3 lines
Diff to previous 1.83.2.10 (colored)

Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).

Revision 1.99 / (download) - annotate - [select for diffs], Mon Jun 24 08:11:30 2002 UTC (21 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.98: +3 -2 lines
Diff to previous 1.98 (colored)

set ia as well

Revision 1.98 / (download) - annotate - [select for diffs], Mon Jun 24 08:01:35 2002 UTC (21 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.97: +20 -8 lines
Diff to previous 1.97 (colored)

do not consult routing table under the following condition:
- the destination is IPv4 multicast or 255.255.255.255, and
- outgoing interface is specified via socket option

this simplifies operation of routed
(no longer reqiure 224.0.0.0/4 to be set up)

Revision 1.86.2.5 / (download) - annotate - [select for diffs], Sun Jun 23 17:50:56 2002 UTC (21 years, 8 months ago) by jdolecek
Branch: kqueue
Changes since 1.86.2.4: +8 -8 lines
Diff to previous 1.86.2.4 (colored)

catch up with -current on kqueue branch

Revision 1.95.8.1 / (download) - annotate - [select for diffs], Thu Jun 20 15:52:24 2002 UTC (21 years, 8 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.95: +8 -8 lines
Diff to previous 1.95 (colored)

catch up with -current.

Revision 1.83.2.10 / (download) - annotate - [select for diffs], Thu Jun 20 03:48:49 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.83.2.9: +8 -8 lines
Diff to previous 1.83.2.9 (colored)

Catch up to -current.

Revision 1.97 / (download) - annotate - [select for diffs], Sun Jun 9 16:33:42 2002 UTC (21 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.96: +7 -7 lines
Diff to previous 1.96 (colored)

whitespace

Revision 1.96 / (download) - annotate - [select for diffs], Fri May 31 05:26:42 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.95: +3 -3 lines
Diff to previous 1.95 (colored)

since if_mtu is u_long, use u_long for mtu.

Revision 1.86.2.4 / (download) - annotate - [select for diffs], Sat Mar 16 16:02:13 2002 UTC (21 years, 11 months ago) by jdolecek
Branch: kqueue
Changes since 1.86.2.3: +5 -4 lines
Diff to previous 1.86.2.3 (colored)

Catch up with -current.

Revision 1.83.2.9 / (download) - annotate - [select for diffs], Thu Feb 28 04:15:09 2002 UTC (22 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.83.2.8: +16 -4 lines
Diff to previous 1.83.2.8 (colored)

Catch up to -current.

Revision 1.86.2.3 / (download) - annotate - [select for diffs], Mon Feb 11 20:10:36 2002 UTC (22 years ago) by jdolecek
Branch: kqueue
Changes since 1.86.2.2: +13 -2 lines
Diff to previous 1.86.2.2 (colored)

Sync w/ -current.

Revision 1.95 / (download) - annotate - [select for diffs], Thu Feb 7 21:47:45 2002 UTC (22 years ago) by thorpej
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, ifpoll-base, eeh-devprop-base, eeh-devprop
Branch point for: netbsd-1-6, gehenna-devsw
Changes since 1.94: +5 -4 lines
Diff to previous 1.94 (colored)

IFF_POINTTOPOINT interfaces can also transmit packets to broadcast
destinations.

Revision 1.94 / (download) - annotate - [select for diffs], Wed Feb 6 18:00:01 2002 UTC (22 years ago) by thorpej
Branch: MAIN
Changes since 1.93: +3 -3 lines
Diff to previous 1.93 (colored)

ip_mloopback(): process the delayed checksum on the copy, not
the original mbuf.

Revision 1.93 / (download) - annotate - [select for diffs], Thu Jan 31 07:45:22 2002 UTC (22 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.92: +9 -2 lines
Diff to previous 1.92 (colored)

correct bad ip checksum on multicast loopback packet.  PR14597

Revision 1.92 / (download) - annotate - [select for diffs], Tue Jan 22 03:53:55 2002 UTC (22 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.91: +6 -2 lines
Diff to previous 1.91 (colored)

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

Revision 1.74.4.2 / (download) - annotate - [select for diffs], Mon Jan 14 15:44:38 2002 UTC (22 years, 1 month ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003
Changes since 1.74.4.1: +5 -1 lines
Diff to previous 1.74.4.1 (colored) to branchpoint 1.74 (colored)

Pull up revision 1.91 (requested by itojun):
  Avoid kernel panic on IPv4 multicast packet transmission if there
  is no IPv4 address assigned to the specified outgoing interface.

Revision 1.83.2.8 / (download) - annotate - [select for diffs], Fri Jan 11 23:39:46 2002 UTC (22 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.83.2.7: +6 -2 lines
Diff to previous 1.83.2.7 (colored)

More catchup.

Revision 1.86.2.2 / (download) - annotate - [select for diffs], Thu Jan 10 20:02:54 2002 UTC (22 years, 1 month ago) by thorpej
Branch: kqueue
Changes since 1.86.2.1: +13 -5 lines
Diff to previous 1.86.2.1 (colored)

Sync kqueue branch with -current.

Revision 1.91 / (download) - annotate - [select for diffs], Tue Jan 8 10:05:13 2002 UTC (22 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.90: +6 -2 lines
Diff to previous 1.90 (colored)

don't panic when there's no interface address exist for the specified multicast
outgoing interface (ia == NULL after IFP_TO_IA).

historic behavior (up to revision 1.43) was to use 0.0.0.0 as source address,
but it seems like a mistake according to RFC1112/1122.

Revision 1.83.2.7 / (download) - annotate - [select for diffs], Tue Jan 8 00:34:09 2002 UTC (22 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.83.2.6: +5 -4 lines
Diff to previous 1.83.2.6 (colored)

Catch up to -current.

Revision 1.90 / (download) - annotate - [select for diffs], Wed Nov 21 06:28:08 2001 UTC (22 years, 3 months ago) by itojun
Branch: MAIN
Changes since 1.89: +5 -4 lines
Diff to previous 1.89 (colored)

update outgoing ifp, only if tunnel mode ipsec is used.  this is to
honor IP_MULTICAST_IF setsockopt on ipsec-over-multicast.  sync with kame

Revision 1.83.2.6 / (download) - annotate - [select for diffs], Wed Nov 14 19:17:53 2001 UTC (22 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.83.2.5: +4 -1 lines
Diff to previous 1.83.2.5 (colored)

Catch up to -current.

Revision 1.89 / (download) - annotate - [select for diffs], Tue Nov 13 00:32:39 2001 UTC (22 years, 3 months ago) by lukem
Branch: MAIN
Changes since 1.88: +4 -1 lines
Diff to previous 1.88 (colored)

add RCSIDs

Revision 1.87.2.1 / (download) - annotate - [select for diffs], Mon Oct 1 12:47:44 2001 UTC (22 years, 5 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.87: +3 -3 lines
Diff to previous 1.87 (colored) next main 1.88 (colored)

Catch up with -current.

Revision 1.83.2.5 / (download) - annotate - [select for diffs], Fri Sep 21 22:36:49 2001 UTC (22 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.83.2.4: +3 -3 lines
Diff to previous 1.83.2.4 (colored)

Catch up to -current.

Revision 1.88 / (download) - annotate - [select for diffs], Mon Sep 17 17:27:00 2001 UTC (22 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, thorpej-mips-cache, thorpej-devvp-base3, thorpej-devvp-base2
Changes since 1.87: +3 -3 lines
Diff to previous 1.87 (colored)

Split the pre-computed ifnet checksum flags into Tx and Rx directions.
Add capabilities bits that indicate an interface can only perform
in-bound TCPv4 or UDPv4 checksums.  There is at least one Gig-E chip
for which this is true (Level One LXT-1001), and this is also the
case for the Intel i82559 10/100 Ethernet chips.

Revision 1.86.2.1 / (download) - annotate - [select for diffs], Sat Aug 25 06:17:03 2001 UTC (22 years, 6 months ago) by thorpej
Branch: kqueue
Changes since 1.86: +6 -4 lines
Diff to previous 1.86 (colored)

Merge Aug 24 -current into the kqueue branch.

Revision 1.83.2.4 / (download) - annotate - [select for diffs], Fri Aug 24 00:12:27 2001 UTC (22 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.83.2.3: +6 -4 lines
Diff to previous 1.83.2.3 (colored)

Catch up with -current.

Revision 1.87 / (download) - annotate - [select for diffs], Sat Aug 11 12:26:50 2001 UTC (22 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: thorpej-devvp-base, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-devvp
Changes since 1.86: +6 -4 lines
Diff to previous 1.86 (colored)

fix cksum error of udp and tcp packet with ip options

Revision 1.83.2.3 / (download) - annotate - [select for diffs], Thu Jun 21 20:08:41 2001 UTC (22 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.83.2.2: +79 -10 lines
Diff to previous 1.83.2.2 (colored)

Catch up to -current.

Revision 1.86 / (download) - annotate - [select for diffs], Sat Jun 2 16:17:10 2001 UTC (22 years, 9 months ago) by thorpej
Branch: MAIN
Branch point for: kqueue
Changes since 1.85: +77 -4 lines
Diff to previous 1.85 (colored)

Implement support for IP/TCP/UDP checksum offloading provided by
network interfaces.  This works by pre-computing the pseudo-header
checksum and caching it, delaying the actual checksum to ip_output()
if the hardware cannot perform the sum for us.  In-bound checksums
can either be fully-checked by hardware, or summed up for final
verification by software.  This method was modeled after how this
is done in FreeBSD, although the code is significantly different in
most places.

We don't delay checksums for IPv6/TCP, but we do take advantage of the
cached pseudo-header checksum.

Note: hardware-assisted checksumming defaults to "off".  It is
enabled with ifconfig(8).  See the manual page for details.

Implement hardware-assisted checksumming on the DP83820 Gigabit Ethernet,
3c90xB/3c90xC 10/100 Ethernet, and Alteon Tigon/Tigon2 Gigabit Ethernet.

Revision 1.85 / (download) - annotate - [select for diffs], Sat May 26 21:27:09 2001 UTC (22 years, 9 months ago) by ragge
Branch: MAIN
Changes since 1.84: +2 -6 lines
Diff to previous 1.84 (colored)

Remove one #ifdef vax, bugfix another. Should probably be #ifdef i386 also.

Revision 1.62.2.6 / (download) - annotate - [select for diffs], Sat Apr 21 17:46:51 2001 UTC (22 years, 10 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.62.2.5: +2 -2 lines
Diff to previous 1.62.2.5 (colored) to branchpoint 1.62 (colored) next main 1.63 (colored)

Sync with HEAD

Revision 1.84 / (download) - annotate - [select for diffs], Fri Apr 13 23:30:24 2001 UTC (22 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Changes since 1.83: +2 -2 lines
Diff to previous 1.83 (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.74.4.1 / (download) - annotate - [select for diffs], Fri Apr 6 00:25:20 2001 UTC (22 years, 10 months ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH002, netbsd-1-5-PATCH001
Changes since 1.74: +30 -21 lines
Diff to previous 1.74 (colored)

Pull up revision 1.82 (via patch, requested by itojun):
  Record IPsec packet history in m_aux structure.  Let ipfilter
  look at wire-format packet only (not the decapsulated ones), so
  that VPN setting can work with NAT/ipfilter settings.

Revision 1.83.2.2 / (download) - annotate - [select for diffs], Tue Mar 13 20:29:49 2001 UTC (22 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.83.2.1: +2 -2 lines
Diff to previous 1.83.2.1 (colored)

Be more careful not to dereference curproc when there might not be
a process context.

Revision 1.62.2.5 / (download) - annotate - [select for diffs], Mon Mar 12 13:31:50 2001 UTC (22 years, 11 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.62.2.4: +1 -11 lines
Diff to previous 1.62.2.4 (colored) to branchpoint 1.62 (colored)

Sync with HEAD.

Revision 1.83.2.1 / (download) - annotate - [select for diffs], Mon Mar 5 22:49:56 2001 UTC (22 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.83: +3 -2 lines
Diff to previous 1.83 (colored)

Initial commit of scheduler activations and lightweight process support.

Revision 1.83 / (download) - annotate - [select for diffs], Tue Feb 27 10:32:03 2001 UTC (23 years ago) by itojun
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.82: +1 -11 lines
Diff to previous 1.82 (colored)

remove obsolete #if 0'ed section
(IPsec and DF bit interaction - the code was incorrect anyways)

Revision 1.62.2.4 / (download) - annotate - [select for diffs], Sun Feb 11 19:17:16 2001 UTC (23 years ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.62.2.3: +23 -15 lines
Diff to previous 1.62.2.3 (colored) to branchpoint 1.62 (colored)

Sync with HEAD.

Revision 1.82 / (download) - annotate - [select for diffs], Wed Jan 24 09:04:15 2001 UTC (23 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.81: +23 -15 lines
Diff to previous 1.81 (colored)

- record IPsec packet history into m_aux structure.
- let ipfilter look at wire-format packet only (not the decapsulated ones),
  so that VPN setting can work with NAT/ipfilter settings.
sync with kame.

TODO: use header history for stricter inbound validation

Revision 1.62.2.3 / (download) - annotate - [select for diffs], Thu Jan 18 09:23:56 2001 UTC (23 years, 1 month ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.62.2.2: +41 -5 lines
Diff to previous 1.62.2.2 (colored) to branchpoint 1.62 (colored)

Sync with head (for UBC+NFS fixes, mostly).

Revision 1.81 / (download) - annotate - [select for diffs], Sat Jan 13 07:19:33 2001 UTC (23 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.80: +41 -5 lines
Diff to previous 1.80 (colored)

allow IP_MULTICAST_IF and IP_ADD/DROP_MEMBERSHIP to specify interface
by interface index.  if the interface address specified is in 0.0.0.0/8
it will be considered as interface index in network byteorder.

getsockopt(IP_MULTICAST_IF) preserves old behavior if
setsockopt(IP_MULTICAST_IF) was done with interface address, and
returns interface index if setsockopt(IP_MULTICAST_IF) was done with
interface index (again using the form in 0.0.0.0/8).

Suggested by Dave Thaler, based on RIPv2 MIB spec (RFC1724 section 3.3).

http://mail-index.netbsd.org/tech-net/2001/01/13/0003.html

Revision 1.80 / (download) - annotate - [select for diffs], Sat Jan 13 06:01:18 2001 UTC (23 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.79: +2 -2 lines
Diff to previous 1.79 (colored)

on getsockopt(IP_IPSEC_POLICY), make sure to initialize len

Revision 1.62.2.2 / (download) - annotate - [select for diffs], Wed Nov 22 16:06:11 2000 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.62.2.1: +37 -30 lines
Diff to previous 1.62.2.1 (colored) to branchpoint 1.62 (colored)

Sync with HEAD.

Revision 1.62.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:10:32 2000 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.62: +111 -66 lines
Diff to previous 1.62 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.79 / (download) - annotate - [select for diffs], Sat Nov 11 00:55:51 2000 UTC (23 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.78: +2 -4 lines
Diff to previous 1.78 (colored)

Actually, our local ip_off variable isn't needed.

Revision 1.78 / (download) - annotate - [select for diffs], Sat Nov 11 00:52:39 2000 UTC (23 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.77: +39 -30 lines
Diff to previous 1.77 (colored)

Restructure the PFIL_HOOKS mechanism a bit:
- All packets are passed to PFIL_HOOKS as they come off the wire, i.e.
  fields in protocol headers in network order, etc.
- Allow for multiple hooks to be registered, using a "key" and a "dlt".
  The "dlt" is a BPF data link type, indicating what type of header is
  present.
- INET and INET6 register with key == AF_INET or AF_INET6, and
  dlt == DLT_RAW.
- PFIL_HOOKS now take an argument for the filter hook, and mbuf **,
  an ifnet *, and a direction (PFIL_IN or PFIL_OUT), thus making them
  less IP (really, IP Filter) centric.

Maintain compatibility with IP Filter by adding wrapper functions for
IP Filter.

Revision 1.77 / (download) - annotate - [select for diffs], Mon Oct 23 03:42:18 2000 UTC (23 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.76: +4 -15 lines
Diff to previous 1.76 (colored)

fix IFA_STATS.
- use hashed in_ifaddr lookup.
- correct endianness.

Revision 1.76 / (download) - annotate - [select for diffs], Tue Oct 17 02:57:01 2000 UTC (23 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.75: +9 -1 lines
Diff to previous 1.75 (colored)

Add an IP_MTUDISC flag to the flags that can be passed to
ip_output().  This flag, if set, causes ip_output() to set
DF in the IP header if the MTU in the route is not locked.

This allows a bunch of redundant code, which I was never
really all that happy about adding in the first place, to
be eliminated.

Inspired by a similar change made by provos@openbsd.org when
he integrated NetBSD's Path MTU Discovery code into OpenBSD.

Revision 1.75 / (download) - annotate - [select for diffs], Wed Jun 28 02:59:32 2000 UTC (23 years, 8 months ago) by mrg
Branch: MAIN
Changes since 1.74: +1 -3 lines
Diff to previous 1.74 (colored)

remove include of <vm/vm.h>

Revision 1.74 / (download) - annotate - [select for diffs], Wed May 10 03:31:30 2000 UTC (23 years, 9 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.73: +14 -4 lines
Diff to previous 1.73 (colored)

add missing boundary checks to ip options processing.
correct timestamp option validation (len and ptr upper/lower bound
based on RFC791).
fill "pointer" field for parameter problem in timestamp option processing.

Revision 1.58.2.3 / (download) - annotate - [select for diffs], Sun Apr 30 10:34:33 2000 UTC (23 years, 10 months ago) by he
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH003
Changes since 1.58.2.2: +3 -1 lines
Diff to previous 1.58.2.2 (colored) to branchpoint 1.58 (colored) next main 1.59 (colored)

Pull up revision 1.73 (requested by is):
  Pass M_BCAST and M_MCAST flags to fragments.  Fixes PR#9772.

Revision 1.73 / (download) - annotate - [select for diffs], Thu Apr 13 11:48:07 2000 UTC (23 years, 10 months ago) by is
Branch: MAIN
Changes since 1.72: +3 -1 lines
Diff to previous 1.72 (colored)

Copy M_BCAST and M_MCAST flags when fragmenting a packet (else
Multicast packets won't be send to the correct link layer address
by the interface driver).
By Artur Grabowski, PR 9772.

Revision 1.72 / (download) - annotate - [select for diffs], Fri Mar 31 14:31:03 2000 UTC (23 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.71: +5 -1 lines
Diff to previous 1.71 (colored)

Since last duplicate prototype cleanup, we need to include
<netinet/ip_mroute.h> to get ip_mforward() prototype if MROUTING
is defined.

Revision 1.71 / (download) - annotate - [select for diffs], Thu Mar 30 13:25:02 2000 UTC (23 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.70: +29 -29 lines
Diff to previous 1.70 (colored)

Remove register declarations.

Revision 1.70 / (download) - annotate - [select for diffs], Wed Mar 22 06:10:39 2000 UTC (23 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.69: +2 -2 lines
Diff to previous 1.69 (colored)

tabify a line.

Revision 1.69 / (download) - annotate - [select for diffs], Wed Mar 1 12:49:35 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.68: +4 -3 lines
Diff to previous 1.68 (colored)

introduce m->m_pkthdr.aux to hold random data which needs to be passed
between protocol handlers.

ipsec socket pointers, ipsec decryption/auth information, tunnel
decapsulation information are in my mind - there can be several other usage.
at this moment, we use this for ipsec socket pointer passing.  this will
avoid reuse of m->m_pkthdr.rcvif in ipsec code.

due to the change, MHLEN will be decreased by sizeof(void *) - for example,
for i386, MHLEN was 100 bytes, but is now 96 bytes.
we may want to increase MSIZE from 128 to 256 for some of our architectures.

take caution if you use it for keeping some data item for long period
of time - use extra caution on M_PREPEND() or m_adj(), as they may result
in loss of m->m_pkthdr.aux pointer (and mbuf leak).

this will bump kernel version.

(as discussed in tech-net, tested in kame tree)

Revision 1.68 / (download) - annotate - [select for diffs], Sun Feb 20 00:56:40 2000 UTC (24 years ago) by darrenr
Branch: MAIN
Changes since 1.67: +2 -2 lines
Diff to previous 1.67 (colored)

pass "struct pfil_head *" to pfil_add_hook and pfil_remove hook rather
than "struct protosw *".

Revision 1.67 / (download) - annotate - [select for diffs], Thu Feb 17 10:59:35 2000 UTC (24 years ago) by darrenr
Branch: MAIN
Changes since 1.66: +3 -2 lines
Diff to previous 1.66 (colored)

Change the use of pfil hooks.  There is no longer a single list of all
pfil information, instead, struct protosw now contains a structure
which caontains list heads, etc.  The per-protosw pfil struct is passed
to pfil_hook_get(), along with an in/out flag to get the head of the
relevant filter list.  This has been done for only IPv4 and IPv6, at
present, with these patches only enabling filtering for IPPROTO_IP and
IPPROTO_IPV6, although it is possible to have tcp/udp, etc, dedicated
filters now also.  The ipfilter code has been updated to only filter
IPv4 packets - next major release of ipfilter is required for ipv6.

Revision 1.66 / (download) - annotate - [select for diffs], Mon Jan 31 14:18:55 2000 UTC (24 years, 1 month ago) by itojun
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.65: +18 -9 lines
Diff to previous 1.65 (colored)

bring in latest KAME ipsec tree.
- interop issues in ipcomp is fixed
- padding type (after ESP) is configurable
- key database memory management (need more fixes)
- policy specification is revisited

XXX m->m_pkthdr.rcvif is still overloaded - hope to fix it soon

Revision 1.62.8.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:36:17 1999 UTC (24 years, 2 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.62: +42 -19 lines
Diff to previous 1.62 (colored) next main 1.63 (colored)

Pull up to last week's -current.

Revision 1.58.2.2 / (download) - annotate - [select for diffs], Mon Dec 20 15:48:26 1999 UTC (24 years, 2 months ago) by he
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH002
Changes since 1.58.2.1: +4 -1 lines
Diff to previous 1.58.2.1 (colored) to branchpoint 1.58 (colored)

Pull up revision 1.65 (requested by itojun):
  Avoid panic caused by shared cluster mbuf overwrite on multicast
  packet loopback for packets with certain sizes.  Fixes PR#9020.

Revision 1.65 / (download) - annotate - [select for diffs], Mon Dec 20 05:46:33 1999 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Changes since 1.64: +4 -1 lines
Diff to previous 1.64 (colored)

avoid shared cluster mbuf overwrite on multicast packet loopback.
(bsdi and freebsd fixed this a long time ago...)

PR: 9020
From: pavlin@catarina.usc.edu

Revision 1.64 / (download) - annotate - [select for diffs], Mon Dec 13 17:04:11 1999 UTC (24 years, 2 months ago) by is
Branch: MAIN
Changes since 1.63: +9 -4 lines
Diff to previous 1.63 (colored)

Handle packets to 255.255.255.255 like multicast packets. Fixes PR 7682 by
Darren Reed.

Revision 1.63 / (download) - annotate - [select for diffs], Mon Dec 13 15:17:20 1999 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.62: +31 -16 lines
Diff to previous 1.62 (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.58.6.3 / (download) - annotate - [select for diffs], Tue Nov 30 13:35:33 1999 UTC (24 years, 3 months ago) by itojun
Branch: kame
CVS Tags: kame_141_19991130
Changes since 1.58.6.2: +45 -27 lines
Diff to previous 1.58.6.2 (colored) to branchpoint 1.58 (colored) next main 1.59 (colored)

bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code).  Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.

Revision 1.58.4.3 / (download) - annotate - [select for diffs], Mon Aug 2 22:34:58 1999 UTC (24 years, 7 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.58.4.2: +2 -1 lines
Diff to previous 1.58.4.2 (colored) to branchpoint 1.58 (colored) next main 1.59 (colored)

Update from trunk.

Revision 1.62 / (download) - annotate - [select for diffs], Fri Jul 9 22:57:19 1999 UTC (24 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-base
Branch point for: wrstuden-devbsize, thorpej_scsipi
Changes since 1.61: +2 -1 lines
Diff to previous 1.61 (colored)

defopt IPSEC and IPSEC_ESP (both into opt_ipsec.h).

Revision 1.58.6.2 / (download) - annotate - [select for diffs], Tue Jul 6 11:02:46 1999 UTC (24 years, 7 months ago) by itojun
Branch: kame
CVS Tags: kame_14_19990705
Changes since 1.58.6.1: +30 -1 lines
Diff to previous 1.58.6.1 (colored) to branchpoint 1.58 (colored)

KAME/NetBSD 1.4, SNAP kit 1999/07/05.
NOTE: this branch is just for reference purposes (i.e. for taking cvs diff).
do not touch anything on the branch.  actual work must be done on HEAD branch.

Revision 1.58.4.2 / (download) - annotate - [select for diffs], Thu Jul 1 23:47:02 1999 UTC (24 years, 8 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.58.4.1: +222 -1 lines
Diff to previous 1.58.4.1 (colored) to branchpoint 1.58 (colored)

Sync w/ -current.

Revision 1.61 / (download) - annotate - [select for diffs], Thu Jul 1 08:12:51 1999 UTC (24 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.60: +222 -1 lines
Diff to previous 1.60 (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.58.6.1 / (download) - annotate - [select for diffs], Mon Jun 28 06:37:00 1999 UTC (24 years, 8 months ago) by itojun
Branch: kame
CVS Tags: kame_14_19990628
Changes since 1.58: +193 -1 lines
Diff to previous 1.58 (colored)

KAME/NetBSD 1.4 SNAP kit, dated 19990628.

NOTE: this branch (kame) is used just for refernce.  this may not compile
due to multiple reasons.

Revision 1.58.2.1 / (download) - annotate - [select for diffs], Tue Jun 22 17:05:50 1999 UTC (24 years, 8 months ago) by perry
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH001
Changes since 1.58: +2 -2 lines
Diff to previous 1.58 (colored)

pullup 1.59->1.60 (mrg): ipfilter should filter multicast traffic...

Revision 1.58.4.1 / (download) - annotate - [select for diffs], Mon Jun 21 01:27:49 1999 UTC (24 years, 8 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.58: +13 -2 lines
Diff to previous 1.58 (colored)

Sync w/ -current.

Revision 1.60 / (download) - annotate - [select for diffs], Mon Jun 7 01:26:04 1999 UTC (24 years, 8 months ago) by mrg
Branch: MAIN
Changes since 1.59: +2 -2 lines
Diff to previous 1.59 (colored)

oops.  move sendit: above the PFIL_HOOKS so that multicast traffic is filtered.  from darren reed.

Revision 1.59 / (download) - annotate - [select for diffs], Tue May 4 19:50:23 1999 UTC (24 years, 10 months ago) by hwr
Branch: MAIN
Changes since 1.58: +12 -1 lines
Diff to previous 1.58 (colored)

Don't let packets with a Class-D source address escape the host.
Fixes second half of kern/7003 by Jonathan Stone <jonathan@DSG.Stanford.EDU>.

Revision 1.58 / (download) - annotate - [select for diffs], Sat Mar 27 01:24:50 1999 UTC (24 years, 11 months ago) by aidan
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE
Branch point for: netbsd-1-4, kame, chs-ubc2
Changes since 1.57: +17 -1 lines
Diff to previous 1.57 (colored)

Added per-addr input/output statistics.  Currently just support netatalk
and netinet, currently only tested under netinet.

Disabled by default, enabled by compiling the kernel with option
IFA_STATS.  Enabling this feature seems to make the ip_output function
take 13% longer than before, which should be OK for people that need
this feature.

Revision 1.57 / (download) - annotate - [select for diffs], Fri Mar 12 22:42:31 1999 UTC (24 years, 11 months ago) by perry
Branch: MAIN
Changes since 1.56: +5 -6 lines
Diff to previous 1.56 (colored)

exterminate ovbcopy. patches provided by Erik Bertelsen, pr-7145

Revision 1.56 / (download) - annotate - [select for diffs], Tue Jan 19 23:39:57 1999 UTC (25 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.55: +1 -2 lines
Diff to previous 1.55 (colored)

There's just no plausible reason to byte-swap ip_id internally.  It's opaque.

Revision 1.55 / (download) - annotate - [select for diffs], Mon Jan 11 22:35:06 1999 UTC (25 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.54: +9 -7 lines
Diff to previous 1.54 (colored)

Fix byte order and ip_len inconsistencies in ICMP reply code.  Also, fix
some formatting and HTONS(foo) vs. foo = htons(foo) inconsistencies.

PR #6602, Darren Reed.

Revision 1.54 / (download) - annotate - [select for diffs], Sat Dec 19 02:46:12 1998 UTC (25 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.53: +38 -38 lines
Diff to previous 1.53 (colored)

Reverse the copyright-notice-swap.  It went against existing practice.

Revision 1.53.4.1 / (download) - annotate - [select for diffs], Fri Dec 11 04:53:09 1998 UTC (25 years, 2 months ago) by kenh
Branch: kenh-if-detach
Changes since 1.53: +37 -11 lines
Diff to previous 1.53 (colored) next main 1.54 (colored)

The beginnings of interface detach support.  Still some bugs, but mostly
works for me.

This work was originally by Bill Studenmund, and cleaned up by me.

Revision 1.40.2.4 / (download) - annotate - [select for diffs], Thu Oct 29 02:37:23 1998 UTC (25 years, 4 months ago) by cgd
Branch: netbsd-1-3
CVS Tags: netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003
Changes since 1.40.2.3: +2 -1 lines
Diff to previous 1.40.2.3 (colored) to branchpoint 1.40 (colored) next main 1.41 (colored)

pull up rev 1.53 from trunk (ws)

Revision 1.53 / (download) - annotate - [select for diffs], Mon Oct 26 17:31:01 1998 UTC (25 years, 4 months ago) by ws
Branch: MAIN
CVS Tags: kenh-if-detach-base, chs-ubc-base, chs-ubc
Branch point for: kenh-if-detach
Changes since 1.52: +2 -1 lines
Diff to previous 1.52 (colored)

Fix a buglet when looking up an interface for multicast:
Zero out the routing structure before calling the route lookup code
in order to correctly match addresses.

Revision 1.52 / (download) - annotate - [select for diffs], Tue Oct 20 01:46:27 1998 UTC (25 years, 4 months ago) by matt
Branch: MAIN
Changes since 1.51: +2 -2 lines
Diff to previous 1.51 (colored)

vax -> __vax__ (and mips to __mips__ in ultrix_misc.c)

Revision 1.40.2.3 / (download) - annotate - [select for diffs], Thu Oct 1 17:57:51 1998 UTC (25 years, 5 months ago) by cgd
Branch: netbsd-1-3
Changes since 1.40.2.2: +41 -7 lines
Diff to previous 1.40.2.2 (colored) to branchpoint 1.40 (colored)

pull up revisions 1.44-1.45, 1.51 (via patch) from trunk. (tls)

Revision 1.51 / (download) - annotate - [select for diffs], Wed Sep 30 21:52:25 1998 UTC (25 years, 5 months ago) by tls
Branch: MAIN
Changes since 1.50: +38 -38 lines
Diff to previous 1.50 (colored)

Switch order of TNF and UCB copyrights so UCB copyright is first; this seems more appropriate since UCB wrote the original code, after all.

Revision 1.50 / (download) - annotate - [select for diffs], Sun Aug 9 08:58:19 1998 UTC (25 years, 6 months ago) by mrg
Branch: MAIN
Changes since 1.49: +2 -1 lines
Diff to previous 1.49 (colored)

defopt PFIL_HOOKS.

Revision 1.40.2.2 / (download) - annotate - [select for diffs], Wed Jul 22 23:54:37 1998 UTC (25 years, 7 months ago) by mellon
Branch: netbsd-1-3
Changes since 1.40.2.1: +6 -3 lines
Diff to previous 1.40.2.1 (colored) to branchpoint 1.40 (colored)

Pull up 1.46 and 1.49 (veego)

Revision 1.49 / (download) - annotate - [select for diffs], Fri Jul 17 00:28:01 1998 UTC (25 years, 7 months ago) by sommerfe
Branch: MAIN
CVS Tags: eeh-paddr_t-base, eeh-paddr_t
Changes since 1.48: +5 -2 lines
Diff to previous 1.48 (colored)

Fix PR5508: ipfil cut-through forwarding causes panic

Revision 1.40.2.1 / (download) - annotate - [select for diffs], Sat May 9 03:33:00 1998 UTC (25 years, 9 months ago) by mycroft
Branch: netbsd-1-3
CVS Tags: netbsd-1-3-PATCH002
Changes since 1.40: +21 -1 lines
Diff to previous 1.40 (colored)

Pull up patch from kml.

Revision 1.48 / (download) - annotate - [select for diffs], Tue Apr 28 15:26:00 1998 UTC (25 years, 10 months ago) by matt
Branch: MAIN
Changes since 1.47: +23 -6 lines
Diff to previous 1.47 (colored)

Only transmit fragments if the send queue of interface can actually hold
all of the fragments.  Use the mtu of route in preference of the MTU of the
interface when doing fragmentation decisions.  (ie. Fragment to the path
mtu if it is available).

Revision 1.47 / (download) - annotate - [select for diffs], Tue Mar 24 03:10:02 1998 UTC (25 years, 11 months ago) by kml
Branch: MAIN
Changes since 1.46: +19 -1 lines
Diff to previous 1.46 (colored)

Ensure that we take the IP option length into account when we calculate
the effective maximum send size for TCP.  ip_optlen() and tcp_optlen()
should probably be inlined for efficiency.

Revision 1.46 / (download) - annotate - [select for diffs], Thu Mar 19 15:46:43 1998 UTC (25 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)

convert pfil(9) in and out lists from <sys/queue.h> LISTs to TAILQs, and
change pfil_add_hook to put output filters at the tail of the queue,
while continuing to place input filters at the head of the queue.  update
the two users of these functions, and document these changes.

fixes PR#4593.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Feb 15 18:24:28 1998 UTC (26 years ago) by tls
Branch: MAIN
Changes since 1.44: +38 -1 lines
Diff to previous 1.44 (colored)

Add correct copyright notice for IP address hash change.  This code is donated to TNF by the original copyright holder, Panix.

Revision 1.44 / (download) - annotate - [select for diffs], Fri Feb 13 18:21:45 1998 UTC (26 years ago) by tls
Branch: MAIN
Changes since 1.43: +4 -7 lines
Diff to previous 1.43 (colored)

Change list of interface IP addresses to a hash.  Improves performance on hosts with a large number of IP addresses significantly.

Revision 1.43 / (download) - annotate - [select for diffs], Fri Feb 13 10:23:49 1998 UTC (26 years ago) by kleink
Branch: MAIN
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

Fix variable declarations:  register -> register int.

Revision 1.42 / (download) - annotate - [select for diffs], Mon Jan 12 03:02:52 1998 UTC (26 years, 1 month ago) by scottr
Branch: MAIN
Changes since 1.41: +3 -1 lines
Diff to previous 1.41 (colored)

Use option header file for MROUTING

Revision 1.41 / (download) - annotate - [select for diffs], Wed Jan 7 22:51:25 1998 UTC (26 years, 1 month ago) by lukem
Branch: MAIN
Changes since 1.40: +37 -1 lines
Diff to previous 1.40 (colored)

add the following, derived from FreeBSD:
* IP_PORTRANGE socket option, which controls how the ephemeral ports
  are allocated. it takes the following settings:
	IP_PORTRANGE_DEFAULT	use anonportmin (49152) -> anonportmax (65535)
	IP_PORTRANGE_HIGH	as IP_PORTRANGE_DEFAULT (retained for FreeBSD
				compat reasons, where these are separate)
	IP_PORTRANGE_LOW	use 600 -> 1023. only works if uid==0.
* in_pcb flag INP_ANONPORT. set if port was allocated ephmerally

Revision 1.1.1.2 / (download) - annotate - [select for diffs] (vendor branch), Mon Jan 5 09:54:14 1998 UTC (26 years, 1 month ago) by thorpej
Branch: WFJ-920714, CSRG
CVS Tags: lite-2, lite-1, date-03-may-96
Changes since 1.1.1.1: +503 -41 lines
Diff to previous 1.1.1.1 (colored)

Import sys/netinet from 4.4BSD-Lite for reference purposes.

Revision 1.39.4.1 / (download) - annotate - [select for diffs], Tue Oct 14 10:29:30 1997 UTC (26 years, 4 months ago) by thorpej
Branch: marc-pcmcia
Changes since 1.39: +13 -1 lines
Diff to previous 1.39 (colored) next main 1.40 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.40 / (download) - annotate - [select for diffs], Tue Oct 14 00:52:59 1997 UTC (26 years, 4 months ago) by matt
Branch: MAIN
CVS Tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH001, netbsd-1-3-BETA, marc-pcmcia-base
Branch point for: netbsd-1-3
Changes since 1.39: +13 -1 lines
Diff to previous 1.39 (colored)

Add support for returning maximum supported MTU when ip_output fails with
EMSGSIZE.

Revision 1.39 / (download) - annotate - [select for diffs], Tue Apr 15 00:41:53 1997 UTC (26 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, marc-pcmcia-bp, bouyer-scsipi
Branch point for: marc-pcmcia
Changes since 1.38: +2 -2 lines
Diff to previous 1.38 (colored)

Move the mtod calls *after* we've made sure that the packet has passed the
filter successfully. Otherwise it can be NULL if the filter blocked it,
and we die. How did this ever work?

Revision 1.37.4.1 / (download) - annotate - [select for diffs], Wed Mar 12 21:24:47 1997 UTC (26 years, 11 months ago) by is
Branch: is-newarp
Changes since 1.37: +2 -5 lines
Diff to previous 1.37 (colored) next main 1.38 (colored)

Merge in changes from Trunk

Revision 1.38 / (download) - annotate - [select for diffs], Tue Feb 18 20:49:36 1997 UTC (27 years ago) by mrg
Branch: MAIN
CVS Tags: is-newarp-before-merge
Changes since 1.37: +2 -5 lines
Diff to previous 1.37 (colored)

pseudo-device ipfilter brings in PFIL_HOOKS.

Revision 1.37 / (download) - annotate - [select for diffs], Sat Jan 11 05:21:11 1997 UTC (27 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-setroot, mrg-vm-swap, is-newarp-base
Branch point for: is-newarp
Changes since 1.36: +11 -1 lines
Diff to previous 1.36 (colored)

Implement the IP_RECVIF socket option: supply a datagram packet's incoming
interface using a sockaddr_dl in a control mbuf.

Implement SO_TIMESTAMP for IP datagrams.

Move packet information option processing into a generic function
so that they work with multicast UDP and raw IP as well as unicast UDP.

Contributed by Bill Fenner <fenner@parc.xerox.com>.

Revision 1.36 / (download) - annotate - [select for diffs], Fri Dec 20 09:08:16 1996 UTC (27 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.35: +5 -4 lines
Diff to previous 1.35 (colored)

always reassign ip after calling function.

Revision 1.35 / (download) - annotate - [select for diffs], Fri Dec 20 08:39:29 1996 UTC (27 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.34: +1 -9 lines
Diff to previous 1.34 (colored)

in pfil_hooks:  always reassign ip after calling hook.

Revision 1.29.4.1 / (download) - annotate - [select for diffs], Wed Dec 11 02:00:33 1996 UTC (27 years, 2 months ago) by mycroft
Branch: netbsd-1-2
CVS Tags: netbsd-1-2-PATCH001
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored) next main 1.30 (colored)

From trunk:
Fix a mbuf leak when fragmentation fails due to lack of memory.

Revision 1.34 / (download) - annotate - [select for diffs], Tue Oct 22 11:27:07 1996 UTC (27 years, 4 months ago) by veego
Branch: MAIN
Changes since 1.33: +4 -3 lines
Diff to previous 1.33 (colored)

Fix a panic from the pfil_hooks.

Revision 1.33 / (download) - annotate - [select for diffs], Fri Oct 11 18:19:08 1996 UTC (27 years, 4 months ago) by is
Branch: MAIN
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

Fix a mbuf leak in ip_output().

Scenario: If ip_insertoptions() prepends a new mbuf to the chain, the
bad: label's m_freem(m0) still would free only the original mbuf chain
if the transmission failed for, e.g., no route to host; resulting in
one lost mbuf per failed packet. (The original posting included a
demonstration program).

Original report of this bug was by jinmei@isl.rdc.toshiba.co.jp
(JINMEI Tatuya) on comp.bugs.4bsd.

Revision 1.32 / (download) - annotate - [select for diffs], Sat Sep 14 14:40:27 1996 UTC (27 years, 5 months ago) by mrg
Branch: MAIN
Changes since 1.31: +11 -7 lines
Diff to previous 1.31 (colored)

move the packet filter hooks in to a saner location.  while i'm here, rename
PACKET_FILTER to PFIL_HOOKS.

Revision 1.31 / (download) - annotate - [select for diffs], Mon Sep 9 14:51:19 1996 UTC (27 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.30: +21 -22 lines
Diff to previous 1.30 (colored)

Add in_nullhost() and in_hosteq() macros, to hide some protocol
details.  Also, fix a bug in TCP wrt SYN+URG packets.

Revision 1.30 / (download) - annotate - [select for diffs], Fri Sep 6 05:07:45 1996 UTC (27 years, 5 months ago) by mrg
Branch: MAIN
Changes since 1.29: +27 -1 lines
Diff to previous 1.29 (colored)

add packet filter interface code.  see pfil(9) for more details.  you
need the PACKET_FILTER option to enable this code.  currently, ipfilter
version 3.1.1-beta has been converted to use this new interface.

Revision 1.29 / (download) - annotate - [select for diffs], Mon Feb 26 23:17:12 1996 UTC (28 years ago) by mrg
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-BETA
Branch point for: netbsd-1-2
Changes since 1.28: +2 -3 lines
Diff to previous 1.28 (colored)

two more local addr changes, all done differently now (idea from charles)

Revision 1.28 / (download) - annotate - [select for diffs], Tue Feb 13 23:43:07 1996 UTC (28 years ago) by christos
Branch: MAIN
Changes since 1.27: +25 -7 lines
Diff to previous 1.27 (colored)

netinet prototypes

Revision 1.27 / (download) - annotate - [select for diffs], Sat Jul 1 03:44:55 1995 UTC (28 years, 8 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

null mbuf pointer could cause system crash; avoid it.  From
Torsten Duwe <duwe@immd4.informatik.uni-erlangen.de>.

Revision 1.26 / (download) - annotate - [select for diffs], Mon Jun 12 00:47:44 1995 UTC (28 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored)

Various cleanup, including:
* Convert several data structures to use queue.h.
* Split in_pcbnotify() into two parts; one for notifying a specific PCB, and
one for notifying all PCBs for a particular foreign address.

Revision 1.25 / (download) - annotate - [select for diffs], Sun Jun 4 05:58:28 1995 UTC (28 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.24: +4 -4 lines
Diff to previous 1.24 (colored)

Don't cast things unnecessarily.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Jun 4 05:07:08 1995 UTC (28 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.23: +9 -12 lines
Diff to previous 1.23 (colored)

Clean up many more casts.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Jun 1 21:36:40 1995 UTC (28 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.22: +5 -6 lines
Diff to previous 1.22 (colored)

Avoid byte-swapping IP addresses at run time.

Revision 1.22 / (download) - annotate - [select for diffs], Mon May 15 01:24:53 1995 UTC (28 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.21: +5 -5 lines
Diff to previous 1.21 (colored)

simplify ip_output() out-of-memory condition slightly, and style nits.

Revision 1.21 / (download) - annotate - [select for diffs], Thu Apr 13 06:35:38 1995 UTC (28 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.20: +17 -17 lines
Diff to previous 1.20 (colored)

be a bit more careful and explicit with types.  (basically a large no-op.)

Revision 1.20 / (download) - annotate - [select for diffs], Tue Apr 11 04:30:56 1995 UTC (28 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.19: +2 -3 lines
Diff to previous 1.19 (colored)

Remove some explicit references to loif.

Revision 1.19 / (download) - annotate - [select for diffs], Wed Jun 29 06:38:27 1994 UTC (29 years, 8 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.18: +3 -2 lines
Diff to previous 1.18 (colored)

New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.18 / (download) - annotate - [select for diffs], Fri May 13 06:06:26 1994 UTC (29 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.17: +63 -58 lines
Diff to previous 1.17 (colored)

Update to 4.4-Lite networking code, with a few local changes.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Feb 2 05:59:06 1994 UTC (30 years, 1 month ago) by hpeyerl
Branch: MAIN
Changes since 1.16: +1 -11 lines
Diff to previous 1.16 (colored)

Multicast is no longer optional.

Revision 1.16 / (download) - annotate - [select for diffs], Wed Jan 19 21:36:56 1994 UTC (30 years, 1 month ago) by brezak
Branch: MAIN
Changes since 1.15: +16 -16 lines
Diff to previous 1.15 (colored)

Fix arguments to ip_getmoptions.

Revision 1.15 / (download) - annotate - [select for diffs], Tue Jan 18 03:26:53 1994 UTC (30 years, 1 month ago) by brezak
Branch: MAIN
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

Fix some prototype detected warnings/errors.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Jan 18 02:36:53 1994 UTC (30 years, 1 month ago) by brezak
Branch: MAIN
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

Patch for ip-multicast bugs from mccanne@ee.lbl.gov (Steven McCanne)

Revision 1.13 / (download) - annotate - [select for diffs], Mon Jan 10 20:14:23 1994 UTC (30 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.12: +3 -9 lines
Diff to previous 1.12 (colored)

Should compile now with or without `options MULTICAST'.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Jan 9 01:06:18 1994 UTC (30 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.11: +11 -5 lines
Diff to previous 1.11 (colored)

Prototype the rest.

Revision 1.11 / (download) - annotate - [select for diffs], Sat Jan 8 21:21:52 1994 UTC (30 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.10: +12 -12 lines
Diff to previous 1.10 (colored)

Fix some inconsistent spacing; spaces at the end of lines, etc.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Jan 7 22:16:11 1994 UTC (30 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.9: +1 -10 lines
Diff to previous 1.9 (colored)

kill COMPAT_OLDSOCKOPT

Revision 1.9 / (download) - annotate - [select for diffs], Thu Jan 6 23:00:22 1994 UTC (30 years, 1 month ago) by ws
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

Apparently noone ever tested the COMPAT_OLDSOCKOPT flag...

Revision 1.8 / (download) - annotate - [select for diffs], Sat Dec 18 00:41:59 1993 UTC (30 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.7: +17 -17 lines
Diff to previous 1.7 (colored)

Canonicalize all #includes.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Dec 6 07:14:45 1993 UTC (30 years, 2 months ago) by cgd
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

oops; fix that last...

Revision 1.6 / (download) - annotate - [select for diffs], Mon Dec 6 06:46:28 1993 UTC (30 years, 2 months ago) by cgd
Branch: MAIN
Changes since 1.5: +10 -1 lines
Diff to previous 1.5 (colored)

the ugliest compatibility hack i think i've ever seen...
define COMPAT_OLDSOCKOPT to get new kernels to work with the
old args to [sg]sockopt.  this is going to go away "soon".
note that this option only has effect if MULTICAST is not defined.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Dec 6 04:59:40 1993 UTC (30 years, 2 months ago) by hpeyerl
Branch: MAIN
Changes since 1.4: +458 -2 lines
Diff to previous 1.4 (colored)

multicast support.
>From Chris Maeda, cmaeda@cs.washington.edu
These patches are derived from the IP Multicast patches for BSDI.

Revision 1.3.4.2 / (download) - annotate - [select for diffs], Sat Nov 6 00:10:44 1993 UTC (30 years, 3 months ago) by mycroft
Branch: magnum
Changes since 1.3.4.1: +29 -18 lines
Diff to previous 1.3.4.1 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored)

Merge changes from trunk.

Revision 1.4 / (download) - annotate - [select for diffs], Fri Nov 5 23:06:26 1993 UTC (30 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.3: +12 -1 lines
Diff to previous 1.3 (colored)

fix from david greenman, davidg@freefall.cdrom.com:
fixed bug where large amounts of unidirectional UDP traffic would fill
the interface output queue and further udp packets would be fragmented
and only partially sent - keeping the output queue full and jamming the
network, but not actually getting any real work done (because you can't
send just 'part' of a udp packet - if you fragment it, you must send
the whole thing). The fix involves adding a check to make sure that the
output queue has sufficient space for all of the fragments.

Revision 1.3.4.1 / (download) - annotate - [select for diffs], Sat Oct 16 10:51:46 1993 UTC (30 years, 4 months ago) by mycroft
Branch: magnum
Changes since 1.3: +1 -5 lines
Diff to previous 1.3 (colored)

Nuke references to machine/mtpr.h.

Revision 1.3 / (download) - annotate - [select for diffs], Sat May 22 11:42:35 1993 UTC (30 years, 9 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-0-9-patch-001, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9, magnum-base
Branch point for: magnum
Changes since 1.2: +1 -2 lines
Diff to previous 1.2 (colored)

add include of select.h if necessary for protos, or delete if extraneous

Revision 1.2 / (download) - annotate - [select for diffs], Tue May 18 18:20:11 1993 UTC (30 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.1: +3 -1 lines
Diff to previous 1.1 (colored)

make kernel select interface be one-stop shopping & clean it all up.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 21 09:45:37 1993 UTC (30 years, 11 months ago) by cgd
Branch: WFJ-920714, CSRG
CVS Tags: patchkit-0-2-2, netbsd-alpha-1, netbsd-0-8, WFJ-386bsd-01
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of 386bsd-0.1 sources

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN

Initial revision

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>