Commit Graph

1156 Commits

Author SHA1 Message Date
itojun 73ed908c03 fix stats to meet 4.4BSD practice 2003-06-26 21:49:17 +00:00
itojun 08740c2691 fix comment 2003-06-26 21:43:39 +00:00
christos 8924cfdcba abuse the mib instead of abusing the new pointer. Idea from simon burge.
It allows the tcp_sysctl_ident to run by non-super-users. No backwards
compatibility provided.
2003-06-26 17:32:22 +00:00
itojun c077e299a8 expire mrt if mrt_stall goes empty. ono@kame 2003-06-26 07:41:48 +00:00
itojun 4f7d642336 cleanup multicast routing stuff on if_detach().
XXX sideeffect to running instance of multicast routing daemon unknown
2003-06-26 03:35:00 +00:00
itojun 0888779b69 put meaningful count into in_multientries.
(or we could remove this variable - noone seem to use it)
2003-06-26 03:17:32 +00:00
itojun bef80abb93 purge rti structure (in igmp.c) for removed ifp on if_detach(). 2003-06-26 03:11:08 +00:00
itojun d1fcb86326 tabify 2003-06-26 00:43:31 +00:00
itojun ab5963ee1f check if INADDR_TO_IA gets us valid in_ifaddr or not. hopefully fix PR21964 2003-06-26 00:19:13 +00:00
martin 864f19482a #ifdef _KERNEL_OPT police 2003-06-23 14:59:21 +00:00
martin 1f875208a7 Protect opt_*.h includes by _KERNEL_OPT 2003-06-23 13:58:06 +00:00
martin d505b18964 Make sure to include opt_foo.h if a defflag option FOO is used. 2003-06-23 11:00:59 +00:00
itojun faef0b82e9 install host route for p2p interface even if there's connected net route
by broadcast interface.  PR 21903.
2003-06-18 06:42:34 +00:00
matt 27e1742142 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.
2003-06-15 02:49:32 +00:00
onoe 7dad9f7d8a For loopback interface, assign ia_dstaddr instead of just changing reference
to ifa_dstaddr.  This fixes the problem that assigning more than 2 IPv4
aliases to loopback interface fails to create routing table entry.
2003-06-13 07:59:57 +00:00
itojun f05831c62a separate RFC2292 decls for MLD; sync w/ kame 2003-06-06 09:37:29 +00:00
itojun 7a5741651c - sync up MLD declaration with RFC3542 (s/MLD6/MLD/)
- routing header declaration with RFC3542
  (note: sizeof(ip6_rthdr0) has changed!)
  also, sync up with RFC2460 routing header definition (no "strict" source
  routing mode any more)

part of advanced API update (RFC2292 -> 3542).
2003-06-06 08:13:43 +00:00
itojun 7cc3e999f7 inherit IPV6_V6ONLY from listening socket. PR 21713 2003-05-30 01:15:04 +00:00
itojun f46a719b5c can't use M_WAIT here, i believe. 2003-05-27 22:36:38 +00:00
yamt 63cb165a80 - don't pass mbufs with M_CSUM_* flags which isn't supported by the interface
to if_output.
- offload ip-checksumming for each fragmented packets as well.
2003-05-26 15:12:11 +00:00
itojun 6ca34aa391 no need for ip_v recovery in output path too
(tcp_template includes ip_v setting)
2003-05-17 17:16:20 +00:00
itojun b29a40989d ip checksum logic no longer damage ip_v 2003-05-17 17:08:15 +00:00
itojun 4008ec1218 use strlcpy 2003-05-16 03:56:49 +00:00
itojun f41cda35e4 more KNF 2003-05-14 17:28:31 +00:00
itojun 560bd2fe2e more KNF 2003-05-14 17:18:36 +00:00
itojun f53c3317b8 wrap multiline macro by do {} while (0) 2003-05-14 16:57:03 +00:00
itojun caa10ced69 constcond 2003-05-14 16:52:53 +00:00
itojun 716a9823dd KNF 2003-05-14 16:43:44 +00:00
itojun 346e0198f0 always use PULLDOWN_TEST codepath. 2003-05-14 06:47:33 +00:00
bjh21 ff81b6d549 Header cleanup: Hide all of this file apart from the socket options
from POSIX/XNS applications.
2003-05-05 14:36:13 +00:00
itojun e6eb2671ed clear m_flags just for safety 2003-05-02 02:13:16 +00:00
bjh21 4be7a2dcf3 Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
  can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
  various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
  !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them.  In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
