summaryrefslogtreecommitdiff
path: root/sys/net
AgeCommit message (Collapse)Author
2007-12-20increment the match/nomatch table counters when using a table/pool inReyk Floeter
rdr rules. this helps to get some statistics about l3 redirections. ok henning@
2007-12-20return with ENOTTY instead of EINVAL for unknown ioctl requests.Brad Smith
ok claudio@ krw@ jason@ dlg@
2007-12-14add sysctl entry points into various network layers, in particular toTheo de Raadt
provide netstat(1) with data it needs; ok claudio reyk
2007-12-05Revert change which seems to break things like dhclient. Requested byKenneth R Westerback
deraadt@.
2007-12-041500 is a 'magic number' in the protocol that all implementationsClaudio Jeker
must be able to handle as MRU but while testing pppoe(4) against a pppoe(8) server I figured out that pppoe(8) insists on a MRU 1492. Because of this we allow the offered MRU to be between PP_MIN_MRU and PP_MAX_MRU especially because the MRU is not used at all as long as it is smaller then PP_MAX_MRU. OK canacar@
2007-12-04Always compare the nexthop if one is specified even if it is a non-multipathClaudio Jeker
route. This mostly affects "route delete" and it will not remove the last route if previous delete is redone. OK henning@
2007-12-02DIOC{GET,ADD}STATE incorrectly use a user provided pointer without usingChristopher Pascoe
copyin/out. Change the API so that the state is included in the ioctl argument, so the ioctl wrappers take care of copying memory as appropriate. Also change the DIOCGETSTATE API to be more useful. Instead of getting an arbitrarily "numbered" state (using numbering that can change between calls), instead search based on id and creatorid. If you want to monitor only a particular state, you can now use the bulk functions first to find the appropriate id/creatorid and then fetch it directly from then on. ok dlg@ henning@
2007-12-02When pf_insert_state state succeeds, increase the state count on theChristopher Pascoe
default rule. When pf_insert_state fails, it's because a matching state already exists. Return a better error code to the user in this case. ok henning@ dlg@
2007-12-02initialize altq->altq_disc to NULL, from Max LaierDaniel Hartmeier
2007-12-02Don't put state key if pf_insert_state fails. pf_detach_state would haveChristopher Pascoe
put it for us already. Also, fix cut-n-paste error in previous commit. ok dlg@ henning@
2007-12-02Don't leak state if key allocation fails during add.Christopher Pascoe
ok dlg@ henning@
2007-12-02Set expiry timestamp when importing a state, otherwise it expires on theChristopher Pascoe
next expiry run. ok dlg@ henning@
2007-12-02DIOCADDSTATE would always dereference a NULL pointer during this copyChristopher Pascoe
and what it was copying would get overwritten anyway. Remove the copy and avoid a panic. DIOCGETSTATE would incorrectly dereference a pointer to a pointer, causing another panic. Fix this.
2007-11-27typos; ok jmc@Martynas Venckus
sys/dev/pci/pciide.c from naddy@
2007-11-26typos; ok jmc@Martynas Venckus
sys/netinet/in_pcb.c and sys/net/bridgestp.c ok henning@ sys/dev/pci/bktr/* ok jakemsr@
2007-11-24some spelling fixes from Martynas VenckusJason McIntyre
2007-11-22pf_src_tree_remove_state() is called upon pf_insert_state() failures.Henning Brauer
but pf_insert_state does fiddle with the state's state_key pointer - it has too -, and can leave it at NULL. pf_src_tree_remove_state() tried to grab the protocol from it. fortunately that is superfluous here, since tcp_est will never be set in the non-tcp case - it is only touched in pf_src_connlimit which in turn is only ever called from pf_test_tcp(). ok mcbride + identical diff from pascoe, but he was a few minutes late :)
2007-11-22Factor out the virtual host portion of carp into a separate structMarco Pfatschbacher
that is kept in a list per carp interface. This is the huge first step necessary to make carp load balancing nice and easy. One carp interface can now contain up to 32 virtual host instances. This doesn't do anything useful yet, but here is how an ifconfig for multiple entries now looks like: # ifconfig carp2 carpnodes 5:0,6:100 192.168.5.88 carp2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 lladdr 00:00:5e:00:01:05 carp: carpdev sis0 advbase 1 state MASTER vhid 5 advskew 0 state BACKUP vhid 6 advskew 100 groups: carp inet 192.168.5.88 netmask 0xffffff00 broadcast 192.168.5.255 OK mcbride@
2007-11-21simplify sppp_chap_scr() now that we are using arc4random_bytes()Can Erkin Acar
2007-11-20Fix possible mbuf leak on error. ok reyk@Can Erkin Acar
2007-11-18backout 1.562 since it triggers the problem described in pr 5648Theo de Raadt
please close the pr after another solution is found for both problems
2007-11-18Sync struct ifaltq to match struct ifqueue.Marco Pfatschbacher
I wonder why 64-bit archs have not been bitten by this. OK mcbride@, henning@
2007-11-16in pf_test_fragment(), ignore protocol-specific criteria for packets ofDaniel Hartmeier
different protocols. from Max Laier. ok markus@, henning@
2007-11-16use arc4random_bytes() instead of multiple arc4random() calls;Damien Miller
ok deraadt@ dlg@ henric@ mcbride@
2007-11-11Don't leak pfstatekey upon insert conflict (most often caused via pfsync).Christopher Pascoe
tested david@, ok dhartmei@
2007-11-07Check for pfi_kif's that are neither groups nor have a real interface.Marco Pfatschbacher
This prevents a null-deref when empty groups are used in set loginterface. Fixes PR 5628 as reported by Andreas Bihlmaier. Bad mpf :( OK henning@
2007-11-01correct fixTheo de Raadt
2007-11-01tsk tsk tsk, noone tested this; spotted by canacarTheo de Raadt
2007-10-31'block return' must not send anything on blocked icmp packets.Marco Pfatschbacher
Noticed by Kai_Doernemann_at_genua.de OK henning@, deraadt@
2007-10-31Don't leak potentially secret authname through ioctl interface.Mike Belopuhov
Suggestions from mpf@ and canacar@ ok deraadt mpf canacar
2007-10-30fix a typo, LIST_FOREACH(bp2, ... and then using bp instead of bp2Henning Brauer
inside that loop doesn't yield the expected results. from freebsd r1.37 Andrew Thompson <thompsa@freebsd.org>
2007-10-25Fix probability rules w/ numbers (e.g probability 0.4).Marco Pfatschbacher
Add support for probablities of 0% and 100%. With and OK deraadt@
2007-10-22use the input mbuf for the first active port instead of copying it inReyk Floeter
the broadcast start routing. ok pyr@
2007-10-22Add a broadcast mode to trunk(4). This mode sends frames on allPierre-Yves Ritschard
ports and receives frame on any port. This allows interaction with some L2 configurations. with input and ok reyk@
2007-10-18There is no point for IP addresses on pflog(4)Marco Pfatschbacher
OK dhartmei@, henning@
2007-10-14'syncronize' -> 'synchronize'. From Diego Casati.Kenneth R Westerback
2007-10-13remove unneeded declarations that shadows existing vars; ok by many.Federico G. Schwindt
2007-10-05add a 2.5 Gbps fiber media type.Brad Smith
From FreeBSD ok claudio@ dlg@
2007-09-27Add loginterface support for groups.Marco Pfatschbacher
Using a group sums up the statistics of all members. Modify pfctl(1) slightly to allow a groupname "all", which gives us an overall pf(4) statistic. OK henning@, markus@
2007-09-25Handle incoming protocol reject packets now that we haveCan Erkin Acar
more than one protocol. From FreeBSD, reported and tested by jmc@
2007-09-19tidy up a little.Brad Smith
ok claudio@ dlg@
2007-09-19Use the proper baudrate for 10Gb hw now that it can fit into the buadrateBrad Smith
field. ok claudio@ dlg@
2007-09-18allow 4095 instead of 20 multicast group memberships per socket (you needMarkus Friedl
one entry for each multicast group and interface combination). this allows you to run OSPF with more than 10 interfaces. adapted from freebsd; ok claudio, henning, mpf
2007-09-18allow state reuse for tcp if both sides are in FIN_WAIT_2 and a new SYNMarkus Friedl
arrives; ok dhartmei, henning, feedback aaron
2007-09-17- Use a 64-bit int for the baudrate within the ifmedia_baudrate struct andBrad Smith
return a 64-bit int for ifmedia_baudrate(). - Fix consumers of ifmedia_baudrate() to deal with the change. ok claudio@ dlg@
2007-09-17Do not take wild guesses at how if_enc's internal works, includePierre-Yves Ritschard
net/if_enc.h instead. ok todd@ and probably claudio who's in the train.
2007-09-16another M_ZERO diff.Pierre-Yves Ritschard
2007-09-15malloc sweep:Henning Brauer
-remove useless casts -MALLOC/FREE -> malloc/free -use M_ZERO where appropriate instead of seperate bzero feedback & ok krw, hshoexer
2007-09-13Convert MALLOC/FREE to malloc/free and use M_ZERO where applicable.Hans-Joerg Hoexer
ok krw@
2007-09-09Only clear the message header if it is called from a sysctl walk. ThisClaudio Jeker
unbreaks RTM_GET. Problem reported by fkr@