aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/libalias
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2svn to create tagrelease/7.0.0_cvscvs2svn2008-02-2419-19/+19
| | | | | | 'RELENG_7_0_0_RELEASE'. This commit was manufactured to restore the state of the 7.0-RELEASE image.
* o Kill EOLWS while I'm here.Maxim Konovalov2007-04-301-2/+2
| | | | Notes: svn path=/head/; revision=169149
* o Fix strtoul() error conditions check.Maxim Konovalov2007-04-301-1/+1
| | | | | | | | | PR: kern/108211 Submitted by: Yong Tang MFC after: 2 weeks Notes: svn path=/head/; revision=169148
* Prevent the usage of an uninitialized variable: do not acceptPaolo Pisati2007-04-071-0/+11
| | | | | | | | | | | | | StartMediaTx message before an OpnRcvChnAck message was received. Reviewed by: glebius Approved by: glebius (mentor) MFC after: 3 days Found with: Coverity Prevent(tm) CID: 498 Notes: svn path=/head/; revision=168459
* Silence Coverity about an unused variable.Paolo Pisati2007-04-071-1/+1
| | | | | | | | | | Reviewed by: glebius Approved by: glebius (mentor) MFC after: 3 days CID: 538 Notes: svn path=/head/; revision=168458
* Include string.h for non-kernel builds to get proper memcpy prototype.Alexander Kabaev2007-04-041-0/+1
| | | | Notes: svn path=/head/; revision=168346
* Include string.h for non-kernel builds to get proper strcpy, strlenAlexander Kabaev2007-04-041-0/+1
| | | | | | | prototypes. Notes: svn path=/head/; revision=168344
* Do not assign result of (char *) cast to u_char * variable.Alexander Kabaev2007-04-041-1/+1
| | | | Notes: svn path=/head/; revision=168342
* o made in kernel libalias mpsafePaolo Pisati2006-12-156-94/+327
| | | | | | | | | | | o fixed a comment o made in kernel libalias a bit less verbose (disabled automatic logging everytime a new link is added or deleted) Approved by: glebius (mentor) Notes: svn path=/head/; revision=165243
* Make libalias.conf parsing a bit smarter.Paolo Pisati2006-12-011-10/+18
| | | | | | | | | | | This closes PR kern/106112. While here, add mbuf's #includes i forgot in the previous commit. Approved by: gleb Notes: svn path=/head/; revision=164798
* Remove m_megapullup from ng_nat and put it under libalias.Paolo Pisati2006-12-012-0/+41
| | | | | | | Approved by: gleb Notes: svn path=/head/; revision=164797
* Fix TFTP NAT support by making sure the appropriate fingerprinting checksJoe Marcus Clarke2006-11-071-2/+4
| | | | | | | | | are done. Reviewed by: piso Notes: svn path=/head/; revision=164075
* Merge the rest of my changes.Ruslan Ermilov2006-10-111-13/+26
| | | | Notes: svn path=/head/; revision=163224
* Various mdoc and grammar fixes.Paolo Pisati2006-10-081-279/+282
| | | | | | | | Approved by: glebius Reviewed by: glebius, ru Notes: svn path=/head/; revision=163127
* Compilation.Paolo Pisati2006-09-271-1/+1
| | | | Notes: svn path=/head/; revision=162685
* Summer of Code 2005: improve libalias - part 1 of 2Paolo Pisati2006-09-2618-266/+2052
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the first part of my previous Summer of Code work, we get: -made libalias modular: -support for 'particular' protocols (like ftp/irc/etcetc) is no more hardcoded inside libalias, but it's available through external modules loadable at runtime -modules are available both in kernel (/boot/kernel/alias_*.ko) and user land (/lib/libalias_*) -protocols/applications modularized are: cuseeme, ftp, irc, nbt, pptp, skinny and smedia -added logging support for kernel side -cleanup After a buildworld, do a 'mergemaster -i' to install the file libalias.conf in /etc or manually copy it. During startup (and after every HUP signal) user land applications running the new libalias will try to read a file in /etc called libalias.conf: that file contains the list of modules to load. User land applications affected by this commit are ppp and natd: if libalias.conf is present in /etc you won't notice any difference. The only kernel land bit affected by this commit is ng_nat: if you are using ng_nat, and it doesn't correctly handle ftp/irc/etcetc sessions anymore, remember to kldload the correspondent module (i.e. kldload alias_ftp). General information and details about the inner working are available in the libalias man page under the section 'MODULAR ARCHITECTURE (AND ipfw(4) SUPPORT)'. NOTA BENE: this commit affects _ONLY_ libalias, ipfw in-kernel nat support will be part of the next libalias-related commit. Approved by: glebius Reviewed by: glebius, ru Notes: svn path=/head/; revision=162674
* o Kill BUGS section as it is not valid since rev. 1.4 alias_pptp.c.Maxim Konovalov2006-07-041-6/+1
| | | | | | | | Spotted by: ru.unix.bsd activists MFC after: 1 week Notes: svn path=/head/; revision=160097
* Fix prototype.Ruslan Ermilov2005-11-241-1/+1
| | | | Notes: svn path=/head/; revision=152767
* Use monotonic 'time_uptime' instead of 'time_second' as timebaseAndre Oppermann2005-09-191-3/+3
| | | | | | | for timeouts. Notes: svn path=/head/; revision=150350
* Libalias incorrectly applies proxy rules to the global divertPoul-Henning Kamp2005-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) Notes: svn path=/head/; revision=147636
* Disable checksum processing in LibAlias, when it works as aGleb Smirnoff2005-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) Notes: svn path=/head/; revision=147623
* - Don't use legacy function in a non-legacy one. This gives usGleb Smirnoff2005-06-201-4/+3
| | | | | | | | | | possibility to compile libalias without legacy support. - Use correct way to mark variable as unused. Approved by: re (dwhite) Notes: svn path=/head/; revision=147501
* Add a workaround for 64-bit archs: store unsigned long return value inGleb Smirnoff2005-05-061-3/+6
| | | | | | | temporary variable, check it and then cast to in_addr_t. Notes: svn path=/head/; revision=145963
* s/DEBUG/LIBALIAS_DEBUG/, since DEBUG is defined in LINT andGleb Smirnoff2005-05-066-49/+49
| | | | | | | not supported for kernel build. Notes: svn path=/head/; revision=145961
* More bits for kernel version:Gleb Smirnoff2005-05-051-1/+107
| | | | | | | | - copy inet_aton() from libc - disable getservbyname() lookup and accept only numeric port Notes: svn path=/head/; revision=145933
* Always include alias.h before alias_local.hGleb Smirnoff2005-05-059-8/+11
| | | | Notes: svn path=/head/; revision=145932
* When used in kernel define NO_FW_PUNCH, NO_LOGGING, NO_USE_SOCKETS.Gleb Smirnoff2005-05-051-0/+9
| | | | Notes: svn path=/head/; revision=145931
* Fix argument order for bcopy() in last commit.Gleb Smirnoff2005-05-051-1/+1
| | | | | | | | Noticed by: njl Pointy hat to: glebius Notes: svn path=/head/; revision=145930
* Use bcopy() instead of memmove().Gleb Smirnoff2005-05-051-1/+1
| | | | Notes: svn path=/head/; revision=145929
* Hide fflush(3) under ifdef DEBUG.Gleb Smirnoff2005-05-051-2/+2
| | | | Notes: svn path=/head/; revision=145928
* Things required to build libalias as kernel module:Gleb Smirnoff2005-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 Notes: svn path=/head/; revision=145927
* Add NO_USE_SOCKETS knob, which cuts off functionality socket binding.Gleb Smirnoff2005-05-052-8/+18
| | | | Notes: svn path=/head/; revision=145926
* Add NO_LOGGING knob, which cuts off functionality of debug logging to a file.Gleb Smirnoff2005-05-053-15/+19
| | | | Notes: svn path=/head/; revision=145925
* Play with includes so that libalias can be compiled both as userlandGleb Smirnoff2005-05-0512-33/+159
| | | | | | | library and kernel module. Notes: svn path=/head/; revision=145921
* Cleanup IPFW2 ifdefs.Gleb Smirnoff2005-05-041-58/+0
| | | | Notes: svn path=/head/; revision=145868
* Makefile is not needed here.Gleb Smirnoff2005-05-041-14/+0
| | | | Notes: svn path=/head/; revision=145867
* natd core dumps when -reverse switch is used because of a bug inPoul-Henning Kamp2005-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 Notes: svn path=/head/; revision=144666
* Fix a problem in the Skinny ALG where a specially crafted packet could causeJoe Marcus Clarke2005-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 Notes: svn path=/head/; revision=143083
* Sort sections.Ruslan Ermilov2005-01-201-5/+5
| | | | Notes: svn path=/head/; revision=140505
* include "alias.h", not <alias.h>Brian Somers2005-01-101-1/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=139976
* For variables that are only checked with defined(), don't provideRuslan Ermilov2004-10-241-1/+1
| | | | | | | any fake value. Notes: svn path=/head/; revision=136910
* Fix outgoing ICMP on global instance.Poul-Henning Kamp2004-08-141-5/+5
| | | | Notes: svn path=/head/; revision=133719
* Fix Skinny and PPTP NAT'ing after the introduction of the {ip,tcp,udp}_nextJoe Marcus Clarke2004-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 Notes: svn path=/head/; revision=133121
* Push WARNS back up to 6, but define NO_WERROR; I want the warts out in theDag-Erling Smørgrav2004-07-061-1/+2
| | | | | | | open where people can see them and hopefully fix them. Notes: svn path=/head/; revision=131700
* Introduce inline {ip,udp,tcp}_next() functions which take a pointer to anDag-Erling Smørgrav2004-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. Notes: svn path=/head/; revision=131699
* Rewrite twowords() to access its argument through a char pointer and notDag-Erling Smørgrav2004-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. Notes: svn path=/head/; revision=131693
* Temporarily lower WARNS to 3 while I figure out the alignment issues onDag-Erling Smørgrav2004-07-061-1/+1
| | | | | | | alpha. Notes: svn path=/head/; revision=131690
* Make libalias WARNS?=6-clean. This mostly involves renaming variablesDag-Erling Smørgrav2004-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. Notes: svn path=/head/; revision=131614
* Parenthesize return values.Dag-Erling Smørgrav2004-07-056-120/+120
| | | | Notes: svn path=/head/; revision=131613
* Mechanical whitespace cleanup.Dag-Erling Smørgrav2004-07-056-126/+126
| | | | Notes: svn path=/head/; revision=131612