2003-04-28 23:16:11 +00:00
itojun afdd63b90b remove redundant adjustment of m->m_pkthdr.len 2003-04-21 08:14:45 +00:00
itojun cb30d7ce0b correct arg to m_pullup (need to count IP header size as well) 2003-04-21 07:02:31 +00:00
itojun a81c148373 correct (false) assumptions on mbuf chain. not sure if it really helps, but
anyways, it is necessary to perform m_pullup.
2003-04-21 06:52:47 +00:00
christos 9b6eb382c2 PR/2352: Tor Egge: Add sysctl to get uid of connected socket. 2003-04-19 20:58:35 +00:00
tron 2dcd4d2952 Clear hardware checksum flags before reusing a mbuf for an ICMP reply as
suggested by Enami Tsugutomo. This fixes PR kern/21203 by myself.
2003-04-17 16:57:49 +00:00
dogcow 6045dfd329 PR/991: Darren Reed: Add a sysctl (checkinteface) to implement this. This
implementation is taken from FreeBSD, but we default to off.
XXX: We should really do this on a per ifaddr basis as jason suggested.
2003-04-12 00:17:49 +00:00
christos 565d9732ff PR/991: Darren Reed: Add a sysctl (checkinteface) to implement this. This
implementation is taken from FreeBSD, but we default to off.
XXX: We should really do this on a per ifaddr basis as jason suggested.
2003-04-11 19:41:37 +00:00
dogcow 5ee791c103 bring into conformance with RFC 3514 2003-04-01 07:39:47 +00:00
lukem b1026bf11c 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.
2003-03-16 03:33:28 +00:00
ragge be084ba94f vax -> __vax__. Didn't I fix this a year ago? 2003-03-05 13:19:59 +00:00
thorpej cdf1b0026c Allow TCP connections to hosts on a local network to use a larger
slow start initial window.  Default this larger initial window to
4 packets, allowing it to be adjusted with net.inet.tcp.init_win_local.
2003-03-01 04:40:27 +00:00
matt 65e5548a17 Add MBUFTRACE kernel option.
Do a little mbuf rework while here.  Change all uses of MGET*(*, M_WAIT, *)
to m_get*(M_WAIT, *).  These are not performance critical and making them
call m_get saves considerable space.  Add m_clget analogue of MCLGET and
make corresponding change for M_WAIT uses.
Modify netinet, gem, fxp, tulip, nfs to support MBUFTRACE.
Begin to change netstat to use sysctl.
2003-02-26 06:31:08 +00:00
he 27bc436921 Swap neighboring lines of callout_init() and bzero() of container
struct in syn_cache_add(); the bzero() invalidates whatever
callout_init() has done (which might matter, but presently doesn't).
2003-02-25 22:12:24 +00:00
thorpej 73fe03a9d6 Comment out the inclusion of <uvm/uvm_extern.h> -- the header is not
necessary.
2003-02-24 22:12:57 +00:00
thorpej 2ee9a875f2 Use callout_setfunc() and callout_schedule(). 2003-02-04 03:31:32 +00:00
thorpej 882dec6ba3 Test callout_pending(), not callout_active(), and eliminate now-unnecessary
callout_deactivate() calls.
2003-02-03 23:50:59 +00:00
thorpej d133a4da92 M_SOOPTS -> MT_SOOPTS 2003-01-30 23:43:33 +00:00
wiz 9115df8c49 success, not sucess. Noted by mjl. 2003-01-28 22:35:02 +00:00