summaryrefslogtreecommitdiffstats
path: root/sys/netinet
Commit message (Collapse)AuthorAgeFilesLines
...
* It is much easier to arp if you don't truncate your arp-reply's.lile1999-08-281-11/+12
| | | | [affects token-ring only]
* Also make the "other" packets counter resettable.green1999-08-281-1/+3
|
* $Id$ -> $FreeBSD$peter1999-08-2870-71/+71
|
* $Id$ -> $FreeBSD$peter1999-08-285-5/+5
|
* Correction: uid -> gid (comment)green1999-08-271-2/+2
|
* Add readonly OID ``net.inet.tcp.tcbhashsize'' so it is possible tojlemon1999-08-262-2/+12
| | | | discover the size of the TCB hashtable on a running system.
* Cast pointers to [u]intptr_t instead of casting them to [u_]long. Don'tbde1999-08-241-4/+4
| | | | | depend on gcc's feature of casting lvalues, especially for direct assignment where it doesn't even simplify the syntax. Cosmetic.
* Aallow ppp to work with Nortel Networks Extranet Switchbrian1999-08-221-0/+6
| | | | | | product and Windows NT tunneling. Submitted by: Chain Lee <chain@nortelnetworks.com>
* Typo: 102 => 192 (PR: docs/13310 - Maxim Sobolev <sobomax@altavista.net>)hoek1999-08-221-2/+2
|
* To christen the brand new security category for syslog, we get IPFWgreen1999-08-211-58/+86
| | | | | | | | | | | | | | using syslog(3) (log(9)) for its various purposes! This long-awaited change also includes such nice things as: * macros expanding into _two_ comma-delimited arguments! * snprintf! * more snprintf! * linting and criticism by more people than you can shake a stick at! * a slightly more uniform message style than before! and last but not least * no less than 5 rewrites! Reviewed by: committers
* Fix breakage if blackhole=1 and tiflags & TH_SYN, pluscsgr1999-08-193-16/+26
| | | | | | style(9) fixes Submitted by: Jonathon Lemon
* Slight tweak to tcp.blackhole to add optional behaviour tocsgr1999-08-182-18/+52
| | | | | | | | | drop any segment arriving at a closed port. tcp.blackhole=1 - only drop SYN without RST tcp.blackhole=2 - drop everything without RST tcp.blackhole=0 - always send RST - default behaviour This confuses nmap -sF or -sX or -sN quite badly.
* Fix a printf() formatter to match its variable.billf1999-08-171-2/+2
| | | | Reviewed by: bde, luigi
* Add net.inet.tcp.blackhole and net.inet.udp.blackholecsgr1999-08-173-6/+25
| | | | | | | | | | | sysctl knobs. With these knobs on, refused connection attempts are dropped without sending a RST, or Port unreachable in the UDP case. In the TCP case, sending of RST is inhibited iff the incoming segment was a SYN. Docs and rc.conf settings to follow.
* Various man page cleanup:mpp1999-08-151-17/+12
| | | | | | | | | | - Sort xrefs - FreeBSD.ORG -> FreeBSD.org - Be consistent with section names as outlines in mdoc(7) - Other misc mdoc cleanup. PR: doc/13144 Submitted by: Alexy M. Zelkin <phantom@cris.net>
* Implement probabilistic rule match in ipfw. Each rule can be associatedluigi1999-08-112-9/+38
| | | | | | | | | | | | | | | | | | | | | with a match probability to achieve non-deterministic behaviour of the firewall. This can be extremely useful for testing purposes such as simulating random packet drop without having to use dummynet (which already does the same thing), and simulating multipath effects and the associated out-of-order delivery (this time in conjunction with dummynet). The overhead on normal rules is just one comparison with 0. Since it would have been trivial to implement this by just adding a field to the ip_fw structure, I decided to do it in a backward-compatible way (i.e. struct ip_fw is unchanged, and as a consequence you don't need to recompile ipfw if you don't want to use this feature), since this was also useful for -STABLE. When, at some point, someone decides to change struct ip_fw, please add a length field and a version number at the beginning, so userland apps can keep working even if they are out of sync with the kernel.
* Add spl() protection to remove that the timer is invoked multipleluigi1999-08-111-3/+5
| | | | | times resulting in higher bandwidth and lower delays. Reported-by: Jamshid Madhavi
* Add net.inet.icmp.log_redirect and net.inet.icmp.drop_redirect, fordes1999-08-101-3/+28
| | | | | | | respectively logging and dropping ICMP REDIRECT packets. Note that there is no rate limiting on the log messages, so log_redirect should be used with caution (preferrably only for debugging purposes).
* Make ipfw's logging more dynamic. Now, log will use the default limitgreen1999-08-014-12/+87
| | | | | | | | | | | | | _or_ you may specify "log logamount number" to set logging specifically the rule. In addition, "ipfw resetlog" has been added, which will reset the logging counters on any/all rule(s). ipfw resetlog does not affect the packet/byte counters (as ipfw reset does), and is the only "set" command that can be run at securelevel >= 3. This should address complaints about not being able to set logging amounts, not being able to restart logging at a high securelevel, and not being able to just reset logging without resetting all of the counters in a rule.
* 8 -> NBBygreen1999-07-281-3/+3
|
* Correct a really gross comment format.green1999-07-281-5/+7
|
* fix comment re: RST received in TIME_WAIT to match the code.jmb1999-07-182-6/+6
|
* Correct a mistake in so_cred changes. In practice, I don't think that itgreen1999-07-121-2/+2
| | | | | | | | would make a difference. However, my previous diff _did_ change the behavior in some way (not necessarily break it), so I'm fixing it. Found by: bde Submitted by: bde
* Two new sysctls: net.inet.tcp.getcred and net.inet.udp.getcred. These takegreen1999-07-113-3/+99
| | | | | | | | | a sockaddr_in[2] (local, then remote) and return a struct ucred. Example code for these is at: http://www.FreeBSD.org/~green/inetd_ident.patch http://www.FreeBSD.org/~green/freebsd4.c (for pidentd) Reviewed by: bde
* Use the new tunable macros for the net.inet.tcp.tcbhashsize tunable.msmith1999-07-052-6/+4
|
* In in_pcbconnect(), check the return value from in_pcbbind() andpb1999-06-251-3/+6
| | | | | | | | | | | | exit on errors. If we don't, in_pcbrehash() is called without a preceeding in_pcbinshash(), causing a crash. There are apparently several conditions that could cause the crash; PR misc/12256 is only one of these. PR: misc/12256
* Don't get caught in an infinite recursion when PKT_ALIAS_REVERSEbrian1999-06-222-5/+18
| | | | | | | | is set. Document PKT_ALIAS_REVERSE. Pointed out by: Jonathan Hanna <jh@cr1003333-a.crdva1.bc.home.com> PR: 12304
* This is the much-awaited cleaned up version of IPFW [ug]id support.green1999-06-194-14/+110
| | | | All relevant changes have been made (including ipfw.8).
* Add RCS strings to kernel ipfilter files.green1999-06-193-0/+5
|
* This should fix ipfilter for everyone it was broken for. CDEV_MAJOR is _not_green1999-06-191-1/+1
| | | | | | -1. Noticed by: users on freebsd-current
* Reviewed by: the cast of thousandsgreen1999-06-171-3/+5
| | | | | | | | | This is the change to struct sockets that gets rid of so_uid and replaces it with a much more useful struct pcred *so_cred. This is here to be able to do socket-level credential checks (i.e. IPFW uid/gid support, to be added to HEAD soon). Along with this comes an update to pidentd which greatly simplifies the code necessary to get a uid from a socket. Soon to come: a sysctl() interface to finding individual sockets' credentials.
* Close a race window where a tcp socket is closed while tcp_pcblist istegge1999-06-162-4/+14
| | | | copying out tcp socket info, causing a NULL pointer to be dereferenced.
* 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)
OpenPOWER on IntegriCloud