summaryrefslogtreecommitdiff
path: root/sys/net
AgeCommit message (Collapse)Author
2003-11-16pf_test() and pf_test6() consistency:Ryan Thomas McBride
- Fix anchor anchor accounting for IPv4 TCP and all IPv6 protocols. - Make stateful connections work for generic protocols on IPv6. ok henning@ dhartmei@
2003-11-16convert __attribute__((__packed__)) to __packed so that parsers unawareAnil Madhavapeddy
of gcc extensions have more of a chance. ok mcbride@, no objections from millert@, deraadt@
2003-11-09remove stale forward declarationDaniel Hartmeier
2003-11-08Return proper anchor rule number in correct byte order.Daniel Hartmeier
From Pyun YongHyeon. ok henning@, canacar@
2003-11-08Add 'no-sync' state option to prevent state transition messages for statesRyan Thomas McBride
created by this rule from appearing on the pfsync(4) interface. e.g. pass in proto tcp to self flags S/SA keep state (no-sync) ok cedric@ henning@ dhartmei@
2003-11-07adress -> address, and a few more; all from Jonathon Gray;Jason McIntyre
(mvme68k/mvme88k) vs.c and (vax) if_le.c ok miod@ isakmpd ones ok ho@
2003-11-06move netisr definition into md code to allow arch provide suitable ↵Michael Shalayeff
allocation; tested on most archs
2003-11-04add in(6)_pcblookup_listen() and replace all calls to in_pcblookup()Markus Friedl
with either in(6)_pcbhashlookup() or in(6)_pcblookup_listen(); in_pcblookup is now only used by bind(2); speeds up pcb lookup for listening sockets; from Claudio Jeker
2003-11-03pf_route() can change output NIC, so we need to check its capabilities.Cedric Berger
good candidate for 3.X errata. ok dhartmei@ henning@ mcbride@
2003-11-02Don't zero the debug level when we enable pf.Ryan Thomas McBride
ok henning@ dhartmei@
2003-10-31Remove remenants of pf_tree stuff that I missed.Ryan Thomas McBride
2003-10-29fix binat for incoming connections when a netblock (not just a singleDaniel Hartmeier
address) is used for source in the binat rule. closes PR 3535, reported by Karl O.Pinc. ok henning@, cedric@
2003-10-25Build state search indexes directly on pf_state instead of pf_tree_node.Ryan Thomas McBride
This saves more than 30% memory on state entries, and simplifies the state insertion and removal code as well. NOTE: This changes the pf API; userland tools must be updated to match. ok henning@ dhartmei@
2003-10-25"goto bad" on error with carp_input, instead of simply returning.Ryan Thomas McBride
Fixes leakage of mbufs on error. Pointed out by Max Laier.
2003-10-24Fix write filter blocking when no filter was set. FixesCan Erkin Acar
problems with dhcp. ok frantzen@ krw@ deraadt@
2003-10-22Add locking and write filtering to bpf descriptors.Can Erkin Acar
Locking prevents dangerous ioctls such as changing the interface and sending signals to be executed by an unprivileged process. A filter can also be applied to packets injected through a bpf descriptor. These features allow programs using bpf descriptors to safely drop/seperate privileges. ok frantzen@ henning@ mcbride@
2003-10-20tyopJason Wright
2003-10-19Add missing "#ifdef ALTQ"'s in the ioctl transacions code.Ryan Thomas McBride
Allows non-ALTQ kernel compile. Pointed out by tedu@ ok itojun@, "works here" tedu@
2003-10-19more typosDavid Krause
2003-10-17Common Address Redundancy ProtocolRyan Thomas McBride
Allows multiple hosts to share an IP address, providing high availability and load balancing. Based on code by mickey@, with additional help from markus@ and Marco_Pfatschbacher@genua.de ok deraadt@
2003-10-10make sure pd is initialized before use (or byte counters may increaseDaniel Hartmeier
by random values). ok mcbride@, cedric@, henning@
2003-10-08obviously i'm on drugs, revertHenning Brauer
2003-10-08missing DIOCX* in the securelevel > 1 caseHenning Brauer
2003-10-04bpf support for atm cards; from jason@ackley.netTheo de Raadt
none of us can test this, but that does not mean it has to sit in the pr database
2003-10-02do not try to send incomplete fragments on ENOBUFS caseJun-ichiro itojun Hagino
(behavior change from 4.4bsd). dhartmei ok
2003-10-02correct endian handling of ip->ip_off.Jun-ichiro itojun Hagino
do not try to send incomplete fragments on ENOBUFS case (behavior change from 4.4bsd). dhartmei ok
2003-10-01Fix stack leak into pfloghdr (the pad field is not initialized),Can Erkin Acar
which ends up in the pflog pcap file. From dhartmei@ ok dhartmei@, frantzen@, henning@
2003-10-01make ifindex2ifnet growing code more correct. (found by iij seil team)Jun-ichiro itojun Hagino
2003-09-28Correct off-by-ones with respect to PRC_NCMDS. Mostly from FreeBSD.Chad Loder
OK krw@, deraadt@
2003-09-26Rearchitecture of the userland/kernel IOCTL interface for transactions.Cedric Berger
This brings us close to 100% atomicity for a "pfctl -f pf.conf" command. (some splxxx work remain in the kernel). Basically, improvements are: - Anchors/Rulesets cannot disappear unexpectedly anymore. - No more leftover in the kernel if "pfctl -f" fail. - Commit is now done in a single atomic IOCTL. WARNING: The kernel code is fully backward compatible, but the new pfctl/authpf userland utilities will only run on a new kernel. The following ioctls are deprecated (i.e. will be deleted sooner or later, depending on how many 3rd party utilities use them and how soon they can be upgraded): - DIOCBEGINRULES - DIOCCOMMITRULES - DIOCBEGINALTQS - DIOCCOMMITALTQS - DIOCRINABEGIN - DIOCRINADEFINE They are replaced by the following ioctls (yes, PF(4) will follow) which operate on a vector of rulesets: - DIOCXBEGIN - DIOCXCOMMIT - DIOCXROLLBACK Ok dhartmei@ mcbride@
2003-09-26Move statistics counters from individual pf_test_<proto>() andRyan Thomas McBride
pf_test_state_<proto>() to pf_test() and pf_test6(). Reduce code redundancy, and fix the following bugs: - ICMP packets were not being accounted for correctly (missing statistics code in pf_test_state_icmp() - Some packets were not being counted in the loginterface statistics NOTE: Under some situations with route-to, packets may get counted once on the original interface, and once on the pf-routed interface. This can be dealt with by rules which specify the each interface explicitly. ok cedric@, henning@
2003-09-24Remove state setup no-ops.Ryan Thomas McBride
ok cedric@ frantzen@ henning@
2003-09-23Replace select backends with poll backends. selscan() and pollscan()Todd C. Miller
now call the poll backend. With this change we implement greater poll(2) functionality instead of emulating it via the select backend. Adapted from NetBSD and including some changes from FreeBSD. Tested by many, deraadt@ OK
2003-09-21sync with netbsd defines. no functional changes.Federico G. Schwindt
ok markus deraadt
2003-09-18comment spelling, from jonathon grayTed Unangst
2003-09-01KNFHenning Brauer
2003-09-01Make nat rule update the table counters when no filtering rule is used.Cedric Berger
This is mostly to support the new "nat pass" rule. ok dhartmei@ henning@
2003-08-29Fix three cases of potential accesses to free'd memory. At least one ofDaniel Hartmeier
them could be used to panic pf with scrub rules remotely. Found by Rob Pickering. ok frantzen@, henning
2003-08-28fix "pfctl -vvsr" output for rules with tables inside anchors.Cedric Berger
ok henning@
2003-08-27fix inconsistency how we handle tcpopt EOL versus how p0f v2 handles itMike Frantzen
2003-08-27it is supprisingly common (>4%) for some NAT and DSL routers to tweak MSSMike Frantzen
by setting it to whatever is suitable for the link type. so we try a guessed 1460 MTU and 1500 MSS if the primary check fails. algorithm tweak from Michal Zalewski name a few constants too while I'm in there
2003-08-27RNF_IGNORE can corrupt the radix tree when an interface is down, itHenric Jungheim
makes routing lookups slightly more expensive, and serves no useful purpose. ok itojun@ tedu@
2003-08-27cut-and-paste error; henricJun-ichiro itojun Hagino
2003-08-26mark cloned route with RTF_CLONED. remove RTF_CLONED route when clone parentJun-ichiro itojun Hagino
disappers. deraadt ok
2003-08-25if_init support, required by ieee80211.Federico G. Schwindt
deraadt@ ok.
2003-08-25add DLT_IEEE802_11; deraadt@ ok.Federico G. Schwindt
2003-08-24defines and struct for the ieee80211 framework; deraadt@ ok.Federico G. Schwindt
2003-08-22pf spelling policeDavid Krause
ok dhartmei@ jmc@
2003-08-22KNFHenning Brauer
2003-08-22don't expose pf_osfp_fingerprint() to ! _KERNEL. tcpdump et al useMike Frantzen
pf_osfp_fingerprint_hdr() which doesn't work on mbufs. pointed out by Max Laier