summaryrefslogtreecommitdiff
path: root/sys/net
AgeCommit message (Collapse)Author
2007-06-17add back missing bcopy & break, got lost when removing arcnet.Henning Brauer
spotted by Mike Belopuhov <mkb@crypt.org.ru>
2007-06-15in pf_test_rule, before handling IPPROTO_ICMP / IPPROTO_ICMPV6, check thatHenning Brauer
the packet is of the expected address family (AF_INET / AF_INET6). crafted IPv4 packets with IPPROTO_ICMPV6 can make us crash otherwise. misbehaviour provoked by Adrian Close <adrian@close.wattle.id.au> playing with nmap; he also helped us big time debugging the problem. thanks! ok ryan
2007-06-14Add a new "rtlabel" option to ifconfig. It allows to specify a route labelReyk Floeter
which will be used for new interface routes. For example, ifconfig em0 10.1.1.0 255.255.255.0 rtlabel RING_1 will set the new interface address and attach the route label RING_1 to the corresponding route. manpage bits from jmc@ ok claudio@ henning@
2007-06-14sprinkle some #ifdef IPSEC so that pfsync compiles w/o ipsecHenning Brauer
from mickey, ok me markus mickey
2007-06-11move definitions for the flags in the mbuf header used by pf to mbuf.hHenning Brauer
since we include the mbuf header parts for pf unconditionally, we should be able to check them unconditionally as well. ok mcbride markus
2007-06-09fix wrong argument passing to m_copyback for the log caseHenning Brauer
(&ptr instead of ptr). should fix pflog breakage seen by bob
2007-06-09sizeof(ptr) is no good if you want sizeof(*ptr). icmp/icmpv6.Henning Brauer
2007-06-08kill arcnet leftovers, some pt out by Mike Belopuhov <mkb@crypt.org.ru>,Henning Brauer
some I found afterwards, ok dlg
2007-06-07PR 5502 From: Marc Huber <Marc.Huber@web.de>Henning Brauer
pfioctl()'s DIOCKILLSTATES triggers panic due to wrong test variable in for() loop. well analyzed and fixed, excellent PR, applied verbatim, thanks! (this was fallout from the state - state key split)
2007-06-06vlan interfaces do not allow the parent interface and the vlan number to beHenning Brauer
reconfigured after they are set. so they bail out when you try to. so when you re-run netstart on a machine with vlans, it bails out with ifconfig: SIOCSETVLAN: Device busy and IP changes are not done. make vlan_config() notice when both parent interface and vlan number stay the same and just return success without doing anything in that case. allows the IP config thereafter to happen. ok markus jason
2007-06-06remove remaining IPX hooks. all inside #ifdef IPX, so no actual changeHenning Brauer
2007-06-02pf_set_rt_ifp accesses state key data, so must be called laterHenning Brauer
2007-06-01factor out duplicated code to allocate state key and cross-reference itHenning Brauer
with a state entry into a new pf_alloc_state_key() function and use it everywhere. makes upcoming changes way easier and is cleaner anyway. conceptually agreed by ryan, but he's on the road now ;(
2007-06-01fold pf_test_tcp(), pf_test_udp(), pf_test_icmp(), pf_test_other() intoHenning Brauer
one - pf_test_rule(). now we have one place to make things clearer and maybe find another few performance bits :) shrinks i386 GENERIC by 11K, no measurable performance impact or gain. lots lots lots lots lots of testing and headbanging with ryan, performance testing ckuethe. ok ryan
2007-06-01apply the "skip ipsec if there are no flows" speedup diff to IPv6 too.Henning Brauer
we need a pointer to the inpcb to decide, which was not previously passed to ip6_output, so this diff is a little bigger. from itojun, ok ryan
2007-05-31Make sure that pf_state_key and pf_state_key_cmp are in sync.Ryan Thomas McBride
I am a retard for not testing properly and owe people beers tonight.
2007-05-31unlink the right state, ryan okHenning Brauer
2007-05-31Move the state id and creatorid (used mainly by pfsync) into struct pf_state.Ryan Thomas McBride
ok henning@
2007-05-31Unbreak pf.c compilation on gcc 2.95 architectures. Found by todd@Ryan Thomas McBride
2007-05-31First step of rearranging pf's state table internals...Ryan Thomas McBride
- Split pf_state into pf_state (used for tracking connection information), and pf_state_key (used for searching the state table) - Use pfsync_state in the ioctl for userland access to the state table. This will sheild userland somewhat from future changes. ok henning@ toby@ pyr@
2007-05-29remove token ring leftovers, ok mcbride pvalHenning Brauer
2007-05-29It helps to commit removals from the tree that has the files cvs removedClaudio Jeker
instead of one where they where just empty. Figured out by art@
2007-05-29now i get my hands dirty in here... from if_ethersubr.c:Henning Brauer
there was code inside #if NPF > 0 to prevent feeding back the mbuf do looutput if we are on simplex interfaces and the packet has been routed by pf, which can lead to a loop in weird corner cases. apparently nobody triggered these cases in ages, since pf.h was not included and thus NPF not defined and thus this code not compiled.
2007-05-29there was code insideHenning Brauer
#if NPF > 0 to prevent feeding back the mbuf do looutput if we are on simplex interfaces and the packet has been routed by pf, whch can lead to a loop in weird corner cases. apparently nobody triggered these cases in ages, since pf.h was not included and thus NPF not defined and thus this code not compiled. ok theo
2007-05-29Move tokenring support to the attic where it can join the cards that whereClaudio Jeker
decomissioned aeon ago. We will not miss it at all. OK dlg@ henning@ and a lot of cheers by other in the room
2007-05-29Define IF_ENQUEUE() and friends as proper C statements using do ... whileUwe Stuehler
ok henning
2007-05-29Use atomic operations to operate on netisr, instead of clearing it at splhigh.Miod Vallat
This changes nothing on legacy architectures, but is a bit faster (and simpler) on the interesting ones.
2007-05-29IMP is dead and nothing uses NETISR_IMP so remove it from the netisr list.Claudio Jeker
OK henning@ mcbride@
2007-05-29Spaces, no binary changes.Claudio Jeker
2007-05-29gain us another 10+% of performance.Henning Brauer
boring details: long time ago (in r1.313) code was added to handle protocol checksums: > Check protocol (TCP/UDP/ICMP/ICMP6) checksums of all incoming packets, > and drop packets with invalid checksums. Without such a check, pf would > return RST/ICMP errors even for packets with invalid checksums, which > could be used to detect the presence of the firewall, reported by > "Ed White" in http://www.phrack.org/phrack/60/p60-0x0c.txt. that meant we did the checksumming for each and every packet traversing pf. now only do the checksumming right before we send an RST back, so in all other cases we save that work. ok bob theo
2007-05-29Add a name argument to the RWLOCK_INITIALIZER macro.Thordur I. Bjornsson
Pick reasonble names for the locks involved.. ok tedu@, art@
2007-05-28double pf performance.Henning Brauer
boring details: pf used to use an mbuf tag to keep track of route-to etc, altq, tags, routing table IDs, packets redirected to localhost etc. so each and every packet going through pf got an mbuf tag. mbuf tags use malloc'd memory, and that is knda slow. instead, stuff the information into the mbuf header directly. bridging soekris with just "pass" as ruleset went from 29 MBit/s to 58 MBit/s with that (before ryan's randomness fix, now it is even betterer) thanks to chris for the test setup! ok ryan ryan ckuethe reyk
2007-05-28Only call add_net_randomness() once per interrupt instead of once per ↵Ryan Thomas McBride
packet. If multiple packets come in on a single interrupt the times mixed into the randomness pool will be identical or predictably close anyways, and nanotime() is expensive. ok toby jason miod claudio
2007-05-28Users of arc4random() should include dev/rndvar.h directly.Ryan Thomas McBride
ok dlg claudio
2007-05-27get rid of static.David Gwynne
ok claudio@ reyk@ henning@ ja ja ja mcbride@
2007-05-27clarify things by passing kif->pfik_ifp around in pf_test{,6} insteadPierre-Yves Ritschard
of reassigning a struct ifnet pointer. discussed with and ok mcbride@
2007-05-26add comments indicating why we do m = *m0; again after pf_normalize, ryan okHenning Brauer
2007-05-26one extern seems to be better than 20 for ifqmaxlen; ok krwJason Wright
2007-05-26More comment typos from Diego Casati. Including winners like funtion, allmost,Kenneth R Westerback
oustside, seqencer, toghether, nessissary, etc.
2007-05-23use the intr pool when allocating from interrupt context;Markus Friedl
fixes pppoe f_addrhooks panics (e.g. pr 5454); ok canacar
2007-05-21make bridge(4) mark packets with M_PROTO1 if gif(4) needs to useMarkus Friedl
etherip encapsulation; unbreaks remote ipsec bridges; ok claudio; additional testing Renaud Allard
2007-05-20Handle IP address stuff in tls/tlf state messagesCan Erkin Acar
instead of open/close events. Fixes PR 5457 where an extra open event arrived due to an authentication timeout/retransmission and confused things. Tested by RD Thrush and mpf@, discussions and ok mpf@
2007-05-16fix return values in bridge_output.Michele Marchetto
OK claudio@ jason@
2007-05-16count the number of multicast ranges that are kept in the list of multicastDavid Gwynne
addresses in struct arpcom. this lets a nic driver easily see if it wants allmulti behaviour, which in turn means we can clean some code up. ok jason@ claudio@ norby@
2007-05-15Update the ifp of bridge cache entries if the entry is not static. ThisClaudio Jeker
makes carp(4) fail-over work over bridge(4). OK michele@ jason@
2007-05-08block ALL packets with rthdr0 in pf_test6(). We already do thisRyan Thomas McBride
in ip6_input(), but pf_test6() is called from bridge code as well. ok dhartmei@ henning@ deraadt@ claudio@
2007-05-08Routing headers are dangerous. Deal with them the same way as IPv4 options:Ryan Thomas McBride
drop all packets with routing headers unless the matching rule explicitly specifies 'allow-opts'. ok dhartmei@ henning@ deraadt@ claudio@
2007-05-08wildcard is nowhere used anymore. Figured out by deraadt@Claudio Jeker
2007-05-08rtalloc2() and rtalloc_noclone() inside NPF > 0Theo de Raadt
2007-05-03Use if_flags instead of ifr_flags.Marco Pfatschbacher
It shouldn't make a difference, but some ioctl-callers don't initialize the ifreq properly. Fixes a panic w/ tun(4) on trunk(4). OK reyk@, claudio@