summaryrefslogtreecommitdiffstats
path: root/sys/netinet/libalias
Commit message (Collapse)AuthorAgeFilesLines
* Libalias incorrectly applies proxy rules to the global divertphk2005-06-271-1/+5
| | | | | | | socket: it should only look for existing translation entries, not create new ones (no matter how it got the idea). Approved by: re(scottl)
* Disable checksum processing in LibAlias, when it works as aglebius2005-06-277-12/+50
| | | | | | | | | | | | | | | kernel module. LibAlias is not aware about checksum offloading, so the caller should provide checksum calculation. (The only current consumer is ng_nat(4)). When TCP packet internals has been changed and it requires checksum recalculation, a cookie is set in th_x2 field of TCP packet, to inform caller that it needs to recalculate checksum. This ugly hack would be removed when LibAlias is made more kernel friendly. Incremental checksum updates are left as is, since they don't conflict with offloading. Approved by: re (scottl)
* - Don't use legacy function in a non-legacy one. This gives usglebius2005-06-201-4/+3
| | | | | | | possibility to compile libalias without legacy support. - Use correct way to mark variable as unused. Approved by: re (dwhite)
* Add a workaround for 64-bit archs: store unsigned long return value inglebius2005-05-061-3/+6
| | | | temporary variable, check it and then cast to in_addr_t.
* s/DEBUG/LIBALIAS_DEBUG/, since DEBUG is defined in LINT andglebius2005-05-066-49/+49
| | | | not supported for kernel build.
* More bits for kernel version:glebius2005-05-051-1/+107
| | | | | - copy inet_aton() from libc - disable getservbyname() lookup and accept only numeric port
* Always include alias.h before alias_local.hglebius2005-05-059-8/+11
|
* When used in kernel define NO_FW_PUNCH, NO_LOGGING, NO_USE_SOCKETS.glebius2005-05-051-0/+9
|
* Fix argument order for bcopy() in last commit.glebius2005-05-051-1/+1
| | | | | Noticed by: njl Pointy hat to: glebius
* Use bcopy() instead of memmove().glebius2005-05-051-1/+1
|
* Hide fflush(3) under ifdef DEBUG.glebius2005-05-051-2/+2
|
* Things required to build libalias as kernel module:glebius2005-05-052-0/+74
| | | | | | | | | | | - kernel module declarations and handler. - macros to map malloc(3) calls to malloc(9) ones. - malloc(9) declarations. - call finishoff() from module handler MOD_UNLOAD case instead of atexit(3). - use panic(9) instead of abort(3) - take time from time_second instead of gettimeofday(2) - define INADDR_NONE
* Add NO_USE_SOCKETS knob, which cuts off functionality socket binding.glebius2005-05-052-8/+18
|
* Add NO_LOGGING knob, which cuts off functionality of debug logging to a file.glebius2005-05-053-15/+19
|
* Play with includes so that libalias can be compiled both as userlandglebius2005-05-0512-33/+159
| | | | library and kernel module.
* Cleanup IPFW2 ifdefs.glebius2005-05-041-58/+0
|
* Makefile is not needed here.glebius2005-05-041-14/+0
|
* natd core dumps when -reverse switch is used because of a bug inphk2005-04-051-2/+2
| | | | | | | | | | | | | | | | | | | | | libalias. In /usr/src/lib/libalias/alias.c, the functions LibAliasIn and LibAliasOutTry call the legacy PacketAliasIn/PacketAliasOut instead of LibAliasIn/LibAliasOut when the PKT_ALIAS_REVERSE option is set. In this case, the context variable "la" gets lost because the legacy compatibility routines expect "la" to be global. This was obviously an oversight when rewriting the PacketAlias* functions to the LibAlias* functions. The fix (as shown in the patch below) is to remove the legacy subroutine calls and replace with the new ones using the "la" struct as the first arg. Submitted by: Gil Kloepfer <fgil@kloepfer.org> Confirmed by: <nicolai@catpipe.net> PR: 76839 MFC after: 3 days
* Fix a problem in the Skinny ALG where a specially crafted packet could causemarcus2005-03-031-4/+4
| | | | | | | | | a libalias application (e.g. natd, ppp, etc.) to crash. Note: Skinny support is not enabled in natd or ppp by default. Approved by: secteam (nectar) MFC after: 1 day Secuiryt: This fixes a remote DoS exploit
* Sort sections.ru2005-01-201-5/+5
|
* include "alias.h", not <alias.h>brian2005-01-101-1/+1
| | | | MFC after: 3 days
* For variables that are only checked with defined(), don't provideru2004-10-241-1/+1
| | | | any fake value.
* Fix outgoing ICMP on global instance.phk2004-08-141-5/+5
|
* Fix Skinny and PPTP NAT'ing after the introduction of the {ip,tcp,udp}_nextmarcus2004-08-042-2/+2
| | | | | | | | | functions. Basically, the ip_next() function was used to get the PPTP and Skinny headers when tcp_next() should have been used instead. Symptoms of this included a segfault in natd when trying to process a PPTP or Skinny packet. Approved by: des
* Push WARNS back up to 6, but define NO_WERROR; I want the warts out in thedes2004-07-061-1/+2
| | | | open where people can see them and hopefully fix them.
* Introduce inline {ip,udp,tcp}_next() functions which take a pointer to andes2004-07-0612-52/+77
| | | | | | | {ip,udp,tcp} header and return a void * pointing to the payload (i.e. the first byte past the end of the header and any required padding). Use them consistently throughout libalias to a) reduce code duplication, b) improve code legibility, c) get rid of a bunch of alignment warnings.
* Rewrite twowords() to access its argument through a char pointer and notdes2004-07-061-3/+10
| | | | | | a short pointer. The previous implementation seems to be in a gray zone of the C standard, and GCC generates incorrect code for it at -O2 or higher on some platforms.
* Temporarily lower WARNS to 3 while I figure out the alignment issues ondes2004-07-061-1/+1
| | | | alpha.
* Make libalias WARNS?=6-clean. This mostly involves renaming variablesdes2004-07-0515-676/+721
| | | | | | | | | named link, foo_link or link_foo to lnk, foo_lnk or lnk_foo, fixing signed / unsigned comparisons, and shoving unused function arguments under the carpet. I was hoping WARNS?=6 might reveal more serious problems, and perhaps the source of the -O2 breakage, but found no smoking gun.
* Parenthesize return values.des2004-07-056-120/+120
|
* Mechanical whitespace cleanup.des2004-07-056-126/+126
|
* Add LibAliasOutTry() which checks a packet for a hit in the tables, butphk2004-07-042-16/+29
| | | | does not create a new entry if none is found.
* Mechanically kill hard sentence breaks.ru2004-07-021-7/+7
|
* Bumped document date.ru2004-07-011-5/+7
| | | | | Fixed markup. Fixed examples to match the new API.
* Unbreak natd.deischen2004-04-021-0/+1
| | | | Reported and submitted by: Sean McNeil (sean at mcneil.com)
* Raise WARNS level to 2.des2004-03-311-0/+1
|
* Deal with aliasing warnings.des2004-03-314-181/+63
| | | | | Reviewed by: ru Approved by: silence on the lists
* Run through indent(1) so I can read the code without getting a headache.des2004-03-1614-5317/+5233
| | | | | The result isn't quite knf, but it's knfer than the original, and far more consistent.
* Mostly mechanical rework of libalias:phk2004-01-1716-737/+1071
| | | | | | | | | | | | Makes it possible to have multiple packet aliasing instances in a single process by moving all static and global variables into an instance structure called "struct libalias". Redefine a new API based on s/PacketAlias/LibAlias/g Add new "instance" argument to all functions in the new API. Implement old API in terms of the new API.
* Grrr...add the Skinny alias code forgotten in the last commit.marcus2003-09-231-0/+338
|
* Add Cisco Skinny Station protocol support to libalias, natd, and ppp.marcus2003-09-236-1/+30
| | | | | | | | | | | | | | | Skinny is the protocol used by Cisco IP phones to talk to Cisco Call Managers. With this code, one can use a Cisco IP phone behind a FreeBSD NAT gateway. Currently, having the Call Manager behind the NAT gateway is not supported. More information on enabling Skinny support in libalias, natd, and ppp can be found in those applications' manpages. PR: 55843 Reviewed by: ru Approved by: ru MFC after: 30 days
* Fixed -Wpointer-arith warning.ru2003-09-091-1/+1
| | | | | Submitted by: Stefan Farfeleder PR: bin/56653
* mdoc(7): Use the new feature of the .In macro.ru2003-09-081-2/+2
|
* style.Makefile(5)obrien2003-08-181-1/+1
|
* Stage 3 of dynamic root support. Make all the libraries needed to rungordon2003-08-171-0/+1
| | | | | | binaries in /bin and /sbin installed in /lib. Only the versioned files reside in /lib, the .so symlink continues to live /usr/lib so the toolchain doesn't need to be modified.
* In the PKT_ALIAS_PROXY_ONLY mode, make sure to preserve theru2003-06-131-0/+4
| | | | | | original source IP address, as promised in the manual page. Spotted by: Vaclav Petricek
* Removed a couple of .Xo/.Xc that are leftovers of the "ninth-argumentru2003-06-131-9/+3
| | | | limit" mdoc(7) atavism.
* Clarify that original address and port when doing transparent proxyingru2003-06-131-5/+5
| | | | are _destination_ address and port.
* Added myself to the AUTHORS section.ru2003-06-131-0/+2
|
* The .Fn functioncharnier2003-06-081-4/+6
|
OpenPOWER on IntegriCloud