cegger
bbae282081
make this compile as proposed by dholland@
2008-08-07 06:20:14 +00:00
plunky
fd7356a917
Convert socket options code to use a sockopt structure
...
instead of laying everything into an mbuf.
approved by core
2008-08-06 15:01:23 +00:00
spz
79462c037e
typo fix in comment (drops the ' in drop's :)
2008-08-04 07:01:05 +00:00
matt
3e368ad90b
Free the socket only after disposing of the PCB.
2008-08-04 06:29:58 +00:00
tls
c5ddeafa76
Unlock reassembly queue before calling sorwakeup(), not after. In unusual
...
cases with in-kernel consumers which might send data on the same socket,
we can deadlock on the reassembly queue otherwise (observed while testing
accept filters).
2008-08-04 04:08:47 +00:00
tls
717f903a98
Add accept filters, ported from FreeBSD by Coyote Point Systems. Add inetd
...
support for specifying an accept filter for a service (mostly as a usage
example, but it can be handy for other things). Manual pages to follow
in a day or so.
OK core@.
2008-08-04 03:55:47 +00:00
matt
34ac358652
Reacquire softnet_lock after calling soabort which returns with the socket
...
unlocked.
2008-07-28 18:41:07 +00:00
cyber
76c8d40dd1
Add IANA allocation and header for RFC 5006 (RA RDNSS) IPv6 Router
...
Advertisement option.
2008-07-11 07:35:05 +00:00
ad
c4e6bfaf85
tcp_input: add a couple of assertions.
2008-07-04 18:22:21 +00:00
ad
4c75eca868
syn_cache_get: remove new endpoint's socket from head's queue if aborting
...
the connection. Should fix KASSERT(so->so_head == NULL).
2008-07-03 15:35:28 +00:00
yamt
fff57c5525
merge yamt-pf42 branch.
...
(import newer pf from OpenBSD 4.2)
ok'ed by peter@. requested by core@
2008-06-18 09:06:25 +00:00
dyoung
a8ad22e5d9
Don't cast to void * unnecessarily.
2008-05-22 01:06:39 +00:00
dyoung
518ccec3d5
bzero -> memset, bcopy -> memcpy.
2008-05-13 18:24:01 +00:00
dyoung
0f58320be0
Cosmetic: use __arraycount(). s/0/NULL/ where appropriate. Pass
...
"null" instead of 0 to printf %s. Remove superfluous parentheses
in return statements. Compare pointers with NULL instead of "testing
truth."
2008-05-13 17:51:26 +00:00
dyoung
62c140415f
Cosmetic: compare sa_family with AF_UNSPEC instead of testing truth.
...
Join a line. Compare sa_len with 0 instead of testing truth.
2008-05-11 20:17:59 +00:00
dyoung
df0b11bb4e
Use memset() instead of Bzero().
...
In arplookup1(), put the static sockaddr_inarp onto the stack, and
zero it before use.
2008-05-11 20:16:12 +00:00
taca
fd376618e5
Make sure to clear csum_flags before forward the packet.
...
This change should be fix DIAGNOSTIC kernel's panic when the machine act
as multicast router.
Advised from tls@ and approved by thorpej@.
2008-05-08 08:00:55 +00:00
ad
e071d39c84
- 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.
2008-05-05 17:11:16 +00:00
thorpej
b129a80c20
Simplify the interface to netstat_sysctl() and allocate space for
...
the collated counters using kmem_alloc().
PR kern/38577
2008-05-04 07:22:14 +00:00
ad
2830fe3488
PR kern/38497 Out of memory allocating ksiginfo
...
Work around: don't acquire softnet_lock in protocol drain routines.
2008-05-02 13:40:32 +00:00
martin
ce099b4099
Remove clause 3 and 4 from TNF licenses
2008-04-28 20:22:51 +00:00
yamt
4f47226d42
udp_init: don't forget to allocate udp6stat_percpu.
2008-04-26 08:13:59 +00:00
yamt
167fe02fc8
tcp_init: don't forget to allocate tcpstat_percpu.
2008-04-26 08:13:35 +00:00
ad
15e29e981b
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@.
2008-04-24 11:38:36 +00:00
thorpej
caf49ea572
Make IPSEC and FAST_IPSEC stats per-cpu. Use <net/net_stats.h> and
...
netstat_sysctl().
2008-04-23 06:09:04 +00:00
thorpej
33326077b1
Use <net/net_stats.h> / netstat_sysctl().
2008-04-23 05:26:50 +00:00
dyoung
71455e2d0d
C99 does not allow u_int8_t bitfields, so use unsigned int, instead.
2008-04-16 20:58:35 +00:00
thorpej
83dd106948
Make IGMP stats per-cpu.
2008-04-15 16:02:03 +00:00
thorpej
881a947288
Make ARP stats per-cpu.
2008-04-15 15:17:54 +00:00
thorpej
1121526b25
Make CARP status per-cpu.
2008-04-15 06:03:28 +00:00
thorpej
c2da059bc6
Make udp6 stats per-cpu.
2008-04-15 04:43:25 +00:00
thorpej
0dd41b37de
Make ip6 and icmp6 stats per-cpu.
2008-04-15 03:57:04 +00:00
thorpej
7ff8d08aae
Make IP, TCP, UDP, and ICMP statistics per-CPU. The stats are collated
...
when the user requests them via sysctl.
2008-04-12 05:58:22 +00:00
dyoung
2527883e86
s/8/NBBY/
2008-04-10 18:09:14 +00:00
thorpej
04e54b2ef5
- ipflow is not used outside ip_flow.c; move its definition there.
...
- Make ipflow_reap() private to ip_flow.c, and introduce ipflow_prune()
for external callers to use (avoids returning an ipflow * that is never
actually used anyway).
2008-04-09 05:14:20 +00:00
thorpej
3f466bce48
Change IPv6 stats from a structure to an array of uint64_t's.
...
Note: This is ABI-compatible with the old ip6stat structure; old netstat
binaries will continue to work properly.
2008-04-08 23:37:43 +00:00
thorpej
aa8724ff7b
Change ICMP6 stats from a structure to an array of uint64_t's.
...
Note: This is ABI-compatible with the old icmp6stat structure; old netstat
binaries will continue to work properly.
2008-04-08 15:04:35 +00:00
thorpej
f5c68c0b9f
Change TCP stats from a structure to an array of uint64_t's.
...
Note: This is ABI-compatible with the old tcpstat structure; old netstat
binaries will continue to work properly.
2008-04-08 01:03:58 +00:00
thorpej
88d65e9212
Change IP stats from a structure to an array of uint64_t's.
...
Note: This is ABI-compatible with the old ipstat structure; old netstat
binaries will continue to work properly.
2008-04-07 06:31:27 +00:00
thorpej
738aabaf82
Change UDP stats from a structure to an array of uint64_t's.
...
Note: This is ABI-compatible with the old icmpstat structure; old netstat
binaries will continue to work properly.
2008-04-06 20:17:27 +00:00
thorpej
67b7abb1ce
Change ICMP stats from a structure to an array of uint64_t's.
...
Note: This is ABI-compatible with the old icmpstat structure; old netstat
binaries will continue to work properly.
2008-04-06 19:04:48 +00:00
cube
564b60af35
- Make sure we send a reasonable fragment size when IPSEC is configured.
...
Otherwise we end up sending a dubious "0" whenever we cannot find a
proper association for the packet.
- Reset sack_newdata along with snd_nxt to avoid improper integer
arithmetics that lead to sending data from an incorrect place in the
stream, making it appear as corrupted.
Patch by Michael Van Elst, based on an analysis by Michael for the IPSEC
stuff and I for the SACK issue.
2008-03-27 00:18:56 +00:00
ws
8297b01db8
Set scope on IPv6 multicast address to give carp a chance to work for IPv6, too.
...
From FreeBSD.
2008-03-15 16:44:03 +00:00
rmind
c6186face4
Welcome to 4.99.55:
...
- Add a lot of missing selinit() and seldestroy() calls.
- Merge selwakeup() and selnotify() calls into a single selnotify().
- Add an additional 'events' argument to selnotify() call. It will
indicate which event (POLL_IN, POLL_OUT, etc) happen. If unknown,
zero may be used.
Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
2008-03-01 14:16:49 +00:00
matt
a34217b8de
Rework tcp congctl selection code so that the congctl entries can be const.
...
Don't access tcp_congctl stuff outside of tcp_congctl.c, use routines to
update t_congctl. This code is slightly now more complicated.
2008-02-29 07:39:17 +00:00
matt
a4a1e5ce55
Convert stragglers to ansi definitions from old-style definitons.
...
Remember that func() is not ansi, func(void) is.
2008-02-27 19:41:51 +00:00
yamt
c3985cffec
make TCP_SETUP_ACK, ICMP_CHECK, TCP_FIELDS_TO_HOST, and TCP_FIELDS_TO_NET
...
static functions.
2008-02-20 11:44:07 +00:00
joerg
862a285bde
Explicitly predict panic conditions as false.
2008-02-12 13:05:55 +00:00
joerg
80b711a35e
Reimplement in4_cksum to not copy data, but sum up directly.
...
Tested on sparc and m68k by martin@.
2008-02-07 22:45:20 +00:00
matt
fb71901dbc
Add a new ip_id generation scheme based on a Fisher-Yates shuffle over a
...
sliding window. XXX replace use of arc4random RSN.
2008-02-06 03:20:50 +00:00