Commit Graph

67 Commits

Author SHA1 Message Date
Darren Reed
8a377db272 Allow ipnat redirect rules to work for non-TCP/UDP packets.
PR:             70038
Submitted by:   fming@borderware.com
Reviewed by:    darrenr
Obtained from:  fming@borderware.com
2004-12-17 02:29:34 +00:00
Darren Reed
6de0f6c8b8 Using just m_pullup to get all of the interesting bits in packet into one
buffer doesn't work for ipv6 packets, so use m_defrag() here instead as an
easy drop-in replacement.

PR:	70399
2004-12-16 21:02:16 +00:00
Max Laier
d6a8d58875 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.

This will hopefully be MT5'ed in order to fix the problem for RELENG_5 in
forseeable future.

Suggested by:		rwatson
A lot of work by:	csjp (he'd be even more helpful w/o mentor-reviews ;)
Reviewed by:		rwatson, csjp
Tested by:		-pf, -ipfw, LINT, csjp and myself
MFC after:		3 days

LOR IDs:		14 - 17 (not fixed yet)
2004-09-29 04:54:33 +00:00
Andre Oppermann
5f56967319 From __FreeBSD_version 600001 on PFIL_HOOKS is permanently in the kernel and
doesn't require to include opt_pfil_hooks.h.
2004-08-27 20:01:08 +00:00
Darren Reed
781950a42f Clean up a bunch of white-space difference with IPFilter source as well as
remove some superfluous assignments for .d_version/.d_flags in a cdevsw
structure initialisation that never sees the light of day in FreeBSD.
2004-07-11 10:13:05 +00:00
Darren Reed
be134cb640 Mess from update & merge - don't release the ifnet lock twice, just once
and after we're finished with it.
2004-06-29 03:39:06 +00:00
Darren Reed
01dbed783b revert section of code that calls netisr_queue() to match v1.33 of this file 2004-06-22 05:20:30 +00:00
Darren Reed
5e9c7ec5dc #ifdef's for FreeBSD are wrong, causing too many variable declaractions to
disappear.
2004-06-22 05:16:29 +00:00
Darren Reed
27944d9422 one too many #endif's from the update broke the build 2004-06-22 02:44:06 +00:00
Darren Reed
7b807523f4 Update ipfilter from 3.4.31 -> 3.4.35. Some important changes:
* block packets that fail to create state table entries
* only allow non-fragmented packets to influence whether or not a logged
  packet is the same as the one logged before.
* correct the ICMP packet checksum fixing up when processing ICMP errors for NAT
* implement a maximum for the number of entries in the NAT table (NAT_TABLE_MAX
  and ipf_nattable_max)
* frsynclist() wasn't paying attention to all the places where interface
  names are, like it should.
* fix comparing ICMP packets with established TCP state where only 8 bytes
  of header are returned in the ICMP error.

MFC after:	1 week
2004-06-21 22:46:36 +00:00
Poul-Henning Kamp
89c9c53da0 Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
2004-06-16 09:47:26 +00:00
Darren Reed
578a650271 Recognise NOINET6 as an indication to not build IPv6 enabled source even
if FreeBSD header files, etc, support it.

Submitted by:	Sergey Mokryshev <mokr@mokr.net>
2004-06-08 23:52:22 +00:00
Warner Losh
f36cfd49ad Remove advertising clause from University of California Regent's
license, per letter dated July 22, 1999 and email from Peter Wemm,
Alan Cox and Robert Watson.

Approved by: core, peter, alc, rwatson
2004-04-07 20:46:16 +00:00
Poul-Henning Kamp
dc08ffec87 Device megapatch 4/6:
Introduce d_version field in struct cdevsw, this must always be
initialized to D_VERSION.

Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing
four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
2004-02-21 21:10:55 +00:00
Brooks Davis
bd59f56d42 Use parens more reasionably so we match the vendor code. This is part
of the if_xname change.

Submitted by:	darrenr
Approved by:	re (scottl)
2003-12-02 18:28:00 +00:00
Brooks Davis
9bf40ede4a Replace the if_name and if_unit members of struct ifnet with new members
if_xname, if_dname, and if_dunit. if_xname is the name of the interface
and if_dname/unit are the driver name and instance.

This change paves the way for interface renaming and enhanced pseudo
device creation and configuration symantics.

Approved By:	re (in principle)
Reviewed By:	njl, imp
Tested On:	i386, amd64, sparc64
Obtained From:	NetBSD (if_xname)
2003-10-31 18:32:15 +00:00
Hajimu UMEMOTO
11e6ffbea3 use ND_IFINFO(). 2003-10-17 20:20:14 +00:00
Sam Leffler
e547d9ace2 o remove extraneous include of <net/pfil.h>
o guard wrapper code against user-mode compilation

Sponsored by:	FreeBSD Foundation
2003-09-24 05:08:58 +00:00
Sam Leffler
3fe1b4f5df update to reflect PFIL_HOOKS api changes
Supported by:	FreeBSD Foundation
2003-09-23 17:55:04 +00:00
David E. O'Brien
152385d122 Explicitly declare 'int' parameters. 2003-04-21 16:27:46 +00:00
Jonathan Lemon
1cafed3941 Update netisr handling; Each SWI now registers its queue, and all queue
drain routines are done by swi_net, which allows for better queue control
at some future point.  Packets may also be directly dispatched to a netisr
instead of queued, this may be of interest at some installations, but
currently defaults to off.

Reviewed by: hsu, silby, jayanth, sam
Sponsored by: DARPA, NAI Labs
2003-03-04 23:19:55 +00:00
Poul-Henning Kamp
7ac40f5f59 Gigacommit to improve device-driver source compatibility between
branches:

Initialize struct cdevsw using C99 sparse initializtion and remove
all initializations to default values.

This patch is automatically generated and has been tested by compiling
LINT with all the fields in struct cdevsw in reverse order on alpha,
sparc64 and i386.

Approved by:    re(scottl)
2003-03-03 12:15:54 +00:00
Warner Losh
a163d034fa Back out M_* changes, per decision of the TRB.
Approved by: trb
2003-02-19 05:47:46 +00:00
Darren Reed
7ae7a6c4f7 fix bug in updating of interface pointers when resyncing state 2003-02-15 06:47:27 +00:00
Darren Reed
aeb497128e Commit import changed from vendor branch of ipfilter to -current head 2003-02-15 06:25:25 +00:00
Darren Reed
32c7da78f7 Commit import changed from vendor branch of ipfilter to -current head 2003-02-15 06:23:45 +00:00
Darren Reed
d2c988ba46 sometimes i hate it when you leave temp files in a directory you import from 2003-02-15 06:21:14 +00:00
Darren Reed
8732fffb9b This commit was generated by cvs2svn to compensate for changes in r110911,
which included commits to RCS files with non-trunk default branches.
2003-02-15 06:18:25 +00:00
Darren Reed
46e22717ef Import IPFilter 3.4.31 into -current 2003-02-15 06:18:25 +00:00
Alfred Perlstein
8deebb0160 Consolidate MIN/MAX macros into one place (param.h).
Submitted by: Hiten Pandya <hiten@unixdaemons.com>
2003-02-02 13:17:30 +00:00
Alfred Perlstein
44956c9863 Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
2003-01-21 08:56:16 +00:00
Jeffrey Hsu
b30a244c34 SMP locking for ifnet list. 2002-12-22 05:35:03 +00:00
Sam Leffler
5d84645305 Replace aux mbufs with packet tags:
o instead of a list of mbufs use a list of m_tag structures a la openbsd
o for netgraph et. al. extend the stock openbsd m_tag to include a 32-bit
  ABI/module number cookie
o for openbsd compatibility define a well-known cookie MTAG_ABI_COMPAT and
  use this in defining openbsd-compatible m_tag_find and m_tag_get routines
o rewrite KAME use of aux mbufs in terms of packet tags
o eliminate the most heavily used aux mbufs by adding an additional struct
  inpcb parameter to ip_output and ip6_output to allow the IPsec code to
  locate the security policy to apply to outbound packets
o bump __FreeBSD_version so code can be conditionalized
o fixup ipfilter's call to ip_output based on __FreeBSD_version

Reviewed by:	julian, luigi (silent), -arch, -net, darren
Approved by:	julian, silence from everyone else
Obtained from:	openbsd (mostly)
MFC after:	1 month
2002-10-16 01:54:46 +00:00
Darren Reed
ecae20848a Finally merge in the changes from ipfilter 3.4.29 to freebsd-current.
Main changes here are related to the ftp proxy and making that work better.
2002-08-28 13:41:36 +00:00
Darren Reed
4ba500330a Import IPfilter 3.4.29. Main purpose is to address ftp proxy problems. 2002-08-28 13:26:02 +00:00
Darren Reed
39cf61414c Import IPfilter 3.4.29. Main purpose is to address ftp proxy problems. 2002-08-28 13:26:01 +00:00
Archie Cobbs
7d151849d0 Don't use "NULL" when "0" is really meant.
But in this case, "-1" is really meant.

Reviewed by:	darrenr
2002-08-23 20:07:19 +00:00
Darren Reed
aafab58b58 Import IPFilter 3.4.28 2002-06-07 08:58:22 +00:00
Darren Reed
fde76f025d Commit changes that happened in IPFilter versions 3.4.27 - 3.4.28 2002-06-07 08:56:30 +00:00
Darren Reed
7df187a3ad Merge updates from 3.4.26 - 3.4.27. 2002-04-27 16:56:25 +00:00
Darren Reed
635ff71d68 Import version 3.4.27 2002-04-27 16:52:49 +00:00
Darren Reed
37d55dca34 bring in changes from 3.4.26. 2002-04-25 03:31:39 +00:00
Darren Reed
43ba65e60d Import IPFilter 3.4.26 kernel sources, including H.323 proxy.
Include the licence file for both IPFilter and the H.323 proxy (from QNX),
for convienence.
2002-04-25 03:23:53 +00:00
Darren Reed
39252e7612 This commit was generated by cvs2svn to compensate for changes in r95415,
which included commits to RCS files with non-trunk default branches.
2002-04-25 03:23:53 +00:00
Darren Reed
13114a18ac Import IPFilter 3.4.26 kernel sources, including H.323 proxy.
Include the licence file for both IPFilter and the H.323 proxy (from QNX),
for convienence.
2002-04-25 03:23:52 +00:00
Ruslan Ermilov
f791219e02 We don't need ip_ipsec_pxy.c in userland. 2002-03-26 13:42:09 +00:00
Darren Reed
40c407243f do not include the missing ip_h323_pxy.c 2002-03-19 15:14:18 +00:00
Darren Reed
b38f3fb061 fix conflicts (mostly damn rcs id's) generated by import 2002-03-19 11:44:16 +00:00
Darren Reed
b90bc1632d This file is being removed pending the all clear on its licence by someone
else.
2002-03-19 11:42:12 +00:00
Darren Reed
76531d9f8d Import IPFilter 3.4.25 (last version 3.4.20) 2002-03-19 11:30:23 +00:00