summaryrefslogtreecommitdiffstats
path: root/sys/netinet
Commit message (Collapse)AuthorAgeFilesLines
* Don't accept divert/tee/pipe rules without corresponding option.ru1999-06-111-3/+11
| | | | | PR: 10324 Reviewed by: luigi
* Plug a mbuf leak in tcp_usr_send(). pru_send() routines are expectedpeter1999-06-041-7/+28
| | | | | | | | | | | | | | | | | | | | | | | | | to either enqueue or free their mbuf chains, but tcp_usr_send() was dropping them on the floor if the tcpcb/inpcb has been torn down in the middle of a send/write attempt. This has been responsible for a wide variety of mbuf leak patterns, ranging from slow gradual leakage to rather rapid exhaustion. This has been a problem since before 2.2 was branched and appears to have been fixed in rev 1.16 and lost in 1.23/1.28. Thanks to Jayanth Vijayaraghavan <jayanth@yahoo-inc.com> for checking (extensively) into this on a live production 2.2.x system and that it was the actual cause of the leak and looks like it fixes it. The machine in question was loosing (from memory) about 150 mbufs per hour under load and a change similar to this stopped it. (Don't blame Jayanth for this patch though) An alternative approach to this would be to recheck SS_CANTSENDMORE etc inside the splnet() right before calling pru_send() after all the potential sleeps, interrupts and delays have happened. However, this would mean exposing knowledge of the tcp stack's reset handling and removal of the pcb to the generic code. There are other things that call pru_send() directly though. Problem originally noted by: John Plevyak <jplevyak@inktomi.com>
* Simplify cdevsw registration.phk1999-05-311-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The cdevsw_add() function now finds the major number(s) in the struct cdevsw passed to it. cdevsw_add_generic() is no longer needed, cdevsw_add() does the same thing. cdevsw_add() will print an message if the d_maj field looks bogus. Remove nblkdev and nchrdev variables. Most places they were used bogusly. Instead check a dev_t for validity by seeing if devsw() or bdevsw() returns NULL. Move bdevsw() and devsw() functions to kern/kern_conf.c Bump __FreeBSD_version to 400006 This commit removes: 72 bogus makedev() calls 26 bogus SYSINIT functions if_xe.c bogusly accessed cdevsw[], author/maintainer please fix. I4b and vinum not changed. Patches emailed to authors. LINT probably broken until they catch up.
* This commit should be a extensive NO-OP:phk1999-05-301-6/+21
| | | | | | | | | | | | | Reformat and initialize correctly all "struct cdevsw". Initialize the d_maj and d_bmaj fields. The d_reset field was not removed, although it is never used. I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way. Vinum and i4b not modified, patches emailed to respective authors.
* Added net.inet.tcp.path_mtu_discovery variable which when set to 0dg1999-05-271-8/+9
| | | | | | | (default 1) disables PMTUD globally. Although PMTUD can be disabled in the standard case by locking the MTU on a static route (including the default route), this method doesn't work in the face of dynamic routing protocols like gated.
* Made net.inet.ip.intr_queue_maxlen writeable.dg1999-05-271-2/+2
|
* close pr 10889:luigi1999-05-241-1/+4
| | | | | | | | | | | | + add a missing call to dn_rule_delete() when flushing firewall rules, thus preventing possible panics due to dangling pointers (this was already done for single rule deletes). + improve "usage" output in ipfw(8) + add a few checks to ipfw pipe parameters and make it a bit more tolerant of common mistakes (such as specifying kbit instead of Kbit) PR: kern/10889 Submitted by: Ruslan Ermilov
* brucifybrian1999-05-231-2/+2
| | | | Mentioned by: sprice@hiwaay.net
* Make incoming packets work as keepalives, too. This should fix problemseivind1999-05-201-0/+1
| | | | | | for some games. Notified of problem by: tim@turbinegames.com
* "fix" warning. This still needs to be kld-ified some day (or removed).peter1999-05-111-1/+4
|
* Pre-declare struct proc to avoid 'inside param list' warnings.peter1999-05-081-1/+2
|
* Fix two warnings; and note a problem where a pointer is stored in anpeter1999-05-061-4/+4
| | | | int variable - this can't work on an Alpha.
* Add sufficient braces to keep egcs happy about potentially ambiguouspeter1999-05-064-10/+14
| | | | if/else nesting.
* Free the dummynet descriptor in ip_dummynet, not in the calledluigi1999-05-044-12/+10
| | | | | | | routines. The descriptor contains parameters which could be used within those routines (eg. ip_output() ). On passing, add IPPROTO_PGM entry to netinet/in.h
* Add missing ``.''.brian1999-05-041-1/+1
|
* forgot passing the right pointer to dst to dummynet_io().luigi1999-05-041-2/+2
| | | | | (-stable and releng2 were already safe). Debugged-By: phk
* assorted dummynet cleanup:luigi1999-05-042-27/+38
| | | | | | | + plug an mbuf leak when dummynet used with bridging + make prototype of dummynet_io consistent with usage + code cleanup so that now bandwidth regulation is precise to the bit/s and not to (8*HZ) bit/s as before.
* Add sysctl descriptions to many SYSCTL_XXXsbillf1999-05-0312-76/+85
| | | | | | | PR: kern/11197 Submitted by: Adrian Chadd <adrian@FreeBSD.org> Reviewed by: billf(spelling/style/minor nits) Looked at by: bde(style)
* This Implements the mumbled about "Jail" feature.phk1999-04-287-15/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a seriously beefed up chroot kind of thing. The process is jailed along the same lines as a chroot does it, but with additional tough restrictions imposed on what the superuser can do. For all I know, it is safe to hand over the root bit inside a prison to the customer living in that prison, this is what it was developed for in fact: "real virtual servers". Each prison has an ip number associated with it, which all IP communications will be coerced to use and each prison has its own hostname. Needless to say, you need more RAM this way, but the advantage is that each customer can run their own particular version of apache and not stomp on the toes of their neighbors. It generally does what one would expect, but setting up a jail still takes a little knowledge. A few notes: I have no scripts for setting up a jail, don't ask me for them. The IP number should be an alias on one of the interfaces. mount a /proc in each jail, it will make ps more useable. /proc/<pid>/status tells the hostname of the prison for jailed processes. Quotas are only sensible if you have a mountpoint per prison. There are no privisions for stopping resource-hogging. Some "#ifdef INET" and similar may be missing (send patches!) If somebody wants to take it from here and develop it into more of a "virtual machine" they should be most welcome! Tools, comments, patches & documentation most welcome. Have fun... Sponsored by: http://www.rndassociates.com/ Run for almost a year by: http://www.servetheweb.com/
* s/static foo_devsw_installed = 0;/static int foo_devsw_installed;/.dt1999-04-281-1/+1
| | | | (Edited automatically)
* Suser() simplification:phk1999-04-274-10/+10
| | | | | | | | | | | | | | | | | | | 1: s/suser/suser_xxx/ 2: Add new function: suser(struct proc *), prototyped in <sys/proc.h>. 3: s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/ The remaining suser_xxx() calls will be scrutinized and dealt with later. There may be some unneeded #include <sys/cred.h>, but they are left as an exercise for Bruce. More changes to the suser() API will come along with the "jail" code.
* Make one pass through the firewall the default.luigi1999-04-261-2/+2
| | | | Multiple pass (which only affects dummynet) is too confusing.
* so_linger is in seconds, not in 1/HZache1999-04-241-2/+2
| | | | | PR: 11252 Submitted by: Martin Kammerhofer <dada@sbox.tu-graz.ac.at>
* Use pointer arithmetic as appropriate.dt1999-04-241-2/+2
|
* postpone the sending of IGMP LEAVE msg to after deleting theluigi1999-04-241-2/+8
| | | | | | mc address from the address list. The latter operation on some hardware resets the card, potentially canceling the pending LEAVE pkt.
* Work around an egcs optimizer bug (i386). This should fix the active ftpluoqi1999-04-211-2/+4
| | | | hang problem. A bug report has been sent to cygnus.
* s/IPFIREWALL_MODULE/KLD_MODULE/peter1999-04-201-2/+2
|
* Tidy up some stray / unused stuff in the IPFW package and friends.peter1999-04-208-105/+13
| | | | | | | | - unifdef -DCOMPAT_IPFW (this was on by default already) - remove traces of in-kernel ip_nat package, it was never committed. - Make IPFW and DUMMYNET initialize themselves rather than depend on compiled-in hooks in ip_init(). This means they initialize the same way both in-kernel and as kld modules. (IPFW initializes now :-)
* Zap LKM option and support. Farewell old friend.peter1999-04-191-0/+2
|
* Convert the dummynet lkm code to be kld aware (this isn't actually usedpeter1999-04-171-26/+27
| | | | anywhere that I can see).
* Oops, forgot this part of lkm code that's been replaced with kld.peter1999-04-171-50/+3
|
* Better handling for ARP/source routing on Token Ringeivind1999-04-151-8/+16
| | | | Submitted by: Larry Lile <lile@stdio.com>
* Staticize.eivind1999-04-111-2/+2
|
* Two cosmetic changes, one a typo and the other, a clarification.julian1999-04-072-7/+15
|
* Merge from RELENG_2_2, per luigi. Fixes the ntoh?() issue for thensayer1999-03-301-18/+22
| | | | | | | | firewall code when called from the bridge code. PR: 10818 Submitted by: nsayer Obtained from: luigi
* Use the correct length from the mbuf header instead of the one fromluigi1999-03-261-9/+9
| | | | | | | | the IP header (this would not work for bridged packets). This has been fixed long ago in the 2.2 branch. Problem noticed by: a few people Fix suggested by: Remy Nonnenmacher
* PacketAliasProxyRule takes a const char *brian1999-03-251-1/+1
| | | | Reminded by: bde
* Add a ``const'' and remove some inconsistent prototype args.brian1999-03-243-4/+4
|
* add missing #include "opt_bdg.h"luigi1999-03-241-1/+2
|
* Remove duplicate line.billf1999-03-231-1/+0
| | | | Reviewed by: eivind
* Fix a dummynet bug caused by passing a bad next hop address (theluigi1999-03-161-5/+5
| | | | | | symptom was the msg "arp failure -- host is not on local network" that some user have seen on multihomed machines. Bug tracked down by Emmanuel Duros
* Fix the 'fwd' option to ipfw when asked to divert to another machine.julian1999-03-121-7/+24
| | | | | | also rely less on other modules clearing static values, and clear them in a few cases we missed before. Submitted by: Matthew Reimer <mreimer@vpop.net>
* Submitted by: Larry Lilejulian1999-03-101-16/+79
| | | | | | | | Move the Olicom token ring driver to the officially sanctionned location of /sys/contrib. Also fix some brokenness in the generic token ring support. Be warned that if_dl.h has been changed and SOME programs might like recompilation.
* Remove all diagnostics to stdout/stderr with #ifdef DEBUGbrian1999-03-094-22/+54
| | | | Statify functions in alias_nbt.c
* Document PacketAliasPptp() and allow it to be disabledbrian1999-03-072-2/+31
| | | | by passing INADDR_NONE.
* Remove unused function stubs.brian1999-03-071-77/+0
|
* Mention that PacketAliasProxyRule() doesn't accept host names,brian1999-03-071-1/+3
| | | | just IP numbers.
* When an incoming packet is reflected back as an ICMP reply, make sure wearchie1999-03-061-1/+2
| | | | | | zero "m->m_pkthdr.rcvif", otherwise ipfw may wrongly match the outgoing packet. PR: kern/9723 Submitted by: David Malone <dwmalone@maths.tcd.ie>
* Document PacketAliasProxyRule() and fix a typo.brian1999-03-061-1/+88
|
* Move kernel-only declaration inside #ifdef KERNEL section.wollman1999-03-061-7/+5
|
OpenPOWER on IntegriCloud