The NetBSD Project

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

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.202: download - view: text, markup, annotated - select for diffs
Fri Nov 4 09:05:41 2022 UTC (2 years, 1 month ago) by ozaki-r
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, HEAD
Diff to: previous 1.201: preferred, colored
Changes since revision 1.201: +59 -19 lines
ipcb: add/update the description of functions

From rmind-smpnet patches

Revision 1.201: download - view: text, markup, annotated - select for diffs
Fri Nov 4 09:05:04 2022 UTC (2 years, 1 month ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.200: preferred, colored
Changes since revision 1.200: +5 -5 lines
inpcb: replace leading white spaces with tabs

Revision 1.200: download - view: text, markup, annotated - select for diffs
Fri Nov 4 09:04:27 2022 UTC (2 years, 1 month ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.199: preferred, colored
Changes since revision 1.199: +35 -35 lines
inpcb: get rid of parentheses for return value

Revision 1.199: download - view: text, markup, annotated - select for diffs
Fri Nov 4 09:03:56 2022 UTC (2 years, 1 month ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.198: preferred, colored
Changes since revision 1.198: +4 -4 lines
inpcb: use NULL

Revision 1.198: download - view: text, markup, annotated - select for diffs
Fri Nov 4 09:03:20 2022 UTC (2 years, 1 month ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.197: preferred, colored
Changes since revision 1.197: +9 -9 lines
inpcb: use in_port_t for port numbers

Revision 1.197: download - view: text, markup, annotated - select for diffs
Fri Nov 4 09:02:38 2022 UTC (2 years, 1 month ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.196: preferred, colored
Changes since revision 1.196: +23 -19 lines
inpcb: use pool_cache instead of pool

Revision 1.196: download - view: text, markup, annotated - select for diffs
Fri Nov 4 09:01:53 2022 UTC (2 years, 1 month ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.195: preferred, colored
Changes since revision 1.195: +5 -5 lines
inpcb: rename functions to in6pcb_*

Revision 1.195: download - view: text, markup, annotated - select for diffs
Fri Nov 4 09:00:58 2022 UTC (2 years, 1 month ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.194: preferred, colored
Changes since revision 1.194: +49 -49 lines
inpcb: rename functions to inpcb_*

Inspired by rmind-smpnet patches.

Revision 1.194: download - view: text, markup, annotated - select for diffs
Sat Oct 29 02:56:29 2022 UTC (2 years, 1 month ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +30 -2 lines
inpcb: fix for kernels without INET6

Revision 1.193: download - view: text, markup, annotated - select for diffs
Fri Oct 28 05:25:36 2022 UTC (2 years, 1 month ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +63 -46 lines
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.192: download - view: text, markup, annotated - select for diffs
Fri Oct 28 05:18:39 2022 UTC (2 years, 1 month ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.191: preferred, colored
Changes since revision 1.191: +56 -56 lines
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.191: download - view: text, markup, annotated - select for diffs
Fri Oct 14 19:39:32 2022 UTC (2 years, 1 month ago) by ryo
Branches: MAIN
Diff to: previous 1.190: preferred, colored
Changes since revision 1.190: +7 -10 lines
Avoid error of "-Wreturn-local-addr", and simplify the logic.

However, -Wreturn-local-addr is still disabled by default by GCC_NO_RETURN_LOCAL_ADDR
in bsd.own.mk because it causes errors in other parts.

Revision 1.190: download - view: text, markup, annotated - select for diffs
Mon Aug 29 09:14:02 2022 UTC (2 years, 3 months ago) by knakahara
Branches: MAIN
CVS tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Diff to: previous 1.189: preferred, colored
Changes since revision 1.189: +5 -3 lines
Add sysctl entry to control to send routing message for RTM_DYNAMIC.

Some routing daemons require such routing message to keep coherency.

If we want to let kernel send such message, set net.inet.icmp.dynamic_rt_msg=1
for IPv4, net.inet6.icmp6.dynamic_rt_msg=1 for IPv6.
Default(=0) is the same as before, that is, not send such routing message.

Revision 1.189: download - view: text, markup, annotated - select for diffs
Fri Jul 29 07:35:16 2022 UTC (2 years, 4 months ago) by knakahara
Branches: MAIN
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +2 -3 lines
Remove obsoleted comments.

These comments are added with IFNET_LOCK by in_pcb.c:r1.180 and
in6_pcb.c:r1.162.  And then, IFNET_LOCK codes are removed in
in_pcb.c:r1.183 and in6_pcb.c:r1.166, however the comments have
remained.

Revision 1.188: download - view: text, markup, annotated - select for diffs
Fri Jun 10 09:51:10 2022 UTC (2 years, 6 months ago) by knakahara
Branches: MAIN
Diff to: previous 1.187: preferred, colored
Changes since revision 1.187: +7 -5 lines
Use LIST_FOREACH macro.

Revision 1.187: download - view: text, markup, annotated - select for diffs
Thu Jun 9 07:01:27 2022 UTC (2 years, 6 months ago) by knakahara
Branches: MAIN
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +8 -8 lines
refactor: use TAILQ_FOREACH instead of TAILQ_FOREACH_SAFE about inpt_queue.

They don't use "ninph" pointer and don't remove elements.

Revision 1.186: download - view: text, markup, annotated - select for diffs
Tue Oct 19 20:01:09 2021 UTC (3 years, 1 month ago) by roy
Branches: MAIN
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +2 -4 lines
netinet: Allow binding the unspecified address when no addresses exist

You should always be able to bind to the unspecified address even if
no addresses have been configured on any interface.

For example, a DHCP client could be started before the loopback interface
has been fully configured.

Revision 1.185: download - view: text, markup, annotated - select for diffs
Tue Sep 8 14:12:57 2020 UTC (4 years, 3 months ago) by christos
Branches: 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
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +11 -6 lines
Add IP_BINDANY, IPV6_BINDANY which can be used to bind to any address in
order to implement transparent proxies.

Revision 1.184: download - view: text, markup, annotated - select for diffs
Thu Aug 20 21:21:32 2020 UTC (4 years, 3 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +4 -2 lines
[ozaki-r] Changes to the kernel core for wireguard

Revision 1.182.4.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:09:47 2019 UTC (5 years, 6 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.182: preferred, colored; next MAIN 1.183: preferred, colored
Changes since revision 1.182: +2 -4 lines
Sync with HEAD

Revision 1.183: download - view: text, markup, annotated - select for diffs
Wed May 15 02:59:18 2019 UTC (5 years, 6 months ago) by ozaki-r
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-4-RELEASE, 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, 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
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +2 -4 lines
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.178.4.3: download - view: text, markup, annotated - select for diffs
Sun Mar 18 10:57:01 2018 UTC (6 years, 8 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Diff to: previous 1.178.4.2: preferred, colored; branchpoint 1.178: preferred, colored; next MAIN 1.179: preferred, colored
Changes since revision 1.178.4.2: +3 -2 lines
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.182: download - view: text, markup, annotated - select for diffs
Tue Feb 27 14:44:10 2018 UTC (6 years, 9 months ago) by maxv
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, isaki-audio2-base, isaki-audio2
Branch point for: phil-wifi
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +3 -3 lines
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.178.4.2: download - view: text, markup, annotated - select for diffs
Tue Jan 2 10:20:34 2018 UTC (6 years, 11 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.178.4.1: preferred, colored; branchpoint 1.178: preferred, colored
Changes since revision 1.178.4.1: +5 -2 lines
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.181: download - view: text, markup, annotated - select for diffs
Mon Jan 1 00:51:36 2018 UTC (6 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +3 -2 lines
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.178.4.1: download - view: text, markup, annotated - select for diffs
Thu Dec 21 21:08:13 2017 UTC (6 years, 11 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +15 -8 lines
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.180: download - view: text, markup, annotated - select for diffs
Fri Dec 15 04:03:46 2017 UTC (6 years, 11 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +5 -2 lines
Ensure to call if_mcast_op with holding IFNET_LOCK

Note that CARP doesn't deal with IFNET_LOCK yet.

Revision 1.143.2.3: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:39:04 2017 UTC (7 years ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.143.2.2: preferred, colored; branchpoint 1.143: preferred, colored; next MAIN 1.144: preferred, colored
Changes since revision 1.143.2.2: +150 -85 lines
update from HEAD

Revision 1.155.2.8: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:53:12 2017 UTC (7 years, 3 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.155.2.7: preferred, colored; branchpoint 1.155: preferred, colored; next MAIN 1.156: preferred, colored
Changes since revision 1.155.2.7: +33 -10 lines
Sync with HEAD

Revision 1.179: download - view: text, markup, annotated - select for diffs
Thu Aug 10 04:31:58 2017 UTC (7 years, 4 months ago) by ryo
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, nick-nhusb-base-20170825
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +15 -8 lines
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.166.2.6: download - view: text, markup, annotated - select for diffs
Wed Apr 26 02:53:29 2017 UTC (7 years, 7 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.166.2.5: preferred, colored; branchpoint 1.166: preferred, colored; next MAIN 1.167: preferred, colored
Changes since revision 1.166.2.5: +5 -2 lines
Sync with HEAD

Revision 1.178: download - view: text, markup, annotated - select for diffs
Tue Apr 25 05:44:11 2017 UTC (7 years, 7 months ago) by ozaki-r
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek
Branch point for: netbsd-8
Diff to: previous 1.177: preferred, colored
Changes since revision 1.177: +3 -2 lines
Check if solock of PCB is held when SP caches in the PCB are accessed

To this end, a back pointer from inpcbpolicy to inpcb_hdr is added.

Revision 1.173.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:54:05 2017 UTC (7 years, 7 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.173: preferred, colored; next MAIN 1.174: preferred, colored
Changes since revision 1.173: +19 -8 lines
Sync with HEAD

Revision 1.177: download - view: text, markup, annotated - select for diffs
Thu Apr 20 08:45:09 2017 UTC (7 years, 7 months ago) by ozaki-r
Branches: MAIN
CVS tags: bouyer-socketcan-base1
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +4 -2 lines
Simplify logic of udp4_sendup and udp6_sendup

They are always passed a socket with the same protocol faimiliy
as its own: AF_INET for udp4_sendup and AF_INET6 for udp6_sendup.

Revision 1.166.2.5: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:50 2017 UTC (7 years, 8 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.166.2.4: preferred, colored; branchpoint 1.166: preferred, colored
Changes since revision 1.166.2.4: +17 -9 lines
Sync with HEAD

Revision 1.176: download - view: text, markup, annotated - select for diffs
Thu Mar 2 05:29:31 2017 UTC (7 years, 9 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-20170320, jdolecek-ncq-base, jdolecek-ncq
Diff to: previous 1.175: preferred, colored
Changes since revision 1.175: +15 -2 lines
Make sure imo_membership is protected by inp's lock (solock)

Revision 1.175: download - view: text, markup, annotated - select for diffs
Mon Feb 13 04:05:58 2017 UTC (7 years, 9 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +4 -4 lines
Replace splnet with splsoftnet

Revision 1.155.2.7: download - view: text, markup, annotated - select for diffs
Sun Feb 5 13:40:59 2017 UTC (7 years, 10 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.155.2.6: preferred, colored; branchpoint 1.155: preferred, colored
Changes since revision 1.155.2.6: +24 -12 lines
Sync with HEAD

Revision 1.174: download - view: text, markup, annotated - select for diffs
Mon Jan 23 09:14:24 2017 UTC (7 years, 10 months ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20170204
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +2 -6 lines
Get rid of splnet for pool(9)

We don't need it anymore.

Revision 1.173: download - view: text, markup, annotated - select for diffs
Wed Jan 11 13:08:29 2017 UTC (7 years, 10 months ago) by ozaki-r
Branches: MAIN
CVS tags: bouyer-socketcan-base
Branch point for: bouyer-socketcan
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +2 -3 lines
Get rid of unnecessary header inclusions

Revision 1.166.2.4: download - view: text, markup, annotated - select for diffs
Sat Jan 7 08:56:51 2017 UTC (7 years, 11 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.166.2.3: preferred, colored; branchpoint 1.166: preferred, colored
Changes since revision 1.166.2.3: +24 -7 lines
Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.172: download - view: text, markup, annotated - select for diffs
Mon Dec 12 03:55:57 2016 UTC (7 years, 11 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-20170107
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +3 -3 lines
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.171: download - view: text, markup, annotated - select for diffs
Thu Dec 8 05:16:33 2016 UTC (8 years ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +24 -7 lines
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.166.2.3: download - view: text, markup, annotated - select for diffs
Fri Nov 4 14:49:21 2016 UTC (8 years, 1 month ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.166.2.2: preferred, colored; branchpoint 1.166: preferred, colored
Changes since revision 1.166.2.2: +3 -3 lines
Sync with HEAD

Revision 1.155.2.6: download - view: text, markup, annotated - select for diffs
Wed Oct 5 20:56:09 2016 UTC (8 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.155.2.5: preferred, colored; branchpoint 1.155: preferred, colored
Changes since revision 1.155.2.5: +52 -20 lines
Sync with HEAD

Revision 1.170: download - view: text, markup, annotated - select for diffs
Thu Sep 29 12:19:47 2016 UTC (8 years, 2 months ago) by roy
Branches: MAIN
CVS tags: pgoyette-localcount-20161104, nick-nhusb-base-20161204, nick-nhusb-base-20161004
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +3 -3 lines
Now that we disallow sending or receiving from invalid addresses,
allow binding to tentative addresses.

Revision 1.169: download - view: text, markup, annotated - select for diffs
Fri Aug 26 23:12:06 2016 UTC (8 years, 3 months ago) by roy
Branches: MAIN
CVS tags: localcount-20160914
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +3 -3 lines
Allow bind to detached INET addresses.

Revision 1.166.2.2: download - view: text, markup, annotated - select for diffs
Sat Aug 6 00:19:10 2016 UTC (8 years, 4 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.166.2.1: preferred, colored; branchpoint 1.166: preferred, colored
Changes since revision 1.166.2.1: +46 -18 lines
Sync with HEAD

Revision 1.168: download - view: text, markup, annotated - select for diffs
Mon Aug 1 03:15:30 2016 UTC (8 years, 4 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-20160806
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +46 -18 lines
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.166.2.1: download - view: text, markup, annotated - select for diffs
Tue Jul 26 03:24:23 2016 UTC (8 years, 4 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +12 -8 lines
Sync with HEAD

Revision 1.167: download - view: text, markup, annotated - select for diffs
Wed Jul 20 03:38:09 2016 UTC (8 years, 4 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-20160726
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +12 -8 lines
Reduce scopes of variables

Revision 1.155.2.5: download - view: text, markup, annotated - select for diffs
Sat Jul 9 20:25:22 2016 UTC (8 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.155.2.4: preferred, colored; branchpoint 1.155: preferred, colored
Changes since revision 1.155.2.4: +13 -10 lines
Sync with HEAD

Revision 1.166: download - view: text, markup, annotated - select for diffs
Fri Jul 8 04:33:30 2016 UTC (8 years, 5 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-base, nick-nhusb-base-20160907
Branch point for: pgoyette-localcount
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +4 -4 lines
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.165: download - view: text, markup, annotated - select for diffs
Wed Jul 6 08:42:34 2016 UTC (8 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +7 -6 lines
Switch the IPv4 address list to pslist(9)

Note that we leave the old list just in case; it seems there are some
kvm(3) users accessing the list. We can remove it later if we confirmed
nobody does actually.

Revision 1.164: download - view: text, markup, annotated - select for diffs
Tue Jun 21 03:28:27 2016 UTC (8 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +6 -4 lines
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.155.2.4: download - view: text, markup, annotated - select for diffs
Sat Mar 19 11:30:33 2016 UTC (8 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.155.2.3: preferred, colored; branchpoint 1.155: preferred, colored
Changes since revision 1.155.2.3: +3 -6 lines
Sync with HEAD

Revision 1.163: download - view: text, markup, annotated - select for diffs
Mon Feb 15 14:59:03 2016 UTC (8 years, 9 months ago) by rtr
Branches: MAIN
CVS tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +3 -6 lines
Reduce code duplication.

Split creation of IPv4-Mapped IPv6 addresses into its own function
and use it.

No functional change intended.  As posted to tech-net@

Revision 1.155.2.3: download - view: text, markup, annotated - select for diffs
Tue Sep 22 12:06:11 2015 UTC (9 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.155.2.2: preferred, colored; branchpoint 1.155: preferred, colored
Changes since revision 1.155.2.2: +4 -2 lines
Sync with HEAD

Revision 1.162: download - view: text, markup, annotated - select for diffs
Mon Aug 24 22:21:26 2015 UTC (9 years, 3 months ago) by pooka
Branches: MAIN
CVS tags: nick-nhusb-base-20151226, nick-nhusb-base-20150921
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +4 -2 lines
sprinkle _KERNEL_OPT

Revision 1.155.2.2: download - view: text, markup, annotated - select for diffs
Sat Jun 6 14:40:25 2015 UTC (9 years, 6 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.155.2.1: preferred, colored; branchpoint 1.155: preferred, colored
Changes since revision 1.155.2.1: +9 -14 lines
Sync with HEAD

Revision 1.161: download - view: text, markup, annotated - select for diffs
Sun May 24 15:43:45 2015 UTC (9 years, 6 months ago) by rtr
Branches: MAIN
CVS tags: nick-nhusb-base-20150606
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +2 -17 lines
remove transitional functions in{,6}_pcbconnect_m() that were used in
converting protocol user requests to accept sockaddr instead of mbufs.

remove tcp_input copy in to mbuf from sockaddr and just copy to sockaddr
to make it possible for the transitional functions to go away.

no version bump since these functions only existed for a short time and
were commented as adapters (they appeared in 7.99.15).

Revision 1.160: download - view: text, markup, annotated - select for diffs
Sat May 2 17:18:03 2015 UTC (9 years, 7 months ago) by rtr
Branches: MAIN
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +18 -6 lines
make connect syscall use sockaddr_big and modify pr_{send,connect}
nam parameter type from buf * to sockaddr *.

final commit for parameter type changes to protocol user requests

* bump kernel version to 7.99.15 for parameter type changes to pr_{send,connect}

Revision 1.159: download - view: text, markup, annotated - select for diffs
Sat May 2 14:41:32 2015 UTC (9 years, 7 months ago) by roy
Branches: MAIN
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +4 -2 lines
Add IPv4 address flags IN_IFF_TENTATIVE, IN_IFF_DUPLICATED and
IN_IFF_DETATCHED to mimic the IPv6 address behaviour.
Add SIOCGIFAFLAG_IN ioctl to retrieve the address flag via the
ifreq structure.
Add IPv4 DAD detection via the ARP methods described in RFC 5227.
Add sysctls net.inet.ip.dad_count and net.inet.arp.debug.

Discussed on tech-net@

Revision 1.158: download - view: text, markup, annotated - select for diffs
Sun Apr 26 16:45:51 2015 UTC (9 years, 7 months ago) by rtr
Branches: MAIN
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +4 -2 lines
return EINVAL if sin{,6}_len != sizeof(sockaddr_in{,6}) respectively in
in{,6}_pcbconnect().

checking just m->m_len isn't enough because there are various places that
assume sa_len has been properly populated.

Revision 1.157: download - view: text, markup, annotated - select for diffs
Fri Apr 24 22:32:37 2015 UTC (9 years, 7 months ago) by rtr
Branches: MAIN
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +4 -10 lines
make accept, getsockname and getpeername syscalls use sockaddr_big and modify
pr_{accept,sockname,peername} nam parameter type from mbuf * to sockaddr *.

* retained use of mbuftypes[MT_SONAME] for now.
* bump to netbsd version 7.99.12 for parameter type change.

patch posted to tech-net@ 2015/04/19

Revision 1.155.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 6 15:18:23 2015 UTC (9 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +5 -7 lines
Sync with HEAD

Revision 1.156: download - view: text, markup, annotated - select for diffs
Fri Apr 3 20:01:07 2015 UTC (9 years, 8 months ago) by rtr
Branches: MAIN
CVS tags: nick-nhusb-base-20150406
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +5 -7 lines
* change pr_bind to accept struct sockaddr * instead of struct mbuf *
* update protocol bind implementations to use/expect sockaddr *
  instead of mbuf *
* introduce sockaddr_big struct for storage of addr data passed via
  sys_bind; sockaddr_big is of sufficient size and alignment to
  accommodate all addr data sizes received.
* modify sys_bind to allocate sockaddr_big instead of using an mbuf.
* bump kernel version to 7.99.9 for change to pr_bind() parameter type.

Patch posted to tech-net@
  http://mail-index.netbsd.org/tech-net/2015/03/15/msg005004.html

The choice to use a new structure sockaddr_big has been retained since
changing sockaddr_storage size would lead to unnecessary ABI change. The
use of the new structure does not preclude future work that increases
the size of sockaddr_storage and at that time sockaddr_big may be
trivially replaced.

Tested by mrg@ and myself, discussed with rmind@, posted to tech-net@

Revision 1.151.2.2: download - view: text, markup, annotated - select for diffs
Sat Jan 17 12:10:53 2015 UTC (9 years, 10 months ago) by martin
Branches: 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
Diff to: previous 1.151.2.1: preferred, colored; branchpoint 1.151: preferred, colored; next MAIN 1.152: preferred, colored
Changes since revision 1.151.2.1: +2 -3 lines
Pull up following revision(s) (requested by maxv in ticket #427):
	sys/compat/svr4/svr4_schedctl.c: revision 1.8
	sys/netinet/tcp_timer.c: revision 1.88
	sys/miscfs/genfs/layer_vfsops.c: revision 1.45
	sys/compat/svr4/svr4_ioctl.c: revision 1.37
	sys/ufs/chfs/chfs_vfsops.c: revision 1.14
	sys/miscfs/fdesc/fdesc_vfsops.c: revision 1.91
	sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.30
	sys/compat/common/kern_time_50.c: revision 1.28
	sys/netinet6/ip6_forward.c: revision 1.74
	sys/miscfs/umapfs/umap_vnops.c: revision 1.57
	sys/compat/svr4/svr4_fcntl.c: revision 1.74
	distrib/sets/lists/comp/mi: revision 1.1931
	sys/netinet6/udp6_output.c: revision 1.46
	sys/fs/puffs/puffs_compat.c: revision 1.3
	sys/fs/udf/udf_rename.c: revision 1.11
	sys/compat/svr4/svr4_filio.c: revision 1.24
	sys/fs/udf/udf_rename.c: revision 1.12
	sys/netinet/tcp_usrreq.c: revision 1.202
	sys/miscfs/umapfs/umap_subr.c: revision 1.29
	sys/compat/linux/common/linux_fadvise64.c: revision 1.3
	sys/netinet/if_atm.c: revision 1.34
	sys/miscfs/procfs/procfs_subr.c: revision 1.106
	sys/miscfs/genfs/layer_subr.c: revision 1.37
	sys/netinet/tcp_sack.c: revision 1.30
	sys/compat/freebsd/freebsd_misc.c: revision 1.33
	sys/compat/freebsd/freebsd_file.c: revision 1.33
	sys/ufs/chfs/chfs_vnode.c: revision 1.12
	sys/compat/svr4/svr4_ttold.c: revision 1.34
	sys/compat/linux/common/linux_file.c: revision 1.114
	sys/compat/linux/arch/mips/linux_machdep.c: revision 1.43
	sys/compat/linux/common/linux_signal.c: revision 1.76
	sys/compat/common/compat_util.c: revision 1.46
	sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.18
	sys/compat/svr4/svr4_sockio.c: revision 1.36
	sys/compat/linux/arch/arm/linux_machdep.c: revision 1.32
	sys/compat/svr4/svr4_signal.c: revision 1.66
	sys/kern/kern_exec.c: revision 1.410
	sys/fs/puffs/puffs_vfsops.c: revision 1.115
	sys/compat/svr4/svr4_exec_elf64.c: revision 1.15
	sys/compat/linux/arch/i386/linux_machdep.c: revision 1.159
	sys/compat/linux/arch/alpha/linux_machdep.c: revision 1.50
	sys/compat/linux32/common/linux32_misc.c: revision 1.24
	sys/netinet/in_pcb.c: revision 1.153
	sys/sys/malloc.h: revision 1.116
	sys/compat/common/if_43.c: revision 1.9
	share/man/man9/Makefile: revision 1.380
	sys/netinet/tcp_vtw.c: revision 1.12
	sys/miscfs/umapfs/umap_vfsops.c: revision 1.95
	sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.186
	sys/compat/common/uipc_syscalls_43.c: revision 1.46
	sys/ufs/ext2fs/ext2fs_vnops.c: revision 1.115
	sys/fs/puffs/puffs_msgif.c: revision 1.97
	sys/compat/svr4/svr4_ipc.c: revision 1.27
	sys/compat/linux/common/linux_exec.c: revision 1.117
	sys/ufs/ext2fs/ext2fs_readwrite.c: revision 1.66
	sys/netinet/tcp_output.c: revision 1.179
	sys/compat/svr4/svr4_termios.c: revision 1.28
	sys/fs/udf/udf_strat_bootstrap.c: revision 1.4
	sys/fs/puffs/puffs_subr.c: revision 1.67
	sys/fs/puffs/puffs_node.c: revision 1.36
	sys/miscfs/overlay/overlay_vnops.c: revision 1.21
	sys/fs/cd9660/cd9660_node.c: revision 1.34
	sys/netinet/raw_ip.c: revision 1.146
	sys/sys/mallocvar.h: revision 1.13
	sys/miscfs/overlay/overlay_vfsops.c: revision 1.63
	share/man/man9/malloc.9: revision 1.50
	sys/netinet6/dest6.c: revision 1.18
	sys/compat/linux/common/linux_uselib.c: revision 1.33
	sys/compat/linux/common/linux_socket.c: revision 1.120
	share/man/man9/malloc.9: revision 1.51
	sys/netinet/tcp_subr.c: revision 1.257
	sys/compat/linux/common/linux_socketcall.c: revision 1.45
	sys/compat/linux/common/linux_fadvise64_64.c: revision 1.3
	sys/compat/freebsd/freebsd_ipc.c: revision 1.17
	sys/compat/linux/common/linux_misc_notalpha.c: revision 1.109
	sys/compat/linux/arch/alpha/linux_pipe.c: revision 1.17
	sys/netinet6/in6_pcb.c: revision 1.132
	sys/netinet6/in6_ifattach.c: revision 1.94
	sys/compat/svr4/svr4_exec_elf32.c: revision 1.15
	sys/miscfs/nullfs/null_vfsops.c: revision 1.90
	sys/fs/cd9660/cd9660_util.c: revision 1.12
	sys/compat/linux/arch/powerpc/linux_machdep.c: revision 1.48
	sys/compat/freebsd/freebsd_exec_elf32.c: revision 1.20
	sys/miscfs/procfs/procfs_vfsops.c: revision 1.94
	sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.28
	sys/compat/linux/common/linux_sched.c: revision 1.67
	sys/compat/linux/common/linux_exec_aout.c: revision 1.67
	sys/compat/linux/common/linux_pipe.c: revision 1.67
	sys/compat/linux/common/linux_llseek.c: revision 1.34
	sys/compat/linux/arch/mips/linux_ptrace.c: revision 1.10
Do not uselessly include <sys/malloc.h>.
Cleanup:
 - remove struct kmembuckets (dead)
 - correctly deadify MALLOC_XX
 - remove MALLOC_DEFINE_LIMIT and MALLOC_JUSTDEFINE_LIMIT (dead)
 - remove malloc_roundup(), malloc_type_setlimit(), MALLOC_DEFINE_LIMIT()
   and MALLOC_JUSTDEFINE_LIMIT() from man 9 malloc
New sentence, new line. Bump date for previous.
Obsolete malloc_roundup(9), malloc_type_setlimit(9) and MALLOC_DEFINE_LIMIT(9)
man pages.

Revision 1.155: download - view: text, markup, annotated - select for diffs
Tue Nov 25 19:09:13 2014 UTC (10 years ago) by seanb
Branches: MAIN
CVS tags: nick-nhusb-base
Branch point for: nick-nhusb
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +3 -3 lines
Really make SO_REUSEPORT and SO_REUSEADDR equivalent for multicast
sockets.  From FreeBSD.

Revision 1.154: download - view: text, markup, annotated - select for diffs
Tue Nov 25 15:04:37 2014 UTC (10 years ago) by seanb
Branches: MAIN
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +32 -28 lines
Clean up any dangling ifp references in (struct in6pcb *)->in6p_v4moptions
(v4 multicast options off v4 mapped v6 socket) on interface destruction.  The
code to clean this up in a true v4 socket was moved to its own function
which is now also called in the corresponding place for v6 sockets on
interface destruction.

Revision 1.153: download - view: text, markup, annotated - select for diffs
Mon Nov 10 18:52:51 2014 UTC (10 years, 1 month ago) by maxv
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +2 -3 lines
Do not uselessly include <sys/malloc.h>.

Revision 1.151.2.1: download - view: text, markup, annotated - select for diffs
Mon Sep 8 19:12:04 2014 UTC (10 years, 3 months ago) by msaitoh
Branches: netbsd-7
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +3 -3 lines
Pull up following revision(s) (requested by rmind in ticket #80):
	sys/netinet6/in6_pcb.c: revision 1.129
	sys/netinet/in_pcb.c: revision 1.152
in_pcbdetach: move ip_freemoptions() under softnet_lock for now (this will
be changed back once other IP paths become MP-safe).  Same for IPv6 routine.
This partially reverts 1.150 of in_pcb.c and 1.127 of in6_pcb.c changes.

Revision 1.152: download - view: text, markup, annotated - select for diffs
Sun Sep 7 00:50:56 2014 UTC (10 years, 3 months ago) by rmind
Branches: MAIN
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +3 -3 lines
in_pcbdetach: move ip_freemoptions() under softnet_lock for now (this will
be changed back once other IP paths become MP-safe).  Same for IPv6 routine.

This partially reverts 1.150 of in_pcb.c and 1.127 of in6_pcb.c changes.

Revision 1.143.2.2: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:04:35 2014 UTC (10 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.143.2.1: preferred, colored; branchpoint 1.143: preferred, colored
Changes since revision 1.143.2.1: +36 -119 lines
Rebase to HEAD as of a few days ago.

Revision 1.146.2.1: download - view: text, markup, annotated - select for diffs
Sun Aug 10 06:56:25 2014 UTC (10 years, 4 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.146: preferred, colored; next MAIN 1.147: preferred, colored
Changes since revision 1.146: +26 -101 lines
Rebase.

Revision 1.151: download - view: text, markup, annotated - select for diffs
Tue Aug 5 05:24:26 2014 UTC (10 years, 4 months ago) by rtr
Branches: MAIN
CVS tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base
Branch point for: netbsd-7
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +6 -6 lines
revert the removal of struct lwp * parameter from bind, listen and connect
user requests.

this should resolve the issue relating to nfs client hangs presented
recently by wiz on current-users@

Revision 1.150: download - view: text, markup, annotated - select for diffs
Sun Aug 3 22:11:50 2014 UTC (10 years, 4 months ago) by rmind
Branches: MAIN
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +13 -9 lines
in_pcbdetach: not that IGMP and multicast groups are MP-safe, we can move
the ip_freemoptions() call outside the softnet_lock.  Should fix PR/49065.

Revision 1.149: download - view: text, markup, annotated - select for diffs
Thu Jul 24 15:12:03 2014 UTC (10 years, 4 months ago) by rtr
Branches: MAIN
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +6 -6 lines
split PRU_BIND and PRU_LISTEN function out of pr_generic() usrreq
switches and put into separate functions
  xxx_bind(struct socket *, struct mbuf *)
  xxx_listen(struct socket *)

  - always KASSERT(solocked(so)) even if not implemented

  - replace calls to pr_generic() with req = PRU_BIND with call to
    pr_bind()

  - replace calls to pr_generic() with req = PRU_LISTEN with call to
    pr_listen()

  - drop struct lwp * parameter from at_pcbsetaddr(), in_pcbbind() and
    unp_bind() and always use curlwp.

rename existing functions that operate on PCB for consistency (and to
free up their names for xxx_{bind,listen}() PRUs

  - l2cap_{bind,listen}() -> l2cap_{bind,listen}_pcb()
  - sco_{bind,listen}() -> sco_{bind,listen}_pcb()
  - rfcomm_{bind,listen}() -> rfcomm_{bind,listen}_pcb()

patch reviewed by rmind

welcome to netbsd 6.99.48

Revision 1.148: download - view: text, markup, annotated - select for diffs
Fri May 30 01:39:03 2014 UTC (10 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +16 -15 lines
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.147: download - view: text, markup, annotated - select for diffs
Thu May 22 22:01:12 2014 UTC (10 years, 6 months ago) by rmind
Branches: MAIN
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +2 -82 lines
- Add in_init() and move some functions, variables and sysctls into in.c
  where they belong to.  Make some functions and variables static.
- ip_input.c: reduce some #ifdefs, cleanup a little.
- Move some sysctls into ip_flow.c as they belong there.

No functional change.

Revision 1.139.2.3: download - view: text, markup, annotated - select for diffs
Thu May 22 11:41:09 2014 UTC (10 years, 6 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.139.2.2: preferred, colored; branchpoint 1.139: preferred, colored; next MAIN 1.140: preferred, colored
Changes since revision 1.139.2.2: +25 -28 lines
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.145.2.4: download - view: text, markup, annotated - select for diffs
Sun May 18 17:46:13 2014 UTC (10 years, 6 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.145.2.3: preferred, colored; branchpoint 1.145: preferred, colored; next MAIN 1.146: preferred, colored
Changes since revision 1.145.2.3: +13 -17 lines
sync with head

Revision 1.146: download - view: text, markup, annotated - select for diffs
Sat Nov 23 14:20:21 2013 UTC (11 years ago) by christos
Branches: MAIN
CVS tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +14 -22 lines
convert from CIRCLEQ to TAILQ.

Revision 1.145.2.3: download - view: text, markup, annotated - select for diffs
Mon Sep 23 00:57:53 2013 UTC (11 years, 2 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.145.2.2: preferred, colored; branchpoint 1.145: preferred, colored
Changes since revision 1.145.2.2: +141 -82 lines
- Add some initial locking to the IPv4 PCB.
- Rename inpcb_lookup_*() routines to be more accurate and add comments.
- Add some comments about connection life-cycle WRT socket layer.

Revision 1.145.2.2: download - view: text, markup, annotated - select for diffs
Wed Aug 28 15:21:48 2013 UTC (11 years, 3 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.145.2.1: preferred, colored; branchpoint 1.145: preferred, colored
Changes since revision 1.145.2.1: +2 -4 lines
Checkpoint work in progress:
- Initial split of the protocol user-request method into the following
  methods: pr_attach, pr_detach and pr_generic for old the pr_usrreq.
- Adjust socreate(9) and sonewconn(9) to call pr_attach without the
  socket lock held (as a preparation for the locking scheme adjustment).
- Adjust all pr_attach routines to assert that PCB is not set.
- Sprinkle various comments, document some routines and their locking.
- Remove M_PCB, replace with kmem(9).
- Fix few bugs spotted on the way.

Revision 1.145.2.1: download - view: text, markup, annotated - select for diffs
Wed Jul 17 03:16:31 2013 UTC (11 years, 4 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +715 -381 lines
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.143.2.1: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:20:25 2013 UTC (11 years, 5 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +13 -8 lines
resync from head

Revision 1.145: download - view: text, markup, annotated - select for diffs
Wed Jun 5 19:01:26 2013 UTC (11 years, 6 months ago) by christos
Branches: MAIN
CVS tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Branch point for: rmind-smpnet
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +8 -8 lines
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.144: download - view: text, markup, annotated - select for diffs
Fri Apr 12 21:30:40 2013 UTC (11 years, 8 months ago) by christos
Branches: MAIN
CVS tags: khorben-n900
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +7 -2 lines
PR/47738: connect(2) to 239.x.y.z should return error but does not.

Revision 1.139.2.2: download - view: text, markup, annotated - select for diffs
Tue Oct 30 17:22:45 2012 UTC (12 years, 1 month ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.139.2.1: preferred, colored; branchpoint 1.139: preferred, colored
Changes since revision 1.139.2.1: +24 -9 lines
sync with head

Revision 1.143: download - view: text, markup, annotated - select for diffs
Mon Jun 25 15:28:39 2012 UTC (12 years, 5 months ago) by christos
Branches: MAIN
CVS tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +5 -5 lines
rename rfc6056 -> portalgo, requested by yamt

Revision 1.142: download - view: text, markup, annotated - select for diffs
Thu Jun 21 10:31:45 2012 UTC (12 years, 5 months ago) by yamt
Branches: MAIN
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +21 -6 lines
constify, comments.
no functional changes.

Revision 1.139.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:08:40 2012 UTC (12 years, 7 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +8 -11 lines
sync with head

Revision 1.139.6.2: download - view: text, markup, annotated - select for diffs
Thu Apr 5 21:33:43 2012 UTC (12 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.139.6.1: preferred, colored; branchpoint 1.139: preferred, colored; next MAIN 1.140: preferred, colored
Changes since revision 1.139.6.1: +8 -11 lines
sync to latest -current.

Revision 1.141: download - view: text, markup, annotated - select for diffs
Thu Mar 22 20:34:38 2012 UTC (12 years, 8 months ago) by drochner
Branches: MAIN
CVS tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base10
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +8 -11 lines
remove KAME IPSEC, replaced by FAST_IPSEC

Revision 1.139.6.1: download - view: text, markup, annotated - select for diffs
Sat Feb 18 07:35:39 2012 UTC (12 years, 9 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +8 -8 lines
merge to -current.

Revision 1.140: download - view: text, markup, annotated - select for diffs
Mon Dec 19 11:59:56 2011 UTC (12 years, 11 months ago) by drochner
Branches: 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
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +8 -8 lines
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.139: download - view: text, markup, annotated - select for diffs
Sat Sep 24 17:18:17 2011 UTC (13 years, 2 months ago) by christos
Branches: 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
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +24 -40 lines
Add inet4 part of the rfc6056 code contributed by Vlad Balan as part of
Google SoC-2011

Revision 1.137.6.1: download - view: text, markup, annotated - select for diffs
Mon Jun 6 09:09:55 2011 UTC (13 years, 6 months ago) by jruoho
Branches: jruoho-x86intr
Diff to: previous 1.137: preferred, colored; next MAIN 1.138: preferred, colored
Changes since revision 1.137: +98 -10 lines
Sync with HEAD.

Revision 1.137.4.1: download - view: text, markup, annotated - select for diffs
Tue May 31 03:05:07 2011 UTC (13 years, 6 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.137: preferred, colored; next MAIN 1.138: preferred, colored
Changes since revision 1.137: +98 -10 lines
sync with head

Revision 1.138: download - view: text, markup, annotated - select for diffs
Tue May 3 18:28:45 2011 UTC (13 years, 7 months ago) by dyoung
Branches: MAIN
CVS tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +98 -10 lines
Reduces the resources demanded by TCP sessions in TIME_WAIT-state using
methods called Vestigial Time-Wait (VTW) and Maximum Segment Lifetime
Truncation (MSLT).

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

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

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

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

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

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

Revision 1.129.10.1.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 21 00:28:22 2010 UTC (14 years, 7 months ago) by matt
Branches: matt-nb5-mips64
CVS tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Diff to: previous 1.129.10.1: preferred, colored; next MAIN 1.130: preferred, colored
Changes since revision 1.129.10.1: +2 -2 lines
sync to netbsd-5

Revision 1.123.2.3: download - view: text, markup, annotated - select for diffs
Sat May 16 10:41:50 2009 UTC (15 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.123.2.2: preferred, colored; branchpoint 1.123: preferred, colored; next MAIN 1.124: preferred, colored
Changes since revision 1.123.2.2: +7 -5 lines
sync with head

Revision 1.129.8.1: download - view: text, markup, annotated - select for diffs
Wed May 13 17:22:28 2009 UTC (15 years, 7 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.129: preferred, colored; next MAIN 1.130: preferred, colored
Changes since revision 1.129: +181 -99 lines
Sync with HEAD.

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

Revision 1.137: download - view: text, markup, annotated - select for diffs
Tue May 12 22:22:46 2009 UTC (15 years, 7 months ago) by elad
Branches: MAIN
CVS tags: yamt-nfs-mp-base9, yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, 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, jym-xensuspend-base, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: rmind-uvmplock, jruoho-x86intr
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +4 -4 lines
Implicit EPERM -> explicit EACCES.

Requested by ad@ and yamt@.

Revision 1.129.10.1: download - view: text, markup, annotated - select for diffs
Sun May 10 20:46:58 2009 UTC (15 years, 7 months ago) by snj
Branches: 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
Diff to: previous 1.129: preferred, colored; next MAIN 1.130: preferred, colored
Changes since revision 1.129: +4 -2 lines
Apply patch (requested by sborrill in ticket #745):
Fix compilation with IPNOPRIVPORTS option.

Revision 1.129.4.1: download - view: text, markup, annotated - select for diffs
Sun May 10 20:45:45 2009 UTC (15 years, 7 months ago) by snj
Branches: 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
Diff to: previous 1.129: preferred, colored; next MAIN 1.130: preferred, colored
Changes since revision 1.129: +4 -2 lines
Apply patch (requested by sborrill in ticket #745):
Fix compilation with IPNOPRIVPORTS option.

Revision 1.136: download - view: text, markup, annotated - select for diffs
Sat May 9 20:54:52 2009 UTC (15 years, 7 months ago) by elad
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +5 -3 lines
Add check for IN_MULTICAST() that was taken only to in_pcbbind_port() --
it's necessary in in_pcbbind_addr() as well.

Pointed out by Mihai Chelaru on tech-net@, thanks!

Revision 1.123.2.2: download - view: text, markup, annotated - select for diffs
Mon May 4 08:14:17 2009 UTC (15 years, 7 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.123.2.1: preferred, colored; branchpoint 1.123: preferred, colored
Changes since revision 1.123.2.1: +197 -105 lines
sync with head.

Revision 1.135: download - view: text, markup, annotated - select for diffs
Thu Apr 30 20:26:09 2009 UTC (15 years, 7 months ago) by elad
Branches: MAIN
CVS tags: yamt-nfs-mp-base3
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +3 -2 lines
Commit changes to netinet6/in6_src.c, forgot in previous commit:

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

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

Revision 1.134: download - view: text, markup, annotated - select for diffs
Thu Apr 30 18:18:34 2009 UTC (15 years, 7 months ago) by elad
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +33 -14 lines
- Make in6_pcbbind_{addr,port}() static

- Properly authorize port binding in in_pcbsetport() and in6_pcbsetport()

- Pass struct sockaddr_in6 to in6_pcbsetport() instead of just the address,
  so that we have a more complete context

- Adjust udp6_output() to craft a sockaddr_in6 as it calls in6_pcbsetport()

- Fix an issue in in_pcbbind() where we used the "dom_sa_any" pointer and
  not a copy of it, pointed out by bouyer@, thanks!

Mailing list reference:

	http://mail-index.netbsd.org/tech-net/2009/04/29/msg001259.html

Revision 1.129.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 28 07:37:22 2009 UTC (15 years, 7 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.129: preferred, colored; next MAIN 1.130: preferred, colored
Changes since revision 1.129: +160 -100 lines
Sync with HEAD.

Revision 1.133: download - view: text, markup, annotated - select for diffs
Thu Apr 23 17:02:26 2009 UTC (15 years, 7 months ago) by elad
Branches: MAIN
CVS tags: nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +22 -18 lines
- Make kauth(9) call logic match the one in netinet6/in6_pcb.c

- Indent a comment

Revision 1.132: download - view: text, markup, annotated - select for diffs
Thu Apr 23 16:42:56 2009 UTC (15 years, 7 months ago) by elad
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +143 -86 lines
Some changes to in_pcbbind():

  - Extract guts to in_pcbbind_{addr,port}()

  - Put the port auto-assignment logic in in_pcbsetport(), which looks very
    similar to in6_pcbsetport()

  - Fix a bug where "sin" was passed to kauth(9) without being set to
    anything

No objections on tech-net@.

Revision 1.131: download - view: text, markup, annotated - select for diffs
Tue Apr 14 21:25:20 2009 UTC (15 years, 7 months ago) by elad
Branches: MAIN
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +2 -3 lines
Don't set sin->sin_port and sin6->sin6_port to 0 before calling
ifa_ifwithaddr(), as we no longer do a byte compare on the entire struct.

Reviewed by and okay from dyoung@.

Revision 1.130: download - view: text, markup, annotated - select for diffs
Wed Mar 18 16:00:22 2009 UTC (15 years, 8 months ago) by cegger
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +3 -3 lines
bzero -> memset

Revision 1.122.6.4: download - view: text, markup, annotated - select for diffs
Sat Jan 17 13:29:32 2009 UTC (15 years, 10 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.122.6.3: preferred, colored; branchpoint 1.122: preferred, colored; next MAIN 1.123: preferred, colored
Changes since revision 1.122.6.3: +1 -0 lines
Sync with HEAD.

Revision 1.125.6.1: download - view: text, markup, annotated - select for diffs
Sun Oct 19 22:17:46 2008 UTC (16 years, 1 month ago) by haad
Branches: haad-dm
Diff to: previous 1.125: preferred, colored; next MAIN 1.126: preferred, colored
Changes since revision 1.125: +19 -7 lines
Sync with HEAD.

Revision 1.129: download - view: text, markup, annotated - select for diffs
Sat Oct 11 13:40:57 2008 UTC (16 years, 2 months ago) by pooka
Branches: 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
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +3 -2 lines
Move uidinfo to its own module in kern_uidinfo.c and include in rump.
No functional change to uidinfo.

Revision 1.125.2.2: download - view: text, markup, annotated - select for diffs
Fri Oct 10 22:35:43 2008 UTC (16 years, 2 months ago) by skrll
Branches: wrstuden-revivesa
Diff to: previous 1.125.2.1: preferred, colored; branchpoint 1.125: preferred, colored; next MAIN 1.126: preferred, colored
Changes since revision 1.125.2.1: +16 -4 lines
Sync with HEAD.

Revision 1.122.6.3: download - view: text, markup, annotated - select for diffs
Sun Oct 5 20:11:32 2008 UTC (16 years, 2 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.122.6.2: preferred, colored; branchpoint 1.122: preferred, colored
Changes since revision 1.122.6.2: +14 -2 lines
Sync with HEAD.

Revision 1.128: download - view: text, markup, annotated - select for diffs
Fri Oct 3 16:22:33 2008 UTC (16 years, 2 months ago) by pooka
Branches: MAIN
CVS tags: wrstuden-revivesa-base-4
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +16 -4 lines
Hallo, pool_init().  Auf wiedersehen & byebye, link set POOL_INIT().

Revision 1.122.6.2: download - view: text, markup, annotated - select for diffs
Sun Sep 28 10:40:58 2008 UTC (16 years, 2 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.122.6.1: preferred, colored; branchpoint 1.122: preferred, colored
Changes since revision 1.122.6.1: +2 -3 lines
Sync with HEAD.

Revision 1.125.2.1: download - view: text, markup, annotated - select for diffs
Thu Sep 18 04:37:00 2008 UTC (16 years, 2 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +4 -5 lines
Sync with wrstuden-revivesa-base-2.

Revision 1.127: download - view: text, markup, annotated - select for diffs
Mon Aug 4 07:01:05 2008 UTC (16 years, 4 months ago) by spz
Branches: MAIN
CVS tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +3 -3 lines
typo fix in comment (drops the ' in drop's :)

Revision 1.126: download - view: text, markup, annotated - select for diffs
Mon Aug 4 06:29:58 2008 UTC (16 years, 4 months ago) by matt
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +4 -5 lines
Free the socket only after disposing of the PCB.

Revision 1.122.6.1: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:24:24 2008 UTC (16 years, 6 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +10 -15 lines
Sync with HEAD.

Revision 1.122.8.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:35:28 2008 UTC (16 years, 6 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.122: preferred, colored; next MAIN 1.123: preferred, colored
Changes since revision 1.122: +10 -15 lines
sync with head.

Revision 1.123.2.1: download - view: text, markup, annotated - select for diffs
Fri May 16 02:25:41 2008 UTC (16 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +8 -15 lines
sync with head.

Revision 1.125: download - view: text, markup, annotated - select for diffs
Mon May 5 17:11:17 2008 UTC (16 years, 7 months ago) by ad
Branches: 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
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +8 -8 lines
- Convert hashinit() to use kmem_alloc(). The hash tables can be large
  and it's better to not have them in kmem_map.
- Convert a couple of minor items along the way to kmem_alloc().
- Fix some memory leaks.

Revision 1.124: download - view: text, markup, annotated - select for diffs
Mon Apr 28 20:24:09 2008 UTC (16 years, 7 months ago) by martin
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +2 -9 lines
Remove clause 3 and 4 from TNF licenses

Revision 1.123: download - view: text, markup, annotated - select for diffs
Thu Apr 24 11:38:37 2008 UTC (16 years, 7 months ago) by ad
Branches: MAIN
CVS tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +4 -2 lines
Merge the socket locking patch:

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

With much feedback from matt@ and plunky@.

Revision 1.119.2.2: download - view: text, markup, annotated - select for diffs
Sun Mar 23 02:05:06 2008 UTC (16 years, 8 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.119.2.1: preferred, colored; branchpoint 1.119: preferred, colored; next MAIN 1.120: preferred, colored
Changes since revision 1.119.2.1: +23 -23 lines
sync with HEAD

Revision 1.119.8.1: download - view: text, markup, annotated - select for diffs
Mon Feb 18 21:07:08 2008 UTC (16 years, 9 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.119: preferred, colored; next MAIN 1.120: preferred, colored
Changes since revision 1.119: +25 -23 lines
Sync with HEAD.

Revision 1.100.2.5: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:47:14 2008 UTC (16 years, 10 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.100.2.4: preferred, colored; branchpoint 1.100: preferred, colored; next MAIN 1.101: preferred, colored
Changes since revision 1.100.2.4: +30 -26 lines
sync with head

Revision 1.119.14.2: download - view: text, markup, annotated - select for diffs
Sat Jan 19 12:15:31 2008 UTC (16 years, 10 months ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.119.14.1: preferred, colored; branchpoint 1.119: preferred, colored; next MAIN 1.120: preferred, colored
Changes since revision 1.119.14.1: +21 -21 lines
Sync with HEAD

Revision 1.122: download - view: text, markup, annotated - select for diffs
Mon Jan 14 04:19:09 2008 UTC (16 years, 11 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base, 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, bouyer-xeni386-nbase, bouyer-xeni386-base, ad-socklock-base1
Branch point for: yamt-pf42, mjf-devfs2
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +23 -23 lines
Use rtcache_validate() instead of rtcache_getrt().  Shorten staircase
in in_losing().

Revision 1.119.2.1: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:57:25 2008 UTC (16 years, 11 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +14 -10 lines
sync with HEAD

Revision 1.119.14.1: download - view: text, markup, annotated - select for diffs
Wed Jan 2 21:57:19 2008 UTC (16 years, 11 months ago) by bouyer
Branches: bouyer-xeni386
CVS tags: bouyer-xeni386-merge1
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +14 -10 lines
Sync with HEAD

Revision 1.119.10.1: download - view: text, markup, annotated - select for diffs
Wed Dec 26 19:57:38 2007 UTC (16 years, 11 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.119: preferred, colored; next MAIN 1.120: preferred, colored
Changes since revision 1.119: +14 -10 lines
Sync with head.

Revision 1.121: download - view: text, markup, annotated - select for diffs
Thu Dec 20 19:53:32 2007 UTC (16 years, 11 months ago) by dyoung
Branches: MAIN
CVS tags: vmlocking2-base3, matt-armv6-base
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +10 -7 lines
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.120: download - view: text, markup, annotated - select for diffs
Sun Dec 16 14:12:34 2007 UTC (16 years, 11 months ago) by elad
Branches: MAIN
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +6 -5 lines
Really fix low port allocation, by always passing a valid lwp to
in_pcbbind().

Okay dyoung@.

Note that the network code is another candidate for major cleanup... also
note that this issue is likely to be present in netinet6 code, too.

Revision 1.115.2.4: download - view: text, markup, annotated - select for diffs
Tue Oct 9 13:44:48 2007 UTC (17 years, 2 months ago) by ad
Branches: vmlocking
Diff to: previous 1.115.2.3: preferred, colored; next MAIN 1.116: preferred, colored
Changes since revision 1.115.2.3: +6 -14 lines
Sync with head.

Revision 1.118.4.1: download - view: text, markup, annotated - select for diffs
Mon Sep 3 16:49:02 2007 UTC (17 years, 3 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.118: preferred, colored; next MAIN 1.119: preferred, colored
Changes since revision 1.118: +6 -14 lines
Sync with HEAD.

Revision 1.100.2.4: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:42:48 2007 UTC (17 years, 3 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.100.2.3: preferred, colored; branchpoint 1.100: preferred, colored
Changes since revision 1.100.2.3: +28 -47 lines
sync with head.

Revision 1.117.2.2: download - view: text, markup, annotated - select for diffs
Mon Sep 3 10:23:43 2007 UTC (17 years, 3 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.117.2.1: preferred, colored; branchpoint 1.117: preferred, colored; next MAIN 1.118: preferred, colored
Changes since revision 1.117.2.1: +6 -14 lines
Sync with HEAD.

Revision 1.119: download - view: text, markup, annotated - select for diffs
Tue Aug 21 08:34:33 2007 UTC (17 years, 3 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, vmlocking-base, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, nick-csl-alignment-base5, matt-armv6-prevmlocking, jmcneill-pm-base, jmcneill-base, cube-autoconf-base, cube-autoconf, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: vmlocking2, mjf-devfs, matt-armv6, bouyer-xeni386
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +6 -14 lines
Use sockaddr_in_init().

Revision 1.115.2.3: download - view: text, markup, annotated - select for diffs
Mon Aug 20 21:27:58 2007 UTC (17 years, 3 months ago) by ad
Branches: vmlocking
Diff to: previous 1.115.2.2: preferred, colored
Changes since revision 1.115.2.2: +3 -3 lines
Sync with HEAD.

Revision 1.117.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 15 13:49:44 2007 UTC (17 years, 3 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +3 -3 lines
Sync with HEAD.

Revision 1.118.6.2: download - view: text, markup, annotated - select for diffs
Thu Jul 19 20:48:55 2007 UTC (17 years, 4 months ago) by dyoung
Branches: matt-mips64
Diff to: previous 1.118.6.1: preferred, colored; branchpoint 1.118: preferred, colored; next MAIN 1.119: preferred, colored
Changes since revision 1.118.6.1: +969 -0 lines
Take steps to hide the radix_node implementation of the forwarding table
from the forwarding table's users:

        Introduce rt_walktree() for walking the routing table and
        applying a function to each rtentry.  Replace most
        rn_walktree() calls with it.

        Use rt_getkey()/rt_setkey() to get/set a route's destination.
        Keep a pointer to the sockaddr key in the rtentry, so that
        rtentry users do not have to grovel in the radix_node for
        the key.

        Add a RTM_GET method to rtrequest.  Use that instead of
        radix_node lookups in, e.g., carp(4).

Add sys/net/link_proto.c, which supplies sockaddr routines for
link-layer socket addresses (sockaddr_dl).

Cosmetic:

        Constify.  KNF.  Stop open-coding LIST_FOREACH, TAILQ_FOREACH,
        et cetera.  Use NULL instead of 0 for null pointers.  Use
        __arraycount().  Reduce gratuitous parenthesization.

        Stop using variadic arguments for rip6_output(), it is
        unnecessary.

        Remove the unnecessary rtentry member rt_genmask and the
        code to maintain it, since nothing actually used it.

        Make rt_maskedcopy() easier to read by using meaningful variable
        names.

        Extract a subroutine intern_netmask() for looking up a netmask in
        the masks table.

        Start converting backslash-ridden IPv6 macros in
        sys/netinet6/in6_var.h into inline subroutines that one
        can read without special eyeglasses.

One functional change: when the kernel serves an RTM_GET, RTM_LOCK,
or RTM_CHANGE request, it applies the netmask (if supplied) to a
destination before searching for it in the forwarding table.

I have changed sys/netinet/ip_carp.c, carp_setroute(), to remove
the unlawful radix_node knowledge.

Apart from the changes to carp(4), netiso, ATM, and strip(4), I
have run the changes on three nodes in my wireless routing testbed,
which involves IPv4 + IPv6 dynamic routing acrobatics, and it's
working beautifully so far.

Revision 1.118.6.1
Thu Jul 19 20:48:54 2007 UTC (17 years, 4 months ago) by dyoung
Branches: matt-mips64
FILE REMOVED
Changes since revision 1.118: +0 -969 lines
file in_pcb.c was added on branch matt-mips64 on 2007-07-19 20:48:55 +0000

Revision 1.118: download - view: text, markup, annotated - select for diffs
Thu Jul 19 20:48:54 2007 UTC (17 years, 4 months ago) by dyoung
Branches: MAIN
CVS tags: matt-mips64-base, hpcarm-cleanup
Branch point for: matt-mips64, jmcneill-pm
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +3 -3 lines
Take steps to hide the radix_node implementation of the forwarding table
from the forwarding table's users:

        Introduce rt_walktree() for walking the routing table and
        applying a function to each rtentry.  Replace most
        rn_walktree() calls with it.

        Use rt_getkey()/rt_setkey() to get/set a route's destination.
        Keep a pointer to the sockaddr key in the rtentry, so that
        rtentry users do not have to grovel in the radix_node for
        the key.

        Add a RTM_GET method to rtrequest.  Use that instead of
        radix_node lookups in, e.g., carp(4).

Add sys/net/link_proto.c, which supplies sockaddr routines for
link-layer socket addresses (sockaddr_dl).

Cosmetic:

        Constify.  KNF.  Stop open-coding LIST_FOREACH, TAILQ_FOREACH,
        et cetera.  Use NULL instead of 0 for null pointers.  Use
        __arraycount().  Reduce gratuitous parenthesization.

        Stop using variadic arguments for rip6_output(), it is
        unnecessary.

        Remove the unnecessary rtentry member rt_genmask and the
        code to maintain it, since nothing actually used it.

        Make rt_maskedcopy() easier to read by using meaningful variable
        names.

        Extract a subroutine intern_netmask() for looking up a netmask in
        the masks table.

        Start converting backslash-ridden IPv6 macros in
        sys/netinet6/in6_var.h into inline subroutines that one
        can read without special eyeglasses.

One functional change: when the kernel serves an RTM_GET, RTM_LOCK,
or RTM_CHANGE request, it applies the netmask (if supplied) to a
destination before searching for it in the forwarding table.

I have changed sys/netinet/ip_carp.c, carp_setroute(), to remove
the unlawful radix_node knowledge.

Apart from the changes to carp(4), netiso, ATM, and strip(4), I
have run the changes on three nodes in my wireless routing testbed,
which involves IPv4 + IPv6 dynamic routing acrobatics, and it's
working beautifully so far.

Revision 1.116.2.1: download - view: text, markup, annotated - select for diffs
Wed Jul 11 20:11:20 2007 UTC (17 years, 5 months ago) by mjf
Branches: mjf-ufs-trans
Diff to: previous 1.116: preferred, colored; next MAIN 1.117: preferred, colored
Changes since revision 1.116: +20 -32 lines
Sync with head.

Revision 1.115.2.2: download - view: text, markup, annotated - select for diffs
Fri Jun 8 14:17:44 2007 UTC (17 years, 6 months ago) by ad
Branches: vmlocking
Diff to: previous 1.115.2.1: preferred, colored
Changes since revision 1.115.2.1: +20 -32 lines
Sync with head.

Revision 1.113.2.4: download - view: text, markup, annotated - select for diffs
Mon May 7 10:55:58 2007 UTC (17 years, 7 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.113.2.3: preferred, colored; branchpoint 1.113: preferred, colored; next MAIN 1.114: preferred, colored
Changes since revision 1.113.2.3: +20 -32 lines
sync with head.

Revision 1.117: download - view: text, markup, annotated - select for diffs
Wed May 2 20:40:24 2007 UTC (17 years, 7 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-idlelwp-base8, nick-csl-alignment-base, mjf-ufs-trans-base
Branch point for: nick-csl-alignment
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +20 -32 lines
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.113.2.3: download - view: text, markup, annotated - select for diffs
Sat Mar 24 14:56:10 2007 UTC (17 years, 8 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.113.2.2: preferred, colored; branchpoint 1.113: preferred, colored
Changes since revision 1.113.2.2: +4 -3 lines
sync with head.

Revision 1.115.2.1: download - view: text, markup, annotated - select for diffs
Tue Mar 13 16:52:01 2007 UTC (17 years, 9 months ago) by ad
Branches: vmlocking
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +4 -3 lines
Sync with head.

Revision 1.116: download - view: text, markup, annotated - select for diffs
Mon Mar 12 18:18:35 2007 UTC (17 years, 9 months ago) by ad
Branches: MAIN
CVS tags: thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: mjf-ufs-trans
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +4 -3 lines
Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.

Revision 1.113.2.2: download - view: text, markup, annotated - select for diffs
Mon Mar 12 05:59:36 2007 UTC (17 years, 9 months ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.113.2.1: preferred, colored; branchpoint 1.113: preferred, colored
Changes since revision 1.113.2.1: +5 -5 lines
Sync with HEAD.

Revision 1.115: download - view: text, markup, annotated - select for diffs
Sun Mar 4 06:03:20 2007 UTC (17 years, 9 months ago) by christos
Branches: MAIN
Branch point for: vmlocking
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +5 -5 lines
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.113.2.1: download - view: text, markup, annotated - select for diffs
Tue Feb 27 16:54:53 2007 UTC (17 years, 9 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +7 -7 lines
- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.100.2.3: download - view: text, markup, annotated - select for diffs
Mon Feb 26 09:11:43 2007 UTC (17 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.100.2.2: preferred, colored; branchpoint 1.100: preferred, colored
Changes since revision 1.100.2.2: +10 -11 lines
sync with head.

Revision 1.114: download - view: text, markup, annotated - select for diffs
Sat Feb 17 22:34:11 2007 UTC (17 years, 9 months ago) by dyoung
Branches: MAIN
CVS tags: ad-audiomp-base, ad-audiomp
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +7 -7 lines
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.103.4.3: download - view: text, markup, annotated - select for diffs
Thu Feb 1 08:48:43 2007 UTC (17 years, 10 months ago) by ad
Branches: newlock2
Diff to: previous 1.103.4.2: preferred, colored; branchpoint 1.103: preferred, colored; next MAIN 1.104: preferred, colored
Changes since revision 1.103.4.2: +5 -6 lines
Sync with head.

Revision 1.113: download - view: text, markup, annotated - select for diffs
Fri Jan 26 19:15:26 2007 UTC (17 years, 10 months ago) by dyoung
Branches: MAIN
CVS tags: post-newlock2-merge, newlock2-nbase, newlock2-base
Branch point for: yamt-idlelwp
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +5 -6 lines
KNF: bzero -> memset, change (struct in_ifaddr *)0 to NULL.

Revision 1.103.4.2: download - view: text, markup, annotated - select for diffs
Fri Jan 12 01:04:14 2007 UTC (17 years, 11 months ago) by ad
Branches: newlock2
Diff to: previous 1.103.4.1: preferred, colored; branchpoint 1.103: preferred, colored
Changes since revision 1.103.4.1: +25 -38 lines
Sync with head.

Revision 1.100.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 30 20:50:33 2006 UTC (17 years, 11 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.100.2.1: preferred, colored; branchpoint 1.100: preferred, colored
Changes since revision 1.100.2.1: +50 -46 lines
sync with head.

Revision 1.104.2.3: download - view: text, markup, annotated - select for diffs
Mon Dec 18 11:42:21 2006 UTC (17 years, 11 months ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.104.2.2: preferred, colored; branchpoint 1.104: preferred, colored; next MAIN 1.105: preferred, colored
Changes since revision 1.104.2.2: +18 -17 lines
sync with head.

Revision 1.112: download - view: text, markup, annotated - select for diffs
Fri Dec 15 21:18:53 2006 UTC (17 years, 11 months ago) by joerg
Branches: MAIN
CVS tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +18 -17 lines
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.104.2.2: download - view: text, markup, annotated - select for diffs
Sun Dec 10 07:19:10 2006 UTC (18 years ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.104.2.1: preferred, colored; branchpoint 1.104: preferred, colored
Changes since revision 1.104.2.1: +30 -36 lines
sync with head.

Revision 1.111: download - view: text, markup, annotated - select for diffs
Sat Dec 9 05:33:04 2006 UTC (18 years ago) by dyoung
Branches: MAIN
CVS tags: yamt-splraiseipl-base3
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +21 -34 lines
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.110: download - view: text, markup, annotated - select for diffs
Fri Dec 8 16:06:22 2006 UTC (18 years ago) by joerg
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +3 -4 lines
When a dynamic route is deleted in in_losing and in6_losing, rtrequest
is called, but the current reference via the PCB is not removed. This
is effectively a leaked reference. Call rtfree unconditional.

Revision 1.103.4.1: download - view: text, markup, annotated - select for diffs
Sat Nov 18 21:39:36 2006 UTC (18 years ago) by ad
Branches: newlock2
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +24 -8 lines
Sync with head.

Revision 1.109: download - view: text, markup, annotated - select for diffs
Thu Nov 16 01:33:45 2006 UTC (18 years ago) by christos
Branches: MAIN
CVS tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +3 -3 lines
__unused removal on arguments; approved by core.

Revision 1.108: download - view: text, markup, annotated - select for diffs
Mon Nov 13 05:13:41 2006 UTC (18 years, 1 month ago) by dyoung
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +10 -2 lines
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.104.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 22 06:07:28 2006 UTC (18 years, 1 month ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +10 -6 lines
sync with head

Revision 1.107: download - view: text, markup, annotated - select for diffs
Thu Oct 12 01:32:37 2006 UTC (18 years, 2 months ago) by christos
Branches: MAIN
CVS tags: yamt-splraiseipl-base2
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +3 -3 lines
- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.106: download - view: text, markup, annotated - select for diffs
Thu Oct 5 17:35:19 2006 UTC (18 years, 2 months ago) by tls
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +7 -3 lines
Protect calls to pool_put/pool_get that may occur in interrupt context
with spl used to protect other allocations and frees, or datastructure
element insertion and removal, in adjacent code.

It is almost unquestionably the case that some of the spl()/splx() calls
added here are superfluous, but it really seems wrong to see:

	s=splfoo();
	/* frob data structure */
	splx(s);
	pool_put(x);

and if we think we need to protect the first operation, then it is hard
to see why we should not think we need to protect the next.  "Better
safe than sorry".

It is also almost unquestionably the case that I missed some pool
gets/puts from interrupt context with my strategy for finding these
calls; use of PR_NOWAIT is a strong hint that a pool may be used from
interrupt context but many callers in the kernel pass a "can wait/can't
wait" flag down such that my searches might not have found them.  One
notable area that needs to be looked at is pf.

See also:

http://mail-index.netbsd.org/tech-kern/2006/07/19/0003.html
http://mail-index.netbsd.org/tech-kern/2006/07/19/0009.html

Revision 1.105: download - view: text, markup, annotated - select for diffs
Tue Sep 19 21:42:30 2006 UTC (18 years, 2 months ago) by elad
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +4 -4 lines
Remove ugly (void *) casts from network scope authorization wrapper and
calls to it.

While here, adapt code for system scope listeners to avoid some more
casts (forgotten in previous run).

Update documentation.

Revision 1.101.8.3: download - view: text, markup, annotated - select for diffs
Thu Sep 14 12:31:55 2006 UTC (18 years, 3 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.101.8.2: preferred, colored; branchpoint 1.101: preferred, colored; next MAIN 1.102: preferred, colored
Changes since revision 1.101.8.2: +11 -7 lines
sync with head.

Revision 1.101.4.4: download - view: text, markup, annotated - select for diffs
Sat Sep 9 02:58:47 2006 UTC (18 years, 3 months ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
Diff to: previous 1.101.4.3: preferred, colored; branchpoint 1.101: preferred, colored; next MAIN 1.102: preferred, colored
Changes since revision 1.101.4.3: +10 -7 lines
sync with head

Revision 1.104: download - view: text, markup, annotated - select for diffs
Fri Sep 8 20:58:58 2006 UTC (18 years, 3 months ago) by elad
Branches: MAIN
CVS tags: yamt-splraiseipl-base, yamt-pdpolicy-base9
Branch point for: yamt-splraiseipl
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +11 -7 lines
First take at security model abstraction.

- Add a few scopes to the kernel: system, network, and machdep.

- Add a few more actions/sub-actions (requests), and start using them as
  opposed to the KAUTH_GENERIC_ISSUSER place-holders.

- Introduce a basic set of listeners that implement our "traditional"
  security model, called "bsd44". This is the default (and only) model we
  have at the moment.

- Update all relevant documentation.

- Add some code and docs to help folks who want to actually use this stuff:

  * There's a sample overlay model, sitting on-top of "bsd44", for
    fast experimenting with tweaking just a subset of an existing model.

    This is pretty cool because it's *really* straightforward to do stuff
    you had to use ugly hacks for until now...

  * And of course, documentation describing how to do the above for quick
    reference, including code samples.

All of these changes were tested for regressions using a Python-based
testsuite that will be (I hope) available soon via pkgsrc. Information
about the tests, and how to write new ones, can be found on:

	http://kauth.linbsd.org/kauthwiki

NOTE FOR DEVELOPERS: *PLEASE* don't add any code that does any of the
following:

  - Uses a KAUTH_GENERIC_ISSUSER kauth(9) request,
  - Checks 'securelevel' directly,
  - Checks a uid/gid directly.

(or if you feel you have to, contact me first)

This is still work in progress; It's far from being done, but now it'll
be a lot easier.

Relevant mailing list threads:

http://mail-index.netbsd.org/tech-security/2006/01/25/0011.html
http://mail-index.netbsd.org/tech-security/2006/03/24/0001.html
http://mail-index.netbsd.org/tech-security/2006/04/18/0000.html
http://mail-index.netbsd.org/tech-security/2006/05/15/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/01/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/25/0000.html

Many thanks to YAMAMOTO Takashi, Matt Thomas, and Christos Zoulas for help
stablizing kauth(9).

Full credit for the regression tests, making sure these changes didn't break
anything, goes to Matt Fleming and Jaime Fournier.

Happy birthday Randi! :)

Revision 1.101.8.2: download - view: text, markup, annotated - select for diffs
Fri Aug 11 15:46:33 2006 UTC (18 years, 4 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.101.8.1: preferred, colored; branchpoint 1.101: preferred, colored
Changes since revision 1.101.8.1: +9 -8 lines
sync with head

Revision 1.103: download - view: text, markup, annotated - select for diffs
Sun Jul 23 22:06:13 2006 UTC (18 years, 4 months ago) by ad
Branches: MAIN
CVS tags: yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: newlock2
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +9 -8 lines
Use the LWP cached credentials where sane.

Revision 1.100.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 21 15:11:00 2006 UTC (18 years, 5 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +10 -9 lines
sync with head.

Revision 1.101.6.1: download - view: text, markup, annotated - select for diffs
Thu Jun 1 22:38:46 2006 UTC (18 years, 6 months ago) by kardel
Branches: simonb-timecounters
CVS tags: simonb-timcounters-final
Diff to: previous 1.101: preferred, colored; next MAIN 1.102: preferred, colored
Changes since revision 1.101: +6 -4 lines
Sync with head.

Revision 1.101.12.1: download - view: text, markup, annotated - select for diffs
Wed May 24 15:50:44 2006 UTC (18 years, 6 months ago) by tron
Branches: peter-altq
Diff to: previous 1.101: preferred, colored; next MAIN 1.102: preferred, colored
Changes since revision 1.101: +6 -4 lines
Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.101.8.1: download - view: text, markup, annotated - select for diffs
Wed May 24 10:59:03 2006 UTC (18 years, 6 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +6 -4 lines
sync with head.

Revision 1.102: download - view: text, markup, annotated - select for diffs
Sun May 14 21:19:34 2006 UTC (18 years, 7 months ago) by elad
Branches: MAIN
CVS tags: yamt-pdpolicy-base6, yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base, chap-midi
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +6 -4 lines
integrate kauth.

Revision 1.101.10.3: download - view: text, markup, annotated - select for diffs
Sat May 6 23:32:11 2006 UTC (18 years, 7 months ago) by christos
Branches: elad-kernelauth
Diff to: previous 1.101.10.2: preferred, colored; branchpoint 1.101: preferred, colored; next MAIN 1.102: preferred, colored
Changes since revision 1.101.10.2: +3 -2 lines
- Move kauth_cred_t declaration to <sys/types.h>
- Cleanup struct ucred; forward declarations that are unused.
- Don't include <sys/kauth.h> in any header, but include it in the c files
  that need it.

Approved by core.

Revision 1.101.4.3: download - view: text, markup, annotated - select for diffs
Tue Mar 14 15:41:15 2006 UTC (18 years, 9 months ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
Diff to: previous 1.101.4.2: preferred, colored; branchpoint 1.101: preferred, colored
Changes since revision 1.101.4.2: +4 -5 lines
Remove last reference to in6pcb.

Revision 1.101.10.2: download - view: text, markup, annotated - select for diffs
Fri Mar 10 15:20:54 2006 UTC (18 years, 9 months ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.101.10.1: preferred, colored; branchpoint 1.101: preferred, colored
Changes since revision 1.101.10.1: +4 -4 lines
generic_authorize() -> kauth_authorize_generic().

Revision 1.101.10.1: download - view: text, markup, annotated - select for diffs
Wed Mar 8 01:19:40 2006 UTC (18 years, 9 months ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +5 -4 lines
Adapt to kernel authorization KPI.

Revision 1.101.4.2: download - view: text, markup, annotated - select for diffs
Tue Feb 14 02:17:12 2006 UTC (18 years, 9 months ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
Diff to: previous 1.101.4.1: preferred, colored; branchpoint 1.101: preferred, colored
Changes since revision 1.101.4.1: +15 -12 lines
Remove INPCBHASH_PORT, INPCBHASH_BIND, INPCBHASH_CONNECT (moved to
in_pcb.h).
If INET6, detect whether the pcb is v4 or v6 based on the socket
family (from FreeBSD).

Revision 1.101.4.1: download - view: text, markup, annotated - select for diffs
Thu Feb 2 00:05:30 2006 UTC (18 years, 10 months ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +22 -38 lines
Remove #include netinet6/in6_pcb.h.

Revision 1.83.2.7: download - view: text, markup, annotated - select for diffs
Sun Dec 11 10:29:24 2005 UTC (19 years ago) by christos
Branches: ktrace-lwp
Diff to: previous 1.83.2.6: preferred, colored; next MAIN 1.84: preferred, colored
Changes since revision 1.83.2.6: +6 -7 lines
Sync with head.

Revision 1.100.8.1: download - view: text, markup, annotated - select for diffs
Tue Nov 22 16:08:21 2005 UTC (19 years ago) by yamt
Branches: yamt-readahead
Diff to: previous 1.100: preferred, colored; next MAIN 1.101: preferred, colored
Changes since revision 1.100: +6 -7 lines
sync with head.

Revision 1.101: download - view: text, markup, annotated - select for diffs
Tue Nov 15 18:39:46 2005 UTC (19 years ago) by dsl
Branches: MAIN
CVS tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-readahead-base3, yamt-readahead-base2, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base, ktrace-lwp-base, elad-kernelauth-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, peter-altq, elad-kernelauth
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +6 -7 lines
Pass the current process structure to in_pcbconnect() so that it can
pass it to in_pcbbind() so that can allocate a low numbered port
if setsockopt() has been used to set IP_PORTRANGE to IP_PORTRANGE_LOW.
While there, fail in_pcbconnect() if the in_pcbbind() fails - rather
than sending the request out from a port of zero.
This has been largely broken since the socket option was added in 1998.

Revision 1.83.2.6: download - view: text, markup, annotated - select for diffs
Thu Nov 10 14:11:07 2005 UTC (19 years, 1 month ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.83.2.5: preferred, colored
Changes since revision 1.83.2.5: +21 -21 lines
Sync with HEAD. Here we go again...

Revision 1.100: download - view: text, markup, annotated - select for diffs
Sun May 29 21:41:23 2005 UTC (19 years, 6 months ago) by christos
Branches: MAIN
CVS tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base, thorpej-vnode-attr-base, thorpej-vnode-attr
Branch point for: yamt-readahead, yamt-lazymbuf
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +19 -19 lines
- add const
- remove bogus casts
- avoid nested variables

Revision 1.99: download - view: text, markup, annotated - select for diffs
Sat May 7 17:42:09 2005 UTC (19 years, 7 months ago) by christos
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +4 -4 lines
PR/30154: YAMAMOTO Takashi: tcp_close locking botch
chgsbsize() as mentioned in the PR can be called from an interrupt context
via tcp_close(). Avoid calling uid_find() in chgsbsize().
- Instead of storing so_uid in struct socketvar, store *so_uidinfo
- Add a simple lock to struct uidinfo.

Revision 1.96.4.1: download - view: text, markup, annotated - select for diffs
Fri Apr 29 11:29:33 2005 UTC (19 years, 7 months ago) by kent
Branches: kent-audio2
Diff to: previous 1.96: preferred, colored; next MAIN 1.97: preferred, colored
Changes since revision 1.96: +30 -71 lines
sync with -current

Revision 1.96.6.1: download - view: text, markup, annotated - select for diffs
Sat Feb 12 18:17:54 2005 UTC (19 years, 10 months ago) by yamt
Branches: yamt-km
Diff to: previous 1.96: preferred, colored; next MAIN 1.97: preferred, colored
Changes since revision 1.96: +30 -71 lines
sync with head.

Revision 1.83.2.5: download - view: text, markup, annotated - select for diffs
Fri Feb 4 11:47:47 2005 UTC (19 years, 10 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.83.2.4: preferred, colored
Changes since revision 1.83.2.4: +30 -71 lines
Sync with HEAD.

Revision 1.98: download - view: text, markup, annotated - select for diffs
Thu Feb 3 03:49:01 2005 UTC (19 years, 10 months ago) by perry
Branches: MAIN
CVS tags: yamt-km-base4, yamt-km-base3, yamt-km-base2, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, kent-audio2-base
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +30 -71 lines
ANSIfy function prototypes. (Still have about 3/5ths of the C files in
netinet to go...)

Revision 1.97: download - view: text, markup, annotated - select for diffs
Wed Feb 2 21:41:55 2005 UTC (19 years, 10 months ago) by perry
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +4 -4 lines
de-__P -- will ANSIfy .c files later.

Revision 1.83.2.4: download - view: text, markup, annotated - select for diffs
Tue Oct 19 15:58:12 2004 UTC (20 years, 1 month ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.83.2.3: preferred, colored
Changes since revision 1.83.2.3: +2 -3 lines
Sync with HEAD

Revision 1.96: download - view: text, markup, annotated - select for diffs
Wed Sep 29 21:30:00 2004 UTC (20 years, 2 months ago) by christos
Branches: MAIN
CVS tags: yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +2 -3 lines
PR/27082: Sean Boudreau: redundant assignment or NULL dereference in
in_pcbconnect()

Revision 1.83.2.3: download - view: text, markup, annotated - select for diffs
Tue Sep 21 13:37:11 2004 UTC (20 years, 2 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.83.2.2: preferred, colored
Changes since revision 1.83.2.2: +2 -2 lines
Fix the sync with head I botched.

Revision 1.83.2.2: download - view: text, markup, annotated - select for diffs
Sat Sep 18 14:54:53 2004 UTC (20 years, 2 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.83.2.1: preferred, colored
Changes since revision 1.83.2.1: +0 -0 lines
Sync with HEAD.

Revision 1.83.2.1: download - view: text, markup, annotated - select for diffs
Tue Aug 3 10:54:36 2004 UTC (20 years, 4 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +142 -82 lines
Sync with HEAD

Revision 1.95: download - view: text, markup, annotated - select for diffs
Sun Apr 25 16:42:42 2004 UTC (20 years, 7 months ago) by simonb
Branches: MAIN
CVS tags: BEFORE-IPF413
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +3 -10 lines
Initialise (most) pools from a link set instead of explicit calls
to pool_init.  Untouched pools are ones that either in arch-specific
code, or aren't initialiased during initial system startup.

 Convert struct session, ucred and lockf to pools.

Revision 1.94: download - view: text, markup, annotated - select for diffs
Tue Mar 2 02:26:28 2004 UTC (20 years, 9 months ago) by thorpej
Branches: 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
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +4 -4 lines
Call ipsec_pcbconn() and ipsec_pcbdisconn() for FAST_IPSEC, too.

Revision 1.93: download - view: text, markup, annotated - select for diffs
Tue Jan 13 06:17:14 2004 UTC (20 years, 11 months ago) by itojun
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +4 -4 lines
avoid deref-after-free.
http://sources.zabbadoz.net/freebsd/patchset/106-ipsec-pcb-discon.diff

Revision 1.92: download - view: text, markup, annotated - select for diffs
Fri Jan 2 15:51:45 2004 UTC (20 years, 11 months ago) by itojun
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +3 -3 lines
whitespace

Revision 1.91: download - view: text, markup, annotated - select for diffs
Tue Nov 11 20:25:26 2003 UTC (21 years, 1 month ago) by jonathan
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +7 -7 lines
Change global head-of-local-IP-address list from in_ifaddr to
in_ifaddrhead. Recent changes in struct names caused a namespace
collision in fast-ipsec, which are most cleanly fixed by using
"in_ifaddrhead" as the listhead name.

Revision 1.90: download - view: text, markup, annotated - select for diffs
Tue Oct 28 17:18:37 2003 UTC (21 years, 1 month ago) by provos
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +15 -3 lines
use a hash table to bind to local ports; suggested by markus friedl
approved: fvdl@

Revision 1.89: download - view: text, markup, annotated - select for diffs
Thu Oct 23 20:55:08 2003 UTC (21 years, 1 month ago) by mycroft
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +3 -30 lines
Remove all the code to maintain ia_inpcbs.  This information was only used to
close sockets on address changes, which was deemed to be a bad idea and was
summarily removed, so there is no point in wasting effort on maintaining it
any more.

Revision 1.88: download - view: text, markup, annotated - select for diffs
Thu Sep 4 09:16:57 2003 UTC (21 years, 3 months ago) by itojun
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +109 -29 lines
revamp inpcb/in6pcb so that they are more aligned with each other.
in6pcb lookup now uses hash(9).

Revision 1.87: download - view: text, markup, annotated - select for diffs
Fri Aug 15 03:42:01 2003 UTC (21 years, 4 months ago) by jonathan
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +10 -7 lines
(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.86: download - view: text, markup, annotated - select for diffs
Thu Aug 7 16:33:10 2003 UTC (21 years, 4 months ago) by agc
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +3 -7 lines
Move UCB-licensed code from 4-clause to 3-clause licence.

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

Revision 1.85: download - view: text, markup, annotated - select for diffs
Tue Jul 22 02:09:30 2003 UTC (21 years, 4 months ago) by itojun
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +5 -11 lines
avoid code dup when check broadcast addr in bind(2)

Revision 1.84: download - view: text, markup, annotated - select for diffs
Mon Jul 21 07:02:35 2003 UTC (21 years, 4 months ago) by itojun
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +11 -2 lines
permit bind(2) to broadcast address, as it was permitted before.
(for instance, "ntpd -b" was broken since revision 1.82)
found report on http://pc.2ch.net/unix

Revision 1.83: download - view: text, markup, annotated - select for diffs
Thu Jun 26 00:19:13 2003 UTC (21 years, 5 months ago) by itojun
Branches: MAIN
Branch point for: ktrace-lwp
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +4 -2 lines
check if INADDR_TO_IA gets us valid in_ifaddr or not.  hopefully fix PR21964

Revision 1.82: download - view: text, markup, annotated - select for diffs
Sun Jun 15 02:49:33 2003 UTC (21 years, 6 months ago) by matt
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +36 -5 lines
Change the way multicasts are kept.  They now use a hash table in the same
manner as the ifaddr hash table.  By doing this, the mkludge code can go
away.  At the same time, keep track of what pcbs are using what ifaddr and
when an address is deleted from an interface, notify/abort all sockets
that have that address as a source.  Switch IGMP and multicasts to use pools
for allocation.  Fix a number of potential problems in the igmp code where
allocation failures could cause a trap/panic.

Revision 1.81: download - view: text, markup, annotated - select for diffs
Sun Mar 16 03:33:28 2003 UTC (21 years, 9 months ago) by lukem
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +2 -8 lines
Enable check in in_pcbbind() to enforce sin_family == AF_INET.
If there are any "old programs which incorrectly set this" left,
they will now fail with EAFNOSUPPORT.
This make in_pcbbind() consistent with in_pcbconnect() and the other
protocol families.

As per my PR [kern/4441], which has the comment:
	Steven's "TCP/IP Illustrated, Volume 2", page 730, notes that
	in_pcbbind() has the check which determines if sin_family == AF_INET
	commented out, but the same check in in_pcbconnect() is still active.

Revision 1.68.2.6: download - view: text, markup, annotated - select for diffs
Mon Nov 11 22:15:16 2002 UTC (22 years, 1 month ago) by nathanw
Branches: nathanw_sa
CVS tags: nathanw_sa_end
Diff to: previous 1.68.2.5: preferred, colored; branchpoint 1.68: preferred, colored; next MAIN 1.69: preferred, colored
Changes since revision 1.68.2.5: +4 -7 lines
Catch up to -current

Revision 1.80: download - view: text, markup, annotated - select for diffs
Tue Oct 22 02:31:16 2002 UTC (22 years, 1 month ago) by simonb
Branches: MAIN
CVS tags: nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +4 -7 lines
"error" in in_pcbbind() was only ever set but not used, remove it.

Revision 1.69.2.6: download - view: text, markup, annotated - select for diffs
Sun Jun 23 17:50:44 2002 UTC (22 years, 5 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.69.2.5: preferred, colored; next MAIN 1.70: preferred, colored
Changes since revision 1.69.2.5: +23 -22 lines
catch up with -current on kqueue branch

Revision 1.75.6.2: download - view: text, markup, annotated - select for diffs
Thu Jun 20 15:52:15 2002 UTC (22 years, 5 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.75.6.1: preferred, colored; branchpoint 1.75: preferred, colored; next MAIN 1.76: preferred, colored
Changes since revision 1.75.6.1: +11 -11 lines
catch up with -current.

Revision 1.68.2.5: download - view: text, markup, annotated - select for diffs
Thu Jun 20 03:48:34 2002 UTC (22 years, 5 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.68.2.4: preferred, colored; branchpoint 1.68: preferred, colored
Changes since revision 1.68.2.4: +23 -22 lines
Catch up to -current.

Revision 1.79: download - view: text, markup, annotated - select for diffs
Tue Jun 11 19:39:59 2002 UTC (22 years, 6 months ago) by itojun
Branches: MAIN
CVS tags: kqueue-base, gehenna-devsw-base
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +3 -3 lines
share policy-on-pcb for listening socket.  sync w/kame
todo: share even more, avoid frequent updates of spidx

Revision 1.78: download - view: text, markup, annotated - select for diffs
Sun Jun 9 16:33:38 2002 UTC (22 years, 6 months ago) by itojun
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +10 -10 lines
whitespace

Revision 1.75.6.1: download - view: text, markup, annotated - select for diffs
Thu May 30 13:52:26 2002 UTC (22 years, 6 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +14 -13 lines
Catch up with -current.

Revision 1.77: download - view: text, markup, annotated - select for diffs
Tue May 28 11:10:52 2002 UTC (22 years, 6 months ago) by itojun
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +14 -17 lines
correct in*_pcbrtentry.  check cached value correctly.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Tue May 28 10:07:51 2002 UTC (22 years, 6 months ago) by itojun
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +7 -3 lines
in in*_pcbrtentry(), check if route is still valid (RTF_UP),
and address family is still valid.

Revision 1.68.2.4: download - view: text, markup, annotated - select for diffs
Mon Apr 1 07:48:30 2002 UTC (22 years, 8 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.68.2.3: preferred, colored; branchpoint 1.68: preferred, colored
Changes since revision 1.68.2.3: +3 -3 lines
Catch up to -current.
(CVS: It's not just a program. It's an adventure!)

Revision 1.69.2.5: download - view: text, markup, annotated - select for diffs
Sat Mar 16 16:02:11 2002 UTC (22 years, 9 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.69.2.4: preferred, colored
Changes since revision 1.69.2.4: +3 -3 lines
Catch up with -current.

Revision 1.75: download - view: text, markup, annotated - select for diffs
Fri Mar 8 20:48:43 2002 UTC (22 years, 9 months ago) by thorpej
Branches: MAIN
CVS tags: newlock-base, newlock, netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-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, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6, eeh-devprop-base, eeh-devprop
Branch point for: gehenna-devsw
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +3 -3 lines
Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map).  Try to deal with this:

* Group all information about the backend allocator for a pool in a
  separate structure.  The pool references this structure, rather than
  the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
  to become available, but will still fail if it cannot callocate KVA
  space for the pages.  If this happens, carefully drain all pools using
  the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
  some pages, and use that information to make draining easier and more
  efficient.
* Get rid of PR_URGENT.  There was only one use of it, and it could be
  dealt with by the caller.

From art@openbsd.org.

Revision 1.68.2.3: download - view: text, markup, annotated - select for diffs
Thu Feb 28 04:15:05 2002 UTC (22 years, 9 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.68.2.2: preferred, colored; branchpoint 1.68: preferred, colored
Changes since revision 1.68.2.2: +9 -77 lines
Catch up to -current.

Revision 1.69.2.4: download - view: text, markup, annotated - select for diffs
Mon Feb 11 20:10:33 2002 UTC (22 years, 10 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.69.2.3: preferred, colored
Changes since revision 1.69.2.3: +9 -77 lines
Sync w/ -current.

Revision 1.74: download - view: text, markup, annotated - select for diffs
Tue Jan 22 03:53:55 2002 UTC (22 years, 10 months ago) by itojun
Branches: MAIN
CVS tags: ifpoll-base
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +9 -77 lines
make sure to check address family on route cache.  with IPv4 mapped
address we can see both AF_INET/INET6.

Revision 1.69.2.3: download - view: text, markup, annotated - select for diffs
Thu Jan 10 20:02:41 2002 UTC (22 years, 11 months ago) by thorpej
Branches: kqueue
Diff to: previous 1.69.2.2: preferred, colored
Changes since revision 1.69.2.2: +36 -35 lines
Sync kqueue branch with -current.

Revision 1.68.2.2: download - view: text, markup, annotated - select for diffs
Wed Nov 14 19:17:45 2001 UTC (23 years, 1 month ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.68.2.1: preferred, colored; branchpoint 1.68: preferred, colored
Changes since revision 1.68.2.1: +36 -35 lines
Catch up to -current.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Tue Nov 13 00:32:36 2001 UTC (23 years, 1 month ago) by lukem
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +4 -1 lines
add RCSIDs

Revision 1.71.4.1: download - view: text, markup, annotated - select for diffs
Mon Nov 12 21:19:23 2001 UTC (23 years, 1 month ago) by thorpej
Branches: thorpej-mips-cache
Diff to: previous 1.71: preferred, colored; next MAIN 1.72: preferred, colored
Changes since revision 1.71: +33 -35 lines
Sync the thorpej-mips-cache branch with -current.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Sun Nov 4 20:55:26 2001 UTC (23 years, 1 month ago) by matt
Branches: MAIN
CVS tags: thorpej-mips-cache-base
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +33 -35 lines
Convert netinet to not use the internal <sys/queue.h> field names
but instead the access macros.  Use the FOREACH macros where appropriate.

Revision 1.69.2.2: download - view: text, markup, annotated - select for diffs
Sat Aug 25 06:17:02 2001 UTC (23 years, 3 months ago) by thorpej
Branches: kqueue
Diff to: previous 1.69.2.1: preferred, colored
Changes since revision 1.69.2.1: +8 -1 lines
Merge Aug 24 -current into the kqueue branch.

Revision 1.68.2.1: download - view: text, markup, annotated - select for diffs
Fri Aug 24 00:12:24 2001 UTC (23 years, 3 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +36 -5 lines
Catch up with -current.

Revision 1.71: download - view: text, markup, annotated - select for diffs
Mon Aug 6 10:25:00 2001 UTC (23 years, 4 months ago) by itojun
Branches: MAIN
CVS tags: thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, thorpej-devvp, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-mips-cache
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +8 -1 lines
cache IPsec policy on in6?pcb.  most of the lookup operations can be bypassed,
especially when it is a connected SOCK_STREAM in6?pcb.  sync with kame.

Revision 1.69.2.1: download - view: text, markup, annotated - select for diffs
Fri Aug 3 04:13:54 2001 UTC (23 years, 4 months ago) by lukem
Branches: kqueue
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +11 -1 lines
update to -current

Revision 1.70: download - view: text, markup, annotated - select for diffs
Wed Jul 25 23:28:02 2001 UTC (23 years, 4 months ago) by itojun
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +11 -1 lines
allocate ipsec policy buffer attached to pcb in in*_pcballoc, before
giving anyone accesses to pcb (do not reveal an inconsistent ones).
sync with kame

Revision 1.69: download - view: text, markup, annotated - select for diffs
Mon Jul 2 15:25:34 2001 UTC (23 years, 5 months ago) by itojun
Branches: MAIN
Branch point for: kqueue
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +19 -5 lines
on interface removal, remove multicast groups joined from pcb, before
removing interface addresses.  without the change, we may deref
NULL pointer in in_pcbpurgeif().  from jinmei@kame, sync with kame

Revision 1.60.2.2: download - view: text, markup, annotated - select for diffs
Wed Nov 22 16:06:08 2000 UTC (24 years ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.60.2.1: preferred, colored; branchpoint 1.60: preferred, colored; next MAIN 1.61: preferred, colored
Changes since revision 1.60.2.1: +5 -5 lines
Sync with HEAD.

Revision 1.60.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 20 18:10:22 2000 UTC (24 years ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +87 -44 lines
Update thorpej_scsipi to -current as of a month ago

Revision 1.68: download - view: text, markup, annotated - select for diffs
Wed Nov 8 14:28:14 2000 UTC (24 years, 1 month ago) by ad
Branches: MAIN
CVS tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: nathanw_sa
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +5 -5 lines
Update for hashinit() change.

Revision 1.65.4.1: download - view: text, markup, annotated - select for diffs
Sat Aug 26 16:38:32 2000 UTC (24 years, 3 months ago) by tron
Branches: netbsd-1-5
CVS tags: netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA
Diff to: previous 1.65: preferred, colored; next MAIN 1.66: preferred, colored
Changes since revision 1.65: +5 -3 lines
Pull up from current (approved by thorpej):

Add new sysctl variables "net.inet.ip.lowportmin" and
"net.inet.ip.lowportmax" which can be used to the set minimum
and maximum port number assigned to sockets using
IP_PORTRANGE_LOW.

syssrc/sys/netinet/in.h			1.49 -> 1.50
syssrc/sys/netinet/in_pcb.c		1.66 -> 1.67
syssrc/sys/netinet/ip_input.c		1.116 -> 1.117
syssrc/sys/netinet/ip_var.h		1.41 -> 1.42

Revision 1.67: download - view: text, markup, annotated - select for diffs
Fri Aug 25 13:35:05 2000 UTC (24 years, 3 months ago) by tron
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +5 -3 lines
Add new sysctl variables "net.inet.ip.lowportmin" and
"net.inet.ip.lowportmax" which can be used to the set minimum
and maximum port number assigned to sockets using
IP_PORTRANGE_LOW.

Revision 1.66: download - view: text, markup, annotated - select for diffs
Thu Jul 6 12:51:39 2000 UTC (24 years, 5 months ago) by itojun
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +1 -2 lines
remove unnecessary #include <netkey/key_debug.h>.  from kame.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Mon Apr 3 03:51:16 2000 UTC (24 years, 8 months ago) by enami
Branches: MAIN
CVS tags: netbsd-1-5-base, netbsd-1-5-ALPHA2, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +27 -1 lines
- Unselect the multicast outgoing interface if it is being detached.
- Drop the multicast membership if we are joining through the interface
  being detached.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Thu Mar 30 13:24:56 2000 UTC (24 years, 8 months ago) by augustss
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +21 -21 lines
Remove register declarations.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Wed Feb 2 23:28:09 2000 UTC (24 years, 10 months ago) by thorpej
Branches: MAIN
CVS tags: chs-ubc2-newbase
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +18 -1 lines
PRU_PURGEADDR -> PRU_PURGEIF, per a discussion w/ itojun.  In the IPv4
and IPv6 code, also use this to traverse PCB tables, looking for cached
routes referencing the dying ifnet, forcing them to be refreshed.

Revision 1.62: download - view: text, markup, annotated - select for diffs
Tue Feb 1 00:05:07 2000 UTC (24 years, 10 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +21 -17 lines
Small amount of cosmetic cleanup.

Revision 1.60.8.1: download - view: text, markup, annotated - select for diffs
Mon Dec 27 18:36:14 1999 UTC (24 years, 11 months ago) by wrstuden
Branches: wrstuden-devbsize
Diff to: previous 1.60: preferred, colored; next MAIN 1.61: preferred, colored
Changes since revision 1.60: +1 -6 lines
Pull up to last week's -current.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Mon Dec 13 15:17:20 1999 UTC (25 years ago) by itojun
Branches: MAIN
CVS tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +1 -6 lines
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 - view: text, markup, annotated - select for diffs
Tue Nov 30 13:35:25 1999 UTC (25 years ago) by itojun
Branches: kame
CVS tags: kame_141_19991130
Diff to: previous 1.58.6.2: preferred, colored; branchpoint 1.58: preferred, colored; next MAIN 1.59: preferred, colored
Changes since revision 1.58.6.2: +3 -6 lines
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.2: download - view: text, markup, annotated - select for diffs
Mon Aug 2 22:34:57 1999 UTC (25 years, 4 months ago) by thorpej
Branches: chs-ubc2
Diff to: previous 1.58.4.1: preferred, colored; branchpoint 1.58: preferred, colored; next MAIN 1.59: preferred, colored
Changes since revision 1.58.4.1: +3 -1 lines
Update from trunk.

Revision 1.60: download - view: text, markup, annotated - select for diffs
Fri Jul 9 22:57:17 1999 UTC (25 years, 5 months ago) by thorpej
Branches: 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
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +3 -1 lines
defopt IPSEC and IPSEC_ESP (both into opt_ipsec.h).

Revision 1.58.6.2: download - view: text, markup, annotated - select for diffs
Tue Jul 6 11:02:44 1999 UTC (25 years, 5 months ago) by itojun
Branches: kame
CVS tags: kame_14_19990705
Diff to: previous 1.58.6.1: preferred, colored; branchpoint 1.58: preferred, colored
Changes since revision 1.58.6.1: +30 -1 lines
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.1: download - view: text, markup, annotated - select for diffs
Thu Jul 1 23:47:00 1999 UTC (25 years, 5 months ago) by thorpej
Branches: chs-ubc2
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +136 -1 lines
Sync w/ -current.

Revision 1.59: download - view: text, markup, annotated - select for diffs
Thu Jul 1 08:12:50 1999 UTC (25 years, 5 months ago) by itojun
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +136 -1 lines
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 - view: text, markup, annotated - select for diffs
Mon Jun 28 06:36:59 1999 UTC (25 years, 5 months ago) by itojun
Branches: kame
CVS tags: kame_14_19990628
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +107 -1 lines
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: download - view: text, markup, annotated - select for diffs
Tue Mar 23 10:45:37 1999 UTC (25 years, 8 months ago) by lukem
Branches: MAIN
CVS tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4
Branch point for: kame, chs-ubc2
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +16 -1 lines
Ensure that you can only bind a more specific address when it is done by the
same uid or by root.

This code is from FreeBSD. (Whilst it was originally obtained from OpenBSD,
FreeBSD fixed it to work with multicast. To quote the commit message:
    - Don't bother checking for conflicting sockets if we're binding to a
      multicast address.
    - Don't return an error if we're binding to INADDR_ANY, the conflicting
      socket is bound to INADDR_ANY, and the conflicting socket has
      SO_REUSEPORT set.
)

Revision 1.39.2.4: download - view: text, markup, annotated - select for diffs
Mon Jan 18 03:22:58 1999 UTC (25 years, 10 months ago) by cgd
Branches: netbsd-1-3
Diff to: previous 1.39.2.3: preferred, colored; branchpoint 1.39: preferred, colored; next MAIN 1.40: preferred, colored
Changes since revision 1.39.2.3: +2 -2 lines
pull up rev 1.56 from trunk (PR#5645 and PR#6425).  (lukem)

Revision 1.57: download - view: text, markup, annotated - select for diffs
Sat Dec 19 02:46:12 1998 UTC (25 years, 11 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +38 -38 lines
Reverse the copyright-notice-swap.  It went against existing practice.

Revision 1.56.2.1: download - view: text, markup, annotated - select for diffs
Fri Dec 11 04:53:08 1998 UTC (26 years ago) by kenh
Branches: kenh-if-detach
Diff to: previous 1.56: preferred, colored; next MAIN 1.57: preferred, colored
Changes since revision 1.56: +37 -11 lines
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.56: download - view: text, markup, annotated - select for diffs
Mon Nov 16 05:47:19 1998 UTC (26 years, 1 month ago) by lukem
Branches: MAIN
CVS tags: kenh-if-detach-base
Branch point for: kenh-if-detach
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +2 -2 lines
if INADDR_ANY is given in in_pcbconnect(), choose the ia_addr of the first
interface, not the ia_broadaddr.  should fix [standards/5645] and [kern/6425]

Revision 1.55: download - view: text, markup, annotated - select for diffs
Fri Nov 13 10:50:10 1998 UTC (26 years, 1 month ago) by lukem
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +2 -4 lines
simplify test in in_pcbbind() for setting wild=1; no need to check if
	((so->so_proto->pr_flags & PR_CONNREQUIRED) == 0 ||
	(so->so_options & SO_ACCEPTCONN) == 0)
since the latter is always true, so the former test in unnecessary.
from `TCP/IP Illustrated, Volume 2', W. Richard Stevens, p 730.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Mon Oct 5 14:33:14 1998 UTC (26 years, 2 months ago) by lukem
Branches: MAIN
CVS tags: chs-ubc-base, chs-ubc
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +6 -6 lines
* in_pcblookup_port(): deprecate INPLOOKUP_WILDCARD and flags in favour
  of a lookup_wildcard arg; simplifies the logic a bit.
* when assigning ephemeral ports in in_pcbbind(), always call
  in_pcblookup_port() with lookup_wildcard=1, so that ephemeral port
  allocation on sockets with SO_REUSEADDR set won't potentially bind to a
  port in use by something else (principle of least surprise).

Revision 1.39.2.3: download - view: text, markup, annotated - select for diffs
Thu Oct 1 17:56:58 1998 UTC (26 years, 2 months ago) by cgd
Branches: netbsd-1-3
CVS tags: netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003
Diff to: previous 1.39.2.2: preferred, colored; branchpoint 1.39: preferred, colored
Changes since revision 1.39.2.2: +66 -21 lines
pull up revisions 1.49-1.50, 1.53 (via patch) from trunk. (tls)

Revision 1.53: download - view: text, markup, annotated - select for diffs
Wed Sep 30 21:52:24 1998 UTC (26 years, 2 months ago) by tls
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +38 -38 lines
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.52: download - view: text, markup, annotated - select for diffs
Sun Aug 2 00:35:31 1998 UTC (26 years, 4 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +13 -3 lines
Use the pool allocator for inpcbs.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Thu Jul 23 08:24:33 1998 UTC (26 years, 4 months ago) by pk
Branches: MAIN
CVS tags: eeh-paddr_t-base, eeh-paddr_t
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +2 -2 lines
in_pcballoc(): we can't afford to wait for memory.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sun Feb 15 18:24:25 1998 UTC (26 years, 10 months ago) by tls
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +38 -1 lines
Add correct copyright notice for IP address hash change.  This code is donated to TNF by the original copyright holder, Panix.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Fri Feb 13 18:21:41 1998 UTC (26 years, 10 months ago) by tls
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +29 -21 lines
Change list of interface IP addresses to a hash.  Improves performance on hosts with a large number of IP addresses significantly.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Sat Feb 7 02:44:55 1998 UTC (26 years, 10 months ago) by chs
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +3 -3 lines
add flags arg to hashinit(), to pass to malloc().

Revision 1.47: download - view: text, markup, annotated - select for diffs
Thu Jan 8 11:56:50 1998 UTC (26 years, 11 months ago) by lukem
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +6 -5 lines
* start from the top of the given ephemeral range and work down;
  results in reserved ephemeral ports starting at the top (as per
  current practice), and shouldn't have a negative effect on normal
  ephemeral ports...
* initialise inpt_lastlow in in_pcbinit

Revision 1.46: download - view: text, markup, annotated - select for diffs
Thu Jan 8 00:32:39 1998 UTC (26 years, 11 months ago) by lukem
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +2 -2 lines
add missing ; ...

Revision 1.45: download - view: text, markup, annotated - select for diffs
Wed Jan 7 22:51:23 1998 UTC (26 years, 11 months ago) by lukem
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +32 -8 lines
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.44: download - view: text, markup, annotated - select for diffs
Mon Jan 5 10:31:53 1998 UTC (26 years, 11 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +3 -3 lines
Finishing merging 4.4BSD-Lite2 netinet.  At this point, the only changes
left were SCCS IDs and Copyright dates.

Revision 1.1.1.3 (vendor branch): download - view: text, markup, annotated - select for diffs
Mon Jan 5 09:55:56 1998 UTC (26 years, 11 months ago) by thorpej
Branches: WFJ-920714, CSRG
CVS tags: lite-2
Diff to: previous 1.1.1.2: preferred, colored
Changes since revision 1.1.1.2: +4 -4 lines
Import sys/netinet from 4.4BSD-Lite2 for reference purposes.

Revision 1.1.1.2 (vendor branch): download - view: text, markup, annotated - select for diffs
Mon Jan 5 09:54:04 1998 UTC (26 years, 11 months ago) by thorpej
Branches: WFJ-920714, CSRG
CVS tags: lite-1, date-03-may-96
Diff to: previous 1.1.1.1: preferred, colored
Changes since revision 1.1.1.1: +137 -81 lines
Import sys/netinet from 4.4BSD-Lite for reference purposes.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Mon Jan 5 09:52:03 1998 UTC (26 years, 11 months ago) by lukem
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +12 -6 lines
enhance ephemeral port allocation code:
* support sysctl net.inet.ip.anonportmin (lowest ephemeral port)
  and net.inet.ip.anonportmax (highest ephemeral port).
  these can't be set to >65535, < IPPORT_RESERVED (unless IPNOPRIVPORTS
  is defined), and anonportmin has to be < anonportmax.
* use a cleaner way of only cycling through the available set once;
  this will be useful for when a random allocation scheme is used
* define IPPORT_ANON{MIN,MAX} instead of IPPORT_USER{LOW,HIGH}

Revision 1.42: download - view: text, markup, annotated - select for diffs
Tue Dec 30 02:54:11 1997 UTC (26 years, 11 months ago) by lukem
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +6 -8 lines
as per the IANA assigned ports numbers document, use ports
49152..65535 for ephemeral ports (instead of 1024..5000).
closes my [kern/4440], but with correct code :)

Revision 1.39.2.2: download - view: text, markup, annotated - select for diffs
Fri Nov 28 08:55:41 1997 UTC (27 years ago) by mellon
Branches: netbsd-1-3
CVS tags: netbsd-1-3-RELEASE, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA
Diff to: previous 1.39.2.1: preferred, colored; branchpoint 1.39: preferred, colored
Changes since revision 1.39.2.1: +3 -1 lines
Pull rev 1.41 up from trunk (mrg)

Revision 1.41: download - view: text, markup, annotated - select for diffs
Thu Nov 27 14:03:32 1997 UTC (27 years ago) by mrg
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +3 -1 lines
fix compile error when "options IPNOPROVPORTS"

Revision 1.39.2.1: download - view: text, markup, annotated - select for diffs
Thu Nov 20 04:54:42 1997 UTC (27 years ago) by thorpej
Branches: netbsd-1-3
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +15 -3 lines
Fix PCB binding problem caused by ephemeral port shortage.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Thu Nov 20 04:53:37 1997 UTC (27 years ago) by thorpej
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +15 -3 lines
Deal with a problem where ephemeral port shortage would case a PCB's
local address to be set, causing all further attemps to bind that PCB
to fail.  From Koji Imada, PR #3857.

Revision 1.37.2.2: download - view: text, markup, annotated - select for diffs
Tue Oct 14 10:29:27 1997 UTC (27 years, 2 months ago) by thorpej
Branches: marc-pcmcia
Diff to: previous 1.37.2.1: preferred, colored; branchpoint 1.37: preferred, colored; next MAIN 1.38: preferred, colored
Changes since revision 1.37.2.1: +2 -1 lines
Update marc-pcmcia branch from trunk.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Tue Oct 14 00:52:49 1997 UTC (27 years, 2 months ago) by matt
Branches: MAIN
CVS tags: netbsd-1-3-base, marc-pcmcia-base
Branch point for: netbsd-1-3
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +2 -1 lines
Add support for returning maximum supported MTU when ip_output fails with
EMSGSIZE.

Revision 1.37.2.1: download - view: text, markup, annotated - select for diffs
Mon Sep 29 07:21:17 1997 UTC (27 years, 2 months ago) by thorpej
Branches: marc-pcmcia
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +23 -1 lines
Update marc-pcmcia branch from trunk.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Mon Sep 22 21:39:40 1997 UTC (27 years, 2 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +23 -1 lines
Implement in_pcbrtentry() - return the route associated with a PCB.  If
one does not exist, attempt to allocate one.  This is mostly pulled from
tcp_input.c.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Wed Jul 23 21:26:42 1997 UTC (27 years, 4 months ago) by thorpej
Branches: MAIN
CVS tags: thorpej-signal-base, thorpej-signal, marc-pcmcia-bp
Branch point for: marc-pcmcia
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +9 -4 lines
Pull SYN_cache_branch down into the main line.

Revision 1.36.8.1: download - view: text, markup, annotated - select for diffs
Wed May 14 17:00:16 1997 UTC (27 years, 7 months ago) by mellon
Branches: SYN_cache_branch
Diff to: previous 1.36: preferred, colored; next MAIN 1.37: preferred, colored
Changes since revision 1.36: +9 -4 lines
in_pcbnotify() returns a result indicating whether or not it actually matched a pcb.

Revision 1.27.4.2: download - view: text, markup, annotated - select for diffs
Wed Dec 11 04:01:01 1996 UTC (28 years ago) by mycroft
Branches: netbsd-1-2
CVS tags: netbsd-1-2-PATCH001
Diff to: previous 1.27.4.1: preferred, colored; branchpoint 1.27: preferred, colored; next MAIN 1.28: preferred, colored
Changes since revision 1.27.4.1: +44 -42 lines
From trunk:
Eliminate SS_PRIV; instead, pass down a proc pointer to the usrreq methods
that need it.
Fix numerous memory leaks and bogus return values.

Revision 1.27.4.1: download - view: text, markup, annotated - select for diffs
Tue Dec 10 11:39:02 1996 UTC (28 years ago) by mycroft
Branches: netbsd-1-2
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +18 -10 lines
From trunk:
Return EAGAIN if binding with no specified port and the pool is empty.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Tue Dec 10 11:38:42 1996 UTC (28 years ago) by mycroft
Branches: MAIN
CVS tags: thorpej-setroot, mrg-vm-swap, is-newarp-before-merge, is-newarp-base, is-newarp, bouyer-scsipi, SYN_cache_cur_base
Branch point for: SYN_cache_branch
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +18 -9 lines
Return EAGAIN if binding with no specified port and the pool is empty.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Sun Oct 13 02:03:04 1996 UTC (28 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +3 -3 lines
backout previous kprintf changes

Revision 1.34: download - view: text, markup, annotated - select for diffs
Thu Oct 10 23:12:47 1996 UTC (28 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +3 -3 lines
printf -> kprintf, sprintf -> ksprintf

Revision 1.33: download - view: text, markup, annotated - select for diffs
Sun Sep 15 18:11:06 1996 UTC (28 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +131 -95 lines
Hash unconnected PCBs.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Mon Sep 9 14:51:12 1996 UTC (28 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +70 -61 lines
Add in_nullhost() and in_hosteq() macros, to hide some protocol
details.  Also, fix a bug in TCP wrt SYN+URG packets.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Thu Sep 5 18:10:03 1996 UTC (28 years, 3 months ago) by perry
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +3 -2 lines
Commit PR 2671, which adds an "IPNOPRIVPORTS" config option that turns
off the code that normally only allows root to bind low TCP
ports. Useful on firewalls and such.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Wed Aug 14 03:46:48 1996 UTC (28 years, 4 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +2 -2 lines
Fix some DIAGNOSTIC printf() formats; ntohl() provides a 32-bit quantity,
and should be printed with %x, not %lx.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Wed Jul 10 18:13:35 1996 UTC (28 years, 5 months ago) by cgd
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +2 -2 lines
print result of ntohl/htonl as a long.  (makes -Wformat work on the
Alpha.)

Revision 1.28: download - view: text, markup, annotated - select for diffs
Wed May 22 13:55:25 1996 UTC (28 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +44 -42 lines
Pass a proc pointer down to the usrreq and pcbbind functions for PRU_ATTACH, PRU_BIND and
PRU_CONTROL.  The usrreq interface really needs to be split up, but this will have to wait.
Remove SS_PRIV completely.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Mon Feb 26 23:16:59 1996 UTC (28 years, 9 months ago) by mrg
Branches: MAIN
CVS tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-BETA
Branch point for: netbsd-1-2
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +2 -6 lines
two more local addr changes, all done differently now (idea from charles)

Revision 1.26: download - view: text, markup, annotated - select for diffs
Mon Feb 26 08:25:47 1996 UTC (28 years, 9 months ago) by mrg
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +4 -2 lines
if we are connecting *to* an address of any local interface, default the
local address of the socket to the same address.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Tue Feb 13 23:41:53 1996 UTC (28 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +22 -17 lines
netinet prototypes

Revision 1.23.2.1: download - view: text, markup, annotated - select for diffs
Fri Feb 2 06:12:46 1996 UTC (28 years, 10 months ago) by mycroft
Branches: netbsd-1-1
Diff to: previous 1.23: preferred, colored; next MAIN 1.24: preferred, colored
Changes since revision 1.23: +86 -16 lines
Bring in changes for mondo patch 2.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Wed Jan 31 03:49:23 1996 UTC (28 years, 10 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +86 -16 lines
Build a hash table of PCBs.  Hash function needs tweaking.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Thu Aug 17 02:57:27 1995 UTC (29 years, 4 months ago) by mycroft
Branches: MAIN
CVS tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001
Branch point for: netbsd-1-1
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +2 -2 lines
so_pcb should be a void *.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sat Aug 12 23:59:34 1995 UTC (29 years, 4 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +2 -2 lines
splnet --> splsoftnet

Revision 1.21: download - view: text, markup, annotated - select for diffs
Sun Jun 18 20:01:08 1995 UTC (29 years, 5 months ago) by cgd
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +15 -12 lines
convert pcb lists to CIRCLEQs, so that the end can be looked at more
easily, and so that the original (insque/remque) logic can be effectively
mimiced.  (This fixes a bug in the previous set of list changes.)
also (since terminator is no longer null) reinstate uninitted list checks,
but mark them XXX.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Mon Jun 12 06:49:55 1995 UTC (29 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +3 -3 lines
in_pcbnotify*() don't return anything.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Mon Jun 12 06:46:34 1995 UTC (29 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +5 -11 lines
Change in_pcbnotify*() to take an errno value.  Make inetctlerrmap[] an
array on ints, not u_chars.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Mon Jun 12 00:47:33 1995 UTC (29 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +76 -47 lines
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.17: download - view: text, markup, annotated - select for diffs
Sun Jun 4 06:03:53 1995 UTC (29 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +3 -3 lines
Remove one more bogus cast.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sun Jun 4 05:58:22 1995 UTC (29 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +3 -3 lines
Don't cast things unnecessarily.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Sun Jun 4 05:06:58 1995 UTC (29 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +6 -11 lines
Clean up many more casts.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Thu Jun 1 21:36:11 1995 UTC (29 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +4 -4 lines
Avoid byte-swapping IP addresses at run time.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Thu Apr 13 06:28:21 1995 UTC (29 years, 8 months ago) by cgd
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +6 -6 lines
be a bit more careful and explicit with types.  (basically a large no-op.)

Revision 1.12: download - view: text, markup, annotated - select for diffs
Thu Sep 29 02:31:35 1994 UTC (30 years, 2 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +2 -2 lines
failure to bind to a reserved port should return EACCES not EPERM.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Wed Jun 29 06:38:06 1994 UTC (30 years, 5 months ago) by cgd
Branches: 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
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +3 -2 lines
New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.10: download - view: text, markup, annotated - select for diffs
Fri May 13 06:06:07 1994 UTC (30 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +99 -66 lines
Update to 4.4-Lite networking code, with a few local changes.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Wed Feb 2 05:58:59 1994 UTC (30 years, 10 months ago) by hpeyerl
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +1 -7 lines
Multicast is no longer optional.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sat Jan 8 21:21:40 1994 UTC (30 years, 11 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +9 -9 lines
Fix some inconsistent spacing; spaces at the end of lines, etc.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sat Dec 18 00:41:53 1993 UTC (31 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +17 -17 lines
Canonicalize all #includes.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Mon Dec 6 04:59:29 1993 UTC (31 years ago) by hpeyerl
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +29 -1 lines
multicast support.
>From Chris Maeda, cmaeda@cs.washington.edu
These patches are derived from the IP Multicast patches for BSDI.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Fri Jun 11 09:12:21 1993 UTC (31 years, 6 months ago) by deraadt
Branches: 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, magnum
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +1 -7 lines
The latest patch was hosed. There is some program that I used which
left extra crud at the end of the file. I blame ftpd for not doing an
ftruncate().

Revision 1.4: download - view: text, markup, annotated - select for diffs
Thu Jun 10 05:17:53 1993 UTC (31 years, 6 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +15 -8 lines
patch from Yuval Yarom, sent to me by <andrew@werple.apana.org.au>
they say: When doing an implicit bind in_pcbbind will assign used ports
if the port is bound on specific interface, and not on INADDR_ANY.
Effects of the bug range from connection drops to machine hangs.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sat May 22 11:42:32 1993 UTC (31 years, 6 months ago) by cgd
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +1 -2 lines
add include of select.h if necessary for protos, or delete if extraneous

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue May 18 18:20:09 1993 UTC (31 years, 7 months ago) by cgd
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -1 lines
make kernel select interface be one-stop shopping & clean it all up.

Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Sun Mar 21 09:45:37 1993 UTC (31 years, 8 months ago) by cgd
Branches: WFJ-920714, CSRG
CVS tags: patchkit-0-2-2, netbsd-alpha-1, netbsd-0-8, WFJ-386bsd-01
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
initial import of 386bsd-0.1 sources

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Mar 21 09:45:37 1993 UTC (31 years, 8 months ago) by cgd
Branches: MAIN
Initial revision

Diff request

This form allows you to request diffs 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.

Log view options

CVSweb <webmaster@jp.NetBSD.org>