summaryrefslogtreecommitdiff
path: root/sys/net
AgeCommit message (Collapse)Author
2003-06-25add a pf_tagname field to ifbrlreq and a pf_tag field to ifbrlnode.Henning Brauer
on bridge rule load translate tagnames to pf tags using pf_tagname2tag etc if packets match a bridge filter rule tag them using pf_tag_packet() with the given tag help dhartmei@ ok deraadt@ jason@ dhartmei@
2003-06-24in the ipv6 case, allow route-to to route to link-local addressesHenning Brauer
from KOZUKA Masahiro <ma-kun@kozuka.jp> with a minor adjustment from itojun ok itojun@ dhartmei@
2003-06-24KNFHenning Brauer
2003-06-24recover code that requires exact match on rtm_change/lock (lost in netbsd 1.16).Jun-ichiro itojun Hagino
without it "route change X" would change less-specific route by mistake. reported by jinmei@kame, markus ok
2003-06-23Don't remove anchor too early in table code, it makes PF use freed memory.Cedric Berger
This might just be a temporary fix, we're still looking for a better one. ok dhartmei@
2003-06-21count packets and bidirectionally on state entries, allowing for fine-grainedDamien Miller
traffic reporting w/ pfsync; ok dhartmei@ Note: ABI change (new fields in struct pf_state), requires a rebuild of pfctl and tcpdump.
2003-06-20Add MSS support to the synproxy. The client's MSS is sent to the server,Daniel Hartmeier
the server's MSS is guessed based on the routing table and interface MTU. Fine patch entirely from Krists Krilovs <pow@pow.za.net>, ok frantzen@ Note: ABI change (new field in struct pf_state), requires a pfctl rebuild (and tcpdump for pfsync).
2003-06-20Extend 'BAD ICMP' debug message, include icmp type/code and outer IP headerDaniel Hartmeier
addresses. ok mcbride@, cedric@
2003-06-18Do not panic on no memory available when allocating bufs, pass ENOBUFSHenning Brauer
to userland instead. fixes PRs 2235, 2236 and 2640 from Otto Moerbeek <otto@drijf.net> ok frantzen@, tedu@, deraadt@
2003-06-14Use source's window scaling factor (instead of destination's) whenDaniel Hartmeier
comparing ackskew, otherwise legitimate low acks can get blocked. Was triggered when asymmetric scale factors where used in combination with SACK. Report and logs provided by Peter Galbavy. ok frantzen@, henning@
2003-06-12in FIONREAD and FREAD, use IFQ_POLL instead of looking at if_snd.ifq_len /Henning Brauer
ifq_head, to make altq work. prevents programs from spinning in non-blocking select()/read() loops in case of queues hitting their limits. This makes queueing on tun interfaces work. while it is still advised to assign packets to queues on tunX and queue on the physical interface in generic, this doesn't work in the PPPoE case with the userland pppoe process, there the mbuf tags with the queue IDs don't survive obviously. based on diff from Trevor Talbot, tested successfully by a lot of people on the pf@benzedrine.cx list. ok pb@ kjc@
2003-06-10It would kind of help if the flags member was initialized, otherwise randomDaniel Hartmeier
rules create state. Truly hard to spot. Unless you run the code, of course.
2003-06-09Attempt to resolve byte order confusion in nat code once and for all.Ryan Thomas McBride
- pf_get_sport() leaves the translated port in the packet in network byte order - merge code for the p1=0 p2=0 case and static-port case in pr_get_sport() NOTE: people who use the static-port keyword in their pf.conf need to make sure pfctl is updated along with their kernel.
2003-06-08Returns the correct array size.Cedric Berger
2003-06-08A table in an anchor creates a real anchor: pfctl -sA works.Cedric Berger
The following two pfctl functions work with an "-a" option: - pfctl [-a foo[:bar]] -sT - pfctl [-a foo[:bar]] -FT ok dhartmei@
2003-06-03move some prototypes to pfvar.h. needed soon.Henning Brauer
pf_tagname2tag, pf_tag2tagname, pf_tag_unref, pf_tag_packet
2003-06-03provide pf_tag2tagname which is the reverse of pf_tagname2tag. needed soon.Henning Brauer
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-06-02nuke clause 3 & 4Jason Wright
2003-05-30KNF & ANSI, jason agreesHenning Brauer
2003-05-30o the timeout is int, not u_int32_tHenning Brauer
o check timeout for negative values and overflow ok tedu@ jason@
2003-05-24Unused variable.Cedric Berger
2003-05-18speed hack: delay fetching the mbuf tag until we really need it (hit aHenning Brauer
"tagged X" rule), and only get it when we really need it. simplifies code too. ok dhartmei@ pb@
2003-05-18Merge pf_send_ack() and _send_syn() into a generic _send_tcp().Daniel Hartmeier
In the SYN proxy, generate ACKs with proper window sizes after the handshakes.
2003-05-17Correct two comment typos.Daniel Hartmeier
2003-05-17With rdr we want the source IP from the packet, not the source IP fromRyan Thomas McBride
the rule. Fixes rdr with address pools using bitmask and source-hash address selection methods. ok dhartmei@ henning@
2003-05-17allow inverse matching on tagsHenning Brauer
ok dhartmei@ pb@
2003-05-17Add an 'action' code that allows the SYN proxy to swallow/drop a packetDaniel Hartmeier
without causing EHOSTUNREACH to be delivered to local sockets, so it works for outgoing connections originating on the same host. ok frantzen@
2003-05-16TCP SYN proxy. Instead of 'keep state' or 'modulate state', one can useDaniel Hartmeier
'synproxy state' for TCP connections. pf will complete the TCP handshake with the active endpoint before passing any packets to the passive end- point, preventing spoofed SYN floods from reaching the passive endpoint. No additional memory requirements, no cookies needed, random initial sequence numbers, uses the existing sequence number modulators to translate packets after the handshakes. ok frantzen@
2003-05-14- modulate TCP Timestamps so they can't be used to detect NAT and to precludeMike Frantzen
remote uptime determination - scrub modifier "reassemble tcp" turns on stateful TCP normalizations ok henning@ dhartmei@
2003-05-14tag on each matching rule, not just the last one.Henning Brauer
idea from theo. to speed that up the real mbuf tag is not written until we hit the last match but an internal variable is used to track the tag. this can be used to split classification and policy enforcement, for example. and much much much more... ok dhartmei@ frantzen@
2003-05-14unifdef __FreeBSD__ and stuff. markus okJun-ichiro itojun Hagino
2003-05-14Use official (from pcap people) link type for pflog.Can Erkin Acar
With this change, the log header format also changes. The new log format is extendible and allows logging of the originating anchor and ruleset information. ok henning@ dhartmei@ frantzen@
2003-05-142 lines of code bring us tags on nat rulesHenning Brauer
ok dhartmei@ frantzen@
2003-05-14move ETHERTYPE_xx declarations to <net/ethertypes.h>. meets netbsd practice.Jun-ichiro itojun Hagino
deraadt ok
2003-05-14fix use after free race when purging the new PF tagsMike Frantzen
ok henning@
2003-05-13add support for tagging packets with arbitary tags and filtering based onHenning Brauer
those tags later on. ok dhartmei@ pb@ mcbride@ frantzen@
2003-05-13back out. these changes were not tested. it might come as a surpriseTheo de Raadt
to some developers, but include files are not just used by the kernel. there are applications that pull them in as well. this change broke tcpdump, and who knows what else. i've been talking for 24 hours now about tree breakage and let this be official: I am prepared to lock the tree entirely if need be. YOU WILL GET OK PERMISSION FROM EVERYONE, NOT JUST FROM ONE PERSON
2003-05-13move ethernet protocol type defs into sys/net/, as it is not just for ethernetJun-ichiro itojun Hagino
(FDDI, ieee1394, ...). follows netbsd practice. 2 jasons, dhartmei, thierry ok
2003-05-13Kill a bunch more commons (very few left =)Jason Wright
2003-05-13nuke common: ifnet_addrsJason Wright
2003-05-12- TCP window scaling is not applied to the SYNs' window so we must retract theMike Frantzen
initial maximum window by the scaling factor. otherwise our view of the allowable sequence window is too big. back out the scaling factor adjustment from the max window if the other endpoint rejects window scaling - window scale the forward ACK skew check ok dhartmei@
2003-05-12Add comment about special (non-index) PFTM_* values.Daniel Hartmeier
2003-05-12Reorder IPv6 address comparisons to check the least significant partsRyan Thomas McBride
first. The least significant portions of the IPv6 address are more likely to differ than the more significant ones, since in most situations half the addresses (either the source or the destination) will be in the local subnet. ok dhartmei@ henning@
2003-05-12Correctness nit. Initialise state search trees properly.Ryan Thomas McBride
ok henning@ frantzen@
2003-05-12Adaptive timeout value scaling. Allows to reduce timeout values as theDaniel Hartmeier
number of state table entries grows, so entries time out faster before the table fills up. Works both globally and per-rule. ok frantzen@
2003-05-12Nuke a whole bunch of commons; ok tedu (still more to come *sigh*)Jason Wright
2003-05-12missing includeHenning Brauer
2003-05-11the start of stateful TCP scrubbing. dynamically determine the highest TTL ofMike Frantzen
each side of the TCP connection and prevent it from being reduced ok pb@ dhartmei@
2003-05-11Use sizeof(struct icmp6_hdr) instead of ICMP_MINLEN for IPv6, both areDaniel Hartmeier
8 bytes, but the former is more appropriate. ok frantzen@