| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
Fix error in synproxy connection completion. Source and
destination windows were confused, one instead of other.
Approved by: re (kensmith)
Notes:
svn path=/releng/5.4/; revision=145506
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Fix mss byte order, only affects synproxy code path.
Submitted by: John L. Scarfone via OpenBSD
Reviewed by: mlaier
Obtained from: OpenBSD, rev. 1.483
Approved by: re (kensmith)
Notes:
svn path=/stable/5/; revision=145107
|
| |
|
|
|
|
|
|
|
| |
Don't read past the end of pVDevice[].
Approved by: re
Notes:
svn path=/stable/5/; revision=144272
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fine-grained locking for ipfilter. This is an approximate merge of
several overlapping changes introduced due to build problems with the
original changes, first attempted fixes, second attempted fixes, et al.
ip_auth.c:1.37, ip_compat.h:1.24, ip_frag.c:1.26, ip_log.c:1.28, ip_nat.h:1.22,
ip_proxy.c:1.23, ip_state.c:1.34, ip_state.h:1.16, mlfk_ipl.c:1.14
Enable fine grained locking within IPFilter, using mtx(9) and sx(9) allowing
the the "needs giant" flag to be removed from the driver.
fil.c:1.41, ip_file.c:1.50, ip_fil.h:1.28
Sprinkle in some __FreeBSD_version checks so that this compiles again. Don't
define PFIL_HOOKS anymore.
Submitted by: keramida
|| (__FreeBSD_version >= 503000)
ip_fil.h:1.29
Darnit, through a maze of twisty passages, ipfilter needs to have PFIL_HOOKS
defined. Revert part of the previous commit to fix this.
fil.c:1.42, ip_fil.c:1.51
* The #ifdef's to cause mutex's for freebsd to be declared were meant to pick
up on USE_MUTEX being defined, but this patch
* Remove some code that's in a #ifndef FreeBSD that's no longer used.
ip_auth.c:1.38
* Remove some code that's in a #ifndef FreeBSD that's no longer used.
This collective set of changes should reduce/eliminate reported crashes
associated with ipfilter and SMP configurations.
Timeout: darrenr
Approved by: re (kensmith)
Tested by: nectar
Notes:
svn path=/stable/5/; revision=143526
|
| |
|
|
|
|
|
|
|
|
| |
Fix inteface clear time. pf printed "Thu Jan 1 09:00:01 1970"
in "pfctl -vvsI" output when pf was statically linked to kernel.
Discussed with: mlaier
Notes:
svn path=/stable/5/; revision=142434
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fix a terrible braino in pfi_maybe_destroy() and unbreak "$pfctl -Fall"
with renamed interfaces.
PR: kern/77645
Reported by: Harald Schmalzbauer <harryNOschmalzbauerSPAMde>
Reviewed by: yongari
Notes:
svn path=/stable/5/; revision=142380
|
| |
|
|
|
|
|
|
|
|
|
| |
selecting a replacement address for an rdr rule. Some rdr rules
have no address family (when the replacement is a table and no
other criterion implies one AF). In this case, pf would fail to
select a replacement address and drop the packet due to
translation failure.
Notes:
svn path=/stable/5/; revision=140937
|
| |
|
|
|
|
|
|
|
|
| |
documented like this in init(8), but the code didn't match the
documentation.
PR: kern/76526
Notes:
svn path=/stable/5/; revision=140593
|
| |
|
|
| |
Notes:
svn path=/stable/5/; revision=140277
|
| |
|
|
| |
Notes:
svn path=/stable/5/; revision=140160
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
prevents a possible endless loop in pf_get_sport() with
'static-port'
ICMP state entries use the ICMP ID as port for the unique state
key. When checking for a usable key, construct the key in the
same way. Otherwise, a colliding key might be missed or a state
insertion might be refused even though it could be inserted. The
second case triggers the endless loop, possibly allowing a NATed
LAN client to lock up the kernel.
Notes:
svn path=/stable/5/; revision=139155
|
| |
|
|
| |
Notes:
svn path=/stable/5/; revision=139029
|
| |
|
|
|
|
|
|
|
| |
Make ip_nat compile again. Should read #if->n<-def LARGE_NAT as in ipf 4.x
Insta-MFC approved by: scottl
Notes:
svn path=/stable/5/; revision=139006
|
| |
|
|
|
|
|
|
|
| |
to keep them out of harms way when compiling.
PR: 72783
Notes:
svn path=/stable/5/; revision=138979
|
| |
|
|
|
|
|
|
|
|
| |
PR: 70038
Submitted by: fming@borderware.com
Reviewed by: darrenr
Obtained from: fming@borderware.com
Notes:
svn path=/stable/5/; revision=138947
|
| |
|
|
|
|
|
|
|
|
| |
buffer doesn't work for ipv6 packets, so use m_defrag() here instead as an
easy drop-in replacement.
PR: 70399
Notes:
svn path=/stable/5/; revision=138928
|
| |
|
|
|
|
|
|
|
|
|
| |
ICMP6 header. pf finds the first TCP/UDP/ICMP6 header to filter by
traversing the header chain. In the case where headers are skipped,
the protocol checksum verification used the wrong length (included
the skipped headers), leading to incorrectly mismatching checksums.
Such IPv6 packets with headers were silently dropped.
Notes:
svn path=/stable/5/; revision=138793
|
| |
|
|
|
|
|
|
| |
'binat from ... to ... -> (if)' are used, where the interface
is dynamic.
Notes:
svn path=/stable/5/; revision=138466
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Improved interface handling. This fixes the use of renamed interfaces
(ifconfig xl0 name foo) as well as some special interfaces such as the
6to4 tunnel.
Reported by: Ed Schouten <ed (at) il ! fontys , nl>
Tested by: freebsd-pf
PR: kern/72444
Notes:
svn path=/stable/5/; revision=138052
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reactivate skipping over bogus IPCP addresses on ppp interfaces. Be more
careful with the skip condition this time. Addresses are only not taken
into account if:
- The interface is POINTTOPOINT
- There is no route installed for the address
- The user specified noalias (:0)
and - We are looking at an IPv4 address.
This should be enough paranoia to not cause any false positives.
PR: misc/69954
Discussed with: yongari
Another forgotten MFC :-( ... 5.4R then ...
Notes:
svn path=/stable/5/; revision=137385
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a panic discovered with some apache2 configure test (that seemed to
trigger a socket creation race some some kind). Checking for non-NULL
socket and credential is not a bad idea anyway. Unfortunatly too late for
the release.
Reported & tested by: Gilbert Cao
I completly forgot about this when the release was pushed back. Depending on
the new maintance policies for RELENG_5_3 it might be a candidate. Let's
just not forget ... I hope the MFC reminder works here ...
MFC after: 2 weeks
Notes:
svn path=/stable/5/; revision=137371
|
| |
|
|
| |
Notes:
svn path=/stable/5/; revision=136863
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add an additional struct inpcb * argument to pfil(9) in order to enable
passing along socket information. This is required to work around a LOR
with the socket code which results in an easy reproducible hard lockup
with debug.mpsafenet=1. This commit does *not* fix the LOR, but enables us
to do so later. The missing piece is to turn the filter locking into a
leaf lock and will follow in a seperate (later) commit.
Suggested by: rwatson
A lot of work by: csjp
LOR IDs: 14 - 17 (not fixed yet)
Approved by: re (scottl)
Notes:
svn path=/stable/5/; revision=136098
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
> Protect sockaddr_union definitions with a protecting define. This allows
> to build kernels with FAST_IPSEC and PF. This is the least disruptive
> fix.
>
> PR: kern/71836
> Reviewed by: bms, various mailing lists
Approved by: re (scottl)
Notes:
svn path=/stable/5/; revision=135989
|
| |
|
|
|
|
|
|
|
|
|
| |
instead. This works just as well because it didn't check before for this
at all.
Pointed out by: ceri
Approved by: re (implicit)
Notes:
svn path=/stable/5/; revision=135582
|
| |
|
|
|
|
|
|
|
| |
kernel compile option.
Approved by: re (scottl)
Notes:
svn path=/stable/5/; revision=135580
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move pf* init from SI_SUB_PSEUDO to SI_SUB_PROTO_IFATTACHDOMAIN where it
is save to call if_attachdomain from if_attach() (as done for if_loop.c).
We will now end up with a properly initialized if_afdata array and the nd6
callout will no longer try to deref a NULL pointer.
Still this is a temp workaround and the locking for if_afdata should be
revisited at a later point.
Requested by: rwatson
Discussed with and tested by: yongari (a while ago)
PR: kern/70393
Approved by: re (scottl)
Notes:
svn path=/stable/5/; revision=135521
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Break out altq_enable/disable from DIOC{START,STOP}ALTQ into seprate
functions that can be called from enable/disable pf as well. This
improves switching from non-altq ruleset to altq ruleset (and the other
way 'round) by a great deal and makes pfctl act like the user would
except it to.
PR: kern/71746
Tested by: Aurilien "beorn" Rougemont (PR submitter)
Approved by: re (scottl)
Notes:
svn path=/stable/5/; revision=135519
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One more round on the H/W supported checksum code: Fix NICs that can't do
the pseudo header. We really need the TCP packet length here. This happens
to end up in ip->ip_len in tcp_input.c, but here we should get it from the
len function variable instead.
Submitted by: yongari
Tested by: Nicolas Linard, yongari (sparc64 + hme)
Approved by: re (scottl)
Notes:
svn path=/stable/5/; revision=135390
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix securelevel handling for tables:
Loopback a fix from Cedric Berger:
Fix table add/replace commands with securelevel=2.
Reported by James J. Lippard.
and
Use securelevel_gt instead of reading global securelevel unprotected.
Approved by: re (kensmith)
Notes:
svn path=/stable/5/; revision=134484
|
| |
|
|
|
|
|
| |
found.
Notes:
svn path=/head/; revision=133872
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
have already done this, so I have styled the patch on their work:
1) introduce a ip_newid() static inline function that checks
the sysctl and then decides if it should return a sequential
or random IP ID.
2) named the sysctl net.inet.ip.random_id
3) IPv6 flow IDs and fragment IDs are now always random.
Flow IDs and frag IDs are significantly less common in the
IPv6 world (ie. rarely generated per-packet), so there should
be smaller performance concerns.
The sysctl defaults to 0 (sequential IP IDs).
Reviewed by: andre, silby, mlaier, ume
Based on: NetBSD
MFC after: 2 months
Notes:
svn path=/head/; revision=133720
|
| |
|
|
|
|
|
| |
the interface as IFF_NEEDSGIANT so if_start is run holding Giant.
Notes:
svn path=/head/; revision=133705
|
| |
|
|
|
|
|
|
| |
Add missing check for NULL in DIOCCHANGERULE. This prevents a crash
in certain rare cases.
Notes:
svn path=/head/; revision=133577
|
| |
|
|
|
|
|
|
|
|
|
|
| |
pf_cksum_fixup() was called without last argument from
normalization, also fixup checksum when random-id modifies ip_id.
This would previously lead to incorrect checksums for packets
modified by scrub random-id.
(Originally) Submitted by: yongari
Notes:
svn path=/head/; revision=133574
|
| |
|
|
|
|
|
|
|
|
| |
skip over interface addresses without IFA_ROUTE, fixes some issue
with pppd
PR: misc/69954
Notes:
svn path=/head/; revision=133573
|
| |
|
|
| |
Notes:
svn path=/head/; revision=133495
|
| |\
| |
| |
| |
| |
| |
| | |
which included commits to RCS files with non-trunk default branches.
Notes:
svn path=/head/; revision=133493
|
| | |
| |
| |
| |
| | |
Notes:
svn path=/vendor-sys/ngatm/dist/; revision=133492
svn path=/vendor-sys/ngatm/1.1/; revision=133494; tag=vendor/ngatm/1.1
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(that does not compile with !gcc). Moreover we get the benefit for all archs
that have a hand optimized in_cksum_skip().
Submitted by: yongari
Tested by: me (i386, extensivly), pf4freebsd ML (various)
Notes:
svn path=/head/; revision=133181
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Do not declare inline functions without body as this is useless in
general and generates a warning with GCC 3.4.x.
Glanced over by: dhartmei
Notes:
svn path=/head/; revision=132767
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
1st ifnet (ifnet) @/usr/src/sys/contrib/pf/net/pf_if.c:191
2nd pf task mtx (pf task mtx) @/usr/src/sys/contrib/pf/net/pf_if.c:197
Reported by: Pyun YongHyeon (a long time ago)
Notes:
svn path=/head/; revision=132567
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
calls further down the stack. If we find the cksum to be okay we pretend
that the hardware did all the work and hence keep the upper layers from
checking again.
Submitted by: Pyun YongHyeon
Notes:
svn path=/head/; revision=132566
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes checksum for some drivers with partial H/W ckcsum offloads.
Reported by: Simon 'corecode' Schubert, Devon H. O'Dell, hmp
Reviewed by: Pyun YongHyeon
Notes:
svn path=/head/; revision=132350
|
| | |
| |
| |
| |
| |
| |
| | |
Submitted by: rwatson
Notes:
svn path=/head/; revision=132321
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
MFC:
Fix by dhartmei@
change pf_route() loop detection: introduce a counter (number of times
a packet is routed already) in the mbuf tag, allow at most four times.
Fixes some legitimate cases broken by the previous change.
Reviewed by: dhartmei
Notes:
svn path=/head/; revision=132303
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
icmp_error() packets. While here retire PACKET_TAG_PF_GENERATED (which
served the same purpose) and use M_SKIP_FIREWALL in pf as well. This should
speed up things a bit as we get rid of the tag allocations.
Discussed with: juli
Notes:
svn path=/head/; revision=132280
|
| | |
| |
| |
| | |
Notes:
svn path=/head/; revision=132113
|
| | |
| |
| |
| |
| |
| |
| |
| | |
remove some superfluous assignments for .d_version/.d_flags in a cdevsw
structure initialisation that never sees the light of day in FreeBSD.
Notes:
svn path=/head/; revision=131974
|
| |\|
| |
| |
| |
| |
| |
| | |
which included commits to RCS files with non-trunk default branches.
Notes:
svn path=/head/; revision=131827
|