aboutsummaryrefslogtreecommitdiff
path: root/contrib/ipfilter
Commit message (Collapse)AuthorAgeFilesLines
* ipfilter: Remove remaining unused bitsCy Schubert2021-12-2025-11070/+0
| | | | | | | | | | | Remove the remaining unused source files. These were never used. This is the last of a three commit series to move ipfilter. Discussed with: glebius Reviewed by: glebius, kp (for #network) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D33510
* ipfilter: Move userland bits to sbinCy Schubert2021-12-20258-48580/+0
| | | | | | | | | | | | | | | | Through fixes and improvements our ipfilter sources have diverged enough to warrant move from contrib into sbin/ipf. Now that I'm planning on implementing MSS clamping as in iptables it makes more sense to move ipfilter to sbin. This is the second of three commits of the ipfilter move. Suggested by glebius on two occaions. Suggested by and discussed with: glebius Reviewed by: glebius, kp (for #network) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D33510
* ipfilter: MSN RPC proxy is not completeCy Schubert2021-12-161-328/+0
| | | | | | | The MSN RPC proxy is incomplete and does not do any address translation. Remove it. MFC after: 1 week
* ipfilter: ipf_dstlist is a kernel source fileCy Schubert2021-12-152-1411/+0
| | | | | | Remove duplicate ipf_dstlist.* files. They live in sys/. MFC after: 1 week
* ipfilter userland: Replace sprintf with range checking version (snprintf)Cy Schubert2021-12-1419-122/+127
| | | | MFC after: 1 week
* ipfilter: radix_ipf is a kernel source fileCy Schubert2021-12-142-1625/+0
| | | | | | Remove duplicate radix_ipf.* files. They live in sys/. MFC after: 1 week
* ippool: remove set-but-not-unused varsCy Schubert2021-12-112-15/+3
| | | | | | | Display of stats from a kernel core dump was never fully implemented. Remove the dangling vars and remove the documentation. MFC after: 3 days
* ipfcomp: remove set-but-not-unused varsCy Schubert2021-12-111-2/+0
| | | | MFC after: 3 days
* ipfilter printfieldhdr: remove set-but-not-unused varsCy Schubert2021-12-111-2/+1
| | | | MFC after: 3 days
* ipft_tx: remove set-but-not-unused varsCy Schubert2021-12-111-2/+0
| | | | MFC after: 3 days
* ipft_pc: remove set-but-not-unused varsCy Schubert2021-12-111-3/+0
| | | | MFC after: 3 days
* ipft_hx: remove set-but-not-unused varsCy Schubert2021-12-111-2/+0
| | | | MFC after: 3 days
* ipfilter(4): Fix a typo in an error messageGordon Bergling2021-12-041-1/+1
| | | | | | | | | - s/addresss/address/ This is a direct commit to contrib since the upstream is no longer active. MFC after: 3 days
* ipresend(1): Make the build slightly less broken.Allan Jude2021-11-221-0/+1
| | | | | | | X-NetApp-PR: 35 Sponsored by: NetApp, Inc. Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D27335
* Simplify the FreeBSD check using __FreeBSD__ compiler macro.Cy Schubert2021-02-095-5/+5
| | | | | | | | Rather than rely on __FreeBSD_version, defined in sys/param.h, use __FreeBSD__ defined by the compiler. Reported by: emaste MFC after: 1 week
* Simply FreeBSD check using __FreeBSD__ and remove OpenBSDCy Schubert2021-02-091-1/+1
| | | | MFC after: 1 week
* Simplify FreeBSD check.Cy Schubert2021-02-061-1/+1
| | | | MFC after: 1 week
* Simplify BSD macro tests.Cy Schubert2021-02-065-11/+4
| | | | | | All FreeBSD and NetBSD are BSD >= 199306 and have been for a long time. MFC after: 1 week
* Replace the redundant MENTAT macro with SOLARIS.Cy Schubert2021-02-022-27/+27
| | | | | | | MENTAT and SOLARIS are synonymous. Remove the extraneous duplicate macro. MFC after: 1 week
* Retire the K&R/STD C __P prototype declarations.Cy Schubert2021-02-0258-773/+773
| | | | | | | | | In the old days when K&R C and STD C were each in use a workaround (read hack) was required to allow the same code to work on each without modification. All C compilers support STD C. We can finally put the __P prototype to rest. MFC after: 1 week
* ipfilter: Retire pre-standard C support.Cy Schubert2021-01-2515-103/+4
| | | | | | | | All C compilers in 2021 support standard C and architectures that did not were retired long ago. Simplify by removing now redundant pre-standard C code. MFC after: 1 week
* Sync ippool.8 man page synopsis with reality and the rest of theCy Schubert2020-12-241-3/+3
| | | | | | man page.. MFC after: 3 days
* Remove a random equal sign from the example. It should not be there.Cy Schubert2020-10-271-1/+1
| | | | | | | | | | | It's a syntax error. PR: 210303 Reported by: leventelist at gmail.com MFC after: 3 days Notes: svn path=/head/; revision=367070
* Continued ipfilter #ifdef cleanup. The r343701 log entry contains aCy Schubert2020-10-271-1/+1
| | | | | | | | | complete description. MFC after: 3 days Notes: svn path=/head/; revision=367069
* ipfilter getifname ifdef cleanup.Cy Schubert2020-09-301-28/+1
| | | | | | | MFC after: 2 months Notes: svn path=/head/; revision=366286
* Resurrect ipfilter's getifname, replacing the stub with the realCy Schubert2020-09-301-11/+0
| | | | | | | | | function. MFC after: 2 months Notes: svn path=/head/; revision=366285
* Remove Linux and IRIX specific files.Cy Schubert2020-09-275-556/+0
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=366203
* Continuing the effort started in r343701, #ifdef cleanup, removeCy Schubert2020-09-271-1/+1
| | | | | | | | | never to be used again checks. MFC after: 1 week Notes: svn path=/head/; revision=366202
* Continued ipfilter #ifdef cleanup. The r343701 log entry contains aCy Schubert2020-08-051-30/+0
| | | | | | | | | complete description. MFC after: 1 week Notes: svn path=/head/; revision=363916
* Continued ipfilter #ifdef cleanup. The r343701 log entry contains aCy Schubert2020-07-297-181/+4
| | | | | | | | | complete description. MFC after: 1 week Notes: svn path=/head/; revision=363670
* Document the IPFILTER_PREDEFINED environment variable.Cy Schubert2020-07-231-0/+9
| | | | | | | | | PR: 248088 Reported by: joeb1@a1poweruser.com MFC after: 1 week Notes: svn path=/head/; revision=363453
* -4 and -6 only make sense with -i, -o, and -t.Cy Schubert2020-07-171-0/+9
| | | | | | | | PR: 247952 MFC after: 1 week Notes: svn path=/head/; revision=363283
* The output from usage() need not contain usage for -t when STATETOPCy Schubert2020-07-171-0/+2
| | | | | | | | | | is not compiled in. PR: 247952 MFC after: 1 week Notes: svn path=/head/; revision=363282
* Make ipfstat -t header generic when IPv4 and IPv6 output areCy Schubert2020-07-171-0/+3
| | | | | | | | | | displayed in the same display. PR: 247952 MFC after: 1 week Notes: svn path=/head/; revision=363281
* ipfstat -t defaults to IPv4 output. Make consistent with ipfstat -iCy Schubert2020-07-172-4/+5
| | | | | | | | | | | and ipfstat -o where without an argument IPv4 and IPv6 states are shown. Use -4 and -6 to limit the display to IPv4 or IPv6 respectively. PR: 247952 MFC after: 1 week Notes: svn path=/head/; revision=363280
* Historically ipfstat listings and stats only listed IPv4 or IPv6 output.Cy Schubert2020-07-172-18/+42
| | | | | | | | | | | | | | | ipfstat would list IPv4 outputs by default while -6 would produce IPv6 outputs. This commit combines the ipfstat -i and -o outputs into one listing of IPv4 and IPv6 rules. The -4 option lists only IPv4 rules (as the default before) while -6 continues to list only rules that affect IPv6. PR: 247952 Reported by: joeb1@a1poweruser.com MFC after: 1 week Notes: svn path=/head/; revision=363279
* fr_family (the protocol family) must be AF_INET or AF_INET6, as inCy Schubert2020-07-171-2/+2
| | | | | | | | | | | | | the kernel, not an arbitrary 4 or 6. This only affected printing ipfilter stats and rules from a kernel dump. (This is currently undocumented.) PR: 247952 MFC after: 1 week Notes: svn path=/head/; revision=363278
* Only use the use_inet6 variable when INET6 is a build option.Cy Schubert2020-07-171-2/+12
| | | | | | | | | | | This is a prerequisite to upcoming argument processing cleanups which will resolve consistency as was done with ippool previously. PR: 247952 MFC after: 1 week Notes: svn path=/head/; revision=363277
* Per-rule hit counts (-h) can be used with either -i (input) or -o (output)Cy Schubert2020-06-021-2/+1
| | | | | | | | | filter rule lists. MFC after: 3 days Notes: svn path=/head/; revision=361721
* ipfilter: remove duplicate definition of 'thishost'Kyle Evans2020-03-292-2/+1
| | | | | | | | | | | | thishost is already defined in lib/initparse.c; no need for this one. This fixes the ipfilter build with -fno-common. -fno-common will become the default in GCC10/LLVM11. MFC after: 3 days Notes: svn path=/head/; revision=359413
* As with ipf(8), give ippool(8) the ability to load IP pools from multipleCy Schubert2020-02-182-2/+6
| | | | | | | | | | | files. This allows for loading, during the same invocation of ippool, of multiple sources of input using multiple tools to concurrently maintain the files such as fail2ban, macro preprocessors, and manually. MFC after: 1 week Notes: svn path=/head/; revision=358064
* Fix a typo (upto --> up to) and reword to improve word flow.Cy Schubert2019-12-021-1/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=355300
* Implement the dynamic add (-A) and removal (-R) of ippool poolsCy Schubert2019-09-272-8/+27
| | | | | | | | | | | | | | | | | | from the command line. Prior to this the functionality was mostly there however since the pool type (-t) was not recognized by the -A and -R command options -- not recognized by getopt(). Additionally the code to implement the dynamic add and removal of pools didn't work. When dynamically adding (-A) a pool a type (-t) to specify if the pool is a tree or hash pool must be specified. When dynamically removing (-R) a pool, omitting -t will cause a search-and-destroy which will remove both types of pools matching the name given (-m). PR: 218433 MFC after: 1 week Notes: svn path=/head/; revision=352786
* The no resolve (OPT_NORESOLVE) does nothing. Additionally, it (-R)Cy Schubert2019-09-271-12/+3
| | | | | | | | | | | conflicts with the command option of the same name (also -R). Remove the superfluous and confusing non-global non-command -R option. PR: 218433 MFC after: 1 week Notes: svn path=/head/; revision=352785
* Sync with source:Cy Schubert2019-09-271-5/+2
| | | | | | | | | | | | | | Only a role of "ipf" is currentlysupported as the other documented (and undocumented) roles are #ifdef'd out. The plan is to complete ippool(8) as it is even in its current state a powerful feature/tool. PR: 218433 MFC after: 1 month Notes: svn path=/head/; revision=352784
* Fix a typo.Cy Schubert2019-09-271-1/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=352783
* Teach the ippool parser about address families. This is a precursorCy Schubert2019-09-261-0/+16
| | | | | | | | | | to implementing IPv6 support within ippool which requires reworking radix_ipf.c. MFC after: 1 month Notes: svn path=/head/; revision=352738
* Fix a typo.Cy Schubert2019-06-281-1/+1
| | | | | | | | | PR: 238816 MFC after: 1 week X-MFC with: r349503 Notes: svn path=/head/; revision=349504
* Document the -B, binary logfile, and the -C config file options.Cy Schubert2019-06-281-1/+11
| | | | | | | | | | Reference the ipmon.5 man page and ipmon.conf. PR: 238816 MFC after: 1 week Notes: svn path=/head/; revision=349503
* Return a return code scripts might expect. I missed this whileCy Schubert2019-06-271-1/+1
| | | | | | | | | | | | | reviewing and rewriting a patch in PR/238816. PR: 238816 Reported by: rgrimes@ Pointy hat to: cy@ MFC after: 1 week X-MFC with: r349450 Notes: svn path=/head/; revision=349451