1*bc4097aaSchristos# 2*bc4097aaSchristos# NOTE: Quite a few patches and suggestions come from other sources, to whom 3*bc4097aaSchristos# I'm greatly indebted, even if no names are mentioned. 4*bc4097aaSchristos# 5*bc4097aaSchristos# Thanks to the Coombs Computing Unit at the ANU for their continued support 6*bc4097aaSchristos# in providing a very available location for the IP Filter home page and 7*bc4097aaSchristos# distribution center. 8*bc4097aaSchristos# 9*bc4097aaSchristos# Thanks also to all those who have contributed patches and other code, 10*bc4097aaSchristos# and especially those who have found the time to port IP Filter to new 11*bc4097aaSchristos# platforms. 12*bc4097aaSchristos# 13*bc4097aaSchristos5.1 - RELEASED - 9 May 2010 14*bc4097aaSchristos 15*bc4097aaSchristos* See WhatsNew50.txt 16*bc4097aaSchristos 17*bc4097aaSchristos4.1 - RELEASED - 12 February 2004 18*bc4097aaSchristos 19*bc4097aaSchristos4.0-BETA1 20 August 2003 20*bc4097aaSchristos 21*bc4097aaSchristossupport 0/32 and 0/0 on the RHS in redirect rules 22*bc4097aaSchristos 23*bc4097aaSchristoswhere LHS and RHS netmasks are the same size for redirect, do 1:1 mapping 24*bc4097aaSchristosfor bimap rules. 25*bc4097aaSchristos 26*bc4097aaSchristosallow NAT rule to match 'all' interfaces with * as interface name 27*bc4097aaSchristos 28*bc4097aaSchristosdo mapping of ICMP sequence id#'s in pings 29*bc4097aaSchristos 30*bc4097aaSchristosallow default age for NAT entries to be set per NAT rule 31*bc4097aaSchristos 32*bc4097aaSchristosprovide round robin selection of destination addresses for redirect 33*bc4097aaSchristos 34*bc4097aaSchristosipmon can load a configuration file with instructions on actions 35*bc4097aaSchristosto take when a matching log entry is received 36*bc4097aaSchristos 37*bc4097aaSchristosnow requires pfil to work on Solaris & HP-UX 38*bc4097aaSchristos 39*bc4097aaSchristossupports mapping outbound connections to a specific address/port 40*bc4097aaSchristos 41*bc4097aaSchristossupport toggling of logging per ipfilter 'device' 42*bc4097aaSchristos 43*bc4097aaSchristosuse queues to expire data rather than lists 44*bc4097aaSchristos 45*bc4097aaSchristosadd MSN RPC proxy 46*bc4097aaSchristos 47*bc4097aaSchristosadd IRC proxy 48*bc4097aaSchristos 49*bc4097aaSchristossupport rules with dynamic ip addresses 50*bc4097aaSchristos 51*bc4097aaSchristosadd ability to define a pool of addresses & networks which can then 52*bc4097aaSchristosbe placed in a single rule 53*bc4097aaSchristos 54*bc4097aaSchristossupport passing entire packet back to user program for authentication 55*bc4097aaSchristos 56*bc4097aaSchristossupport master/slave for state information sharing 57*bc4097aaSchristos 58*bc4097aaSchristosreorganise generic code into a lib directory and make libipf.a 59*bc4097aaSchristos 60*bc4097aaSchristosuser programs enforce version matching with the kernel 61*bc4097aaSchristos 62*bc4097aaSchristossupports window scaling if seen at TCP session setup 63*bc4097aaSchristos 64*bc4097aaSchristosgenerates C code from filter rules to compile in or load as native 65*bc4097aaSchristosmachine code. 66*bc4097aaSchristos 67*bc4097aaSchristossupports loading rules comprised of BPF bytecode statements 68*bc4097aaSchristos 69*bc4097aaSchristosHP-UX 11 port completed 70*bc4097aaSchristos 71*bc4097aaSchristosand packets-per-second filtering 72*bc4097aaSchristos 73*bc4097aaSchristosadd numerical tags to rules for filtering and display in ipmon output 74*bc4097aaSchristos 75*bc4097aaSchristos3.4.4 23/05/2000 - Released 76*bc4097aaSchristos 77*bc4097aaSchristosdon't add TCP state if it is an RST packet and (attempt) to send out 78*bc4097aaSchristosRST/ICMP packets in a manner that bypasses IP Filter. 79*bc4097aaSchristos 80*bc4097aaSchristosadd patch to work with 4.0_STABLE delayed checksums 81*bc4097aaSchristos 82*bc4097aaSchristos3.4.3 20/05/2000 - Released 83*bc4097aaSchristos 84*bc4097aaSchristosfix ipmon -F 85*bc4097aaSchristos 86*bc4097aaSchristosdon't truncate IPv6 packets on Solaris 87*bc4097aaSchristos 88*bc4097aaSchristosfix keep state for ICMP ECHO 89*bc4097aaSchristos 90*bc4097aaSchristosadd some NAT stats and use def_nat_age rather than DEF_NAT_AGE 91*bc4097aaSchristos 92*bc4097aaSchristosdon't make ftp proxy drop packets 93*bc4097aaSchristos 94*bc4097aaSchristosuse MCLISREFERENCED() in tandem with M_EXT to check if IP fields need to be 95*bc4097aaSchristosswapped back. 96*bc4097aaSchristos 97*bc4097aaSchristosfix up RST generation for non-Solaris 98*bc4097aaSchristos 99*bc4097aaSchristosget "short" flag right for IPv6 100*bc4097aaSchristos 101*bc4097aaSchristos3.4.2 - 10/5/2000 - Released 102*bc4097aaSchristos 103*bc4097aaSchristosFix bug in dealing with "hlen == 1 and opt > 1" - Itojun 104*bc4097aaSchristos 105*bc4097aaSchristosignore previous NAT mappings for 0/0 and 0/32 rules 106*bc4097aaSchristos 107*bc4097aaSchristosbring in a completely new ftp proxy 108*bc4097aaSchristos 109*bc4097aaSchristosallow NAT to cause packets to be dropped. 110*bc4097aaSchristos 111*bc4097aaSchristosadd NetBSD callout support for 1.4-current 112*bc4097aaSchristos 113*bc4097aaSchristos3.4.1 - 30/4/2000 - Released 114*bc4097aaSchristos 115*bc4097aaSchristosadd ratoui() and fix parsing of group numbers to allow 0 - UINT_MAX 116*bc4097aaSchristos 117*bc4097aaSchristosdon't include opt_inet6.h for FreeBSD if KLD_MODULE is defined 118*bc4097aaSchristos 119*bc4097aaSchristosSolaris must use copyin() for all types of ioctl() args 120*bc4097aaSchristos 121*bc4097aaSchristosfix up screen/tty when leaving "top mode" of ipfstat 122*bc4097aaSchristos 123*bc4097aaSchristoslinked list for maptable not setup correctly in nat_hostmap() 124*bc4097aaSchristos 125*bc4097aaSchristoscheck for maptable rather than nat_table[1] to see if malloc for maptable 126*bc4097aaSchristossucceeded in nat_init 127*bc4097aaSchristos 128*bc4097aaSchristosfix handling of map NAT rules with "from/to" host specs 129*bc4097aaSchristos 130*bc4097aaSchristosfix printout out of source address when using "from/to" with map rules 131*bc4097aaSchristos 132*bc4097aaSchristosconvert ip_len back to network byte order, not plen, for solaris as ip_len 133*bc4097aaSchristosmay have been changed by NAT and plen won't reflect this 134*bc4097aaSchristos 135*bc4097aaSchristos3.4 - 27/4/2000 - Released 136*bc4097aaSchristos 137*bc4097aaSchristossource address spoofing can be turned on (fr_chksrc) without using 138*bc4097aaSchristosfilter rules 139*bc4097aaSchristos 140*bc4097aaSchristosgroup numbers are now 32bits in size, up from 16bits 141*bc4097aaSchristos 142*bc4097aaSchristosIPv6 filtering available 143*bc4097aaSchristos 144*bc4097aaSchristosadd frank volf's state-top patches 145*bc4097aaSchristos 146*bc4097aaSchristosadd load splitting and round-robin attribute to redirect rules 147*bc4097aaSchristos 148*bc4097aaSchristosFreeBSD-4.0 support (including KLD) 149*bc4097aaSchristos 150*bc4097aaSchristosadd top-style operation mode for ipfstat (-t) 151*bc4097aaSchristos 152*bc4097aaSchristosadd save/restore of IP Filter state/NAT information (ipfs) 153*bc4097aaSchristos 154*bc4097aaSchristosfurther ftp proxy security checks 155*bc4097aaSchristos 156*bc4097aaSchristossupport for adding and removing proxies at runtime 157*bc4097aaSchristos 158*bc4097aaSchristos3.3.13 26/04/2000 - Released 159*bc4097aaSchristos 160*bc4097aaSchristosFix parsing of "range" with "portmap" 161*bc4097aaSchristos 162*bc4097aaSchristosRelax checking of ftp replies, slightly. 163*bc4097aaSchristos 164*bc4097aaSchristosFix NAT timeouts for ICMP packets 165*bc4097aaSchristos 166*bc4097aaSchristosSunOS4 patches for ICMP redirects from Jurgen Keil (jk@tools.de) 167*bc4097aaSchristos 168*bc4097aaSchristos3.3.12 16/03/2000 - Released 169*bc4097aaSchristos 170*bc4097aaSchristostighten up ftp proxy behaviour. sigh. yuck. hate. 171*bc4097aaSchristos 172*bc4097aaSchristosfix bug in range check for NAT where the last IP# was not used. 173*bc4097aaSchristos 174*bc4097aaSchristosfix problem with icmp codes > 127 in filter rules caused bad things to 175*bc4097aaSchristoshappen and in particular, where #18 caused the rule to be printed 176*bc4097aaSchristoserroneously. 177*bc4097aaSchristos 178*bc4097aaSchristosfix bug with the spl level not being reset when returning EIO from 179*bc4097aaSchristosiplioctl due to ipfilter not being initialized yet. 180*bc4097aaSchristos 181*bc4097aaSchristos3.3.11 04/03/2000 - Released 182*bc4097aaSchristos 183*bc4097aaSchristosmake "or-block" work with lines that start with "log" 184*bc4097aaSchristos 185*bc4097aaSchristosfix up parsing and printing of rules with syslog levels in them 186*bc4097aaSchristos 187*bc4097aaSchristosfix from Cy Schubert for calling of apr_fini only if non-null 188*bc4097aaSchristos 189*bc4097aaSchristos 190*bc4097aaSchristos3.3.10 24/02/2000 - Released 191*bc4097aaSchristos 192*bc4097aaSchristos* fix back from guido for state tracking interfaces 193*bc4097aaSchristos 194*bc4097aaSchristos* update for NetBSD pfil interface changes 195*bc4097aaSchristos 196*bc4097aaSchristos* if attaching fails and we can abort, then cleanup when doing so. 197*bc4097aaSchristos 198*bc4097aaSchristosjulian@computer.org: 199*bc4097aaSchristos* solaris.c (fr_precheck): After calling freemsg on mt, set it point to *mp. 200*bc4097aaSchristos* ipf.c (packetlogon): use flag to store the return value from get_flags. 201*bc4097aaSchristos* ipmon.c (init_tabs): General cleanup so we do not have to cast 202*bc4097aaSchristos an int s->s_port to u_int port and try to check if the u_int port 203*bc4097aaSchristos is less than zero. 204*bc4097aaSchristos 205*bc4097aaSchristos3.3.9 15/02/2000 - Released 206*bc4097aaSchristos 207*bc4097aaSchristosfix scheduling of bad locking in fr_addstate() used when we attach onto 208*bc4097aaSchristosa filter rule. 209*bc4097aaSchristos 210*bc4097aaSchristosfix up ip_statesync() with storing interface names in ipstate_t 211*bc4097aaSchristos 212*bc4097aaSchristosfix fr_running for LKM's - Eugene Polovnikov 213*bc4097aaSchristos 214*bc4097aaSchristosjunk using pullupmsg() for solaris - it's next to useless for what we 215*bc4097aaSchristosneed to do here anyway - and implement what we require. 216*bc4097aaSchristos 217*bc4097aaSchristosdon't call fr_delstate() in fr_checkstate(), when compiled for a user 218*bc4097aaSchristosprogram, early but when we're finished with it (got fr & pass) 219*bc4097aaSchristos 220*bc4097aaSchristosipnat(5) fix from Guido 221*bc4097aaSchristos 222*bc4097aaSchristoson solaris2, copy message and use that with filter if there is another 223*bc4097aaSchristoscopy if it being used (db_ref > 1). bad for performance, but better 224*bc4097aaSchristosthan causing a crash. 225*bc4097aaSchristos 226*bc4097aaSchristospatch for solaris8-fcs compile from Casper Dik 227*bc4097aaSchristos 228*bc4097aaSchristos3.3.8 01/02/2000 - Released 229*bc4097aaSchristos 230*bc4097aaSchristosfix state handling of SYN packets. 231*bc4097aaSchristos 232*bc4097aaSchristosadd parsing recognition of extra icmp types/codes and fix handling of 233*bc4097aaSchristosicmp time stamps and mask requests - Frank volf 234*bc4097aaSchristos 235*bc4097aaSchristos3.3.7 25/01/2000 - Released 236*bc4097aaSchristos 237*bc4097aaSchristossync on state information as well as NAT information when required 238*bc4097aaSchristos 239*bc4097aaSchristosrecord nat protocol in all nat log records 240*bc4097aaSchristos 241*bc4097aaSchristosdon't reuse the IP# from an active NAT session if the IP# in the rule 242*bc4097aaSchristoshas changed dynamically. 243*bc4097aaSchristos 244*bc4097aaSchristoslookup the protocol for NAT log information in ipmon and pass that to 245*bc4097aaSchristosportname. 246*bc4097aaSchristos 247*bc4097aaSchristosfix the bug with changing the outbound interface of a packet where it 248*bc4097aaSchristoswould lead to a panic. 249*bc4097aaSchristos 250*bc4097aaSchristosuse fr_running instead of ipl_inited. (sysctl name change on freebsd) 251*bc4097aaSchristos 252*bc4097aaSchristosreturn EIO if someone attempts an ioctl on state/nat if ipfilter is not 253*bc4097aaSchristosenabled. 254*bc4097aaSchristos 255*bc4097aaSchristosfix rule insertion bug 256*bc4097aaSchristos 257*bc4097aaSchristosmake state flushing clean anything that's not fully established (4/4) 258*bc4097aaSchristos 259*bc4097aaSchristoscall fr_state_flush() after we've released ipf_state so we don't generate 260*bc4097aaSchristosa recursive mutex acquisition panic 261*bc4097aaSchristos 262*bc4097aaSchristosfix parsing of icmp code after return-icmp/return-icmp-as-dest and add 263*bc4097aaSchristossome patches to enhance parsing strength 264*bc4097aaSchristos 265*bc4097aaSchristos3.3.6 28/12/1999 - Released 266*bc4097aaSchristos 267*bc4097aaSchristosadd in missing rwlock release in fr_checkicmpmatchingstate() and fix check 268*bc4097aaSchristosfor ICMP_ECHO to only be for packet, not state entry which we don't have yet. 269*bc4097aaSchristos 270*bc4097aaSchristoshandle SIOCIPFFB in nat_ioctl() and fr_state_ioctl() 271*bc4097aaSchristos 272*bc4097aaSchristosfix size of friostat for SunOS4 273*bc4097aaSchristos 274*bc4097aaSchristosfix bug in running off the end of a buffer in real audio proxy 275*bc4097aaSchristos 276*bc4097aaSchristos3.3.5 11/12/1999 - Released 277*bc4097aaSchristos 278*bc4097aaSchristosfix parsing of "log level" and printing it back out too 279*bc4097aaSchristos 280*bc4097aaSchristos<net/if_types.h> is only present on Solaris2.6/7/8 281*bc4097aaSchristos 282*bc4097aaSchristosuse send_icmp_err rather than icmp_error to send back a frag-needed error 283*bc4097aaSchristoswhen doing PMTU 284*bc4097aaSchristos 285*bc4097aaSchristosdo not use -b with add_drv on Solaris unless $BASEDIR is set. 286*bc4097aaSchristos 287*bc4097aaSchristosfix problem where source address in icmp replies is reversed 288*bc4097aaSchristos 289*bc4097aaSchristosfix yet another problem with real audio. 290*bc4097aaSchristos 291*bc4097aaSchristos3.3.4 4/12/1999 - Released 292*bc4097aaSchristos 293*bc4097aaSchristosfix up the real audio proxy to properly setup state information and NAT 294*bc4097aaSchristosentries, thanks to Laine Stump for testing/advice/fixes. 295*bc4097aaSchristos 296*bc4097aaSchristosfix ipfr_fastroute to set dst->sin_addr (Sean Farley - appears to prevent 297*bc4097aaSchristosFreeBSD 3.3 from panic'ing) as this had been removed in prior hacks to this 298*bc4097aaSchristosroutine. 299*bc4097aaSchristos 300*bc4097aaSchristosfix kinstall for BSDI 301*bc4097aaSchristos 302*bc4097aaSchristossupport ICMP errors being allowed through for ICMP packets going out with 303*bc4097aaSchristoskeep state enabled 304*bc4097aaSchristos 305*bc4097aaSchristossupport hardware checksumming (gigabit ethernet cards) on Solaris thanks to 306*bc4097aaSchristosTel.Net Media for providing hardware for testing. 307*bc4097aaSchristos 308*bc4097aaSchristospatched from Frank Volf for ipmon (ICMP & fragmented packets) and allowing 309*bc4097aaSchristosICMP responses to ICMP packets in the keep state table. 310*bc4097aaSchristos 311*bc4097aaSchristosadd in patches for hardware checksumming under solaris 312*bc4097aaSchristos 313*bc4097aaSchristosSolaris install scripts now use $BASEDIR as appropriate. 314*bc4097aaSchristos 315*bc4097aaSchristosadd Solaris8 support 316*bc4097aaSchristos 317*bc4097aaSchristosfix "ipf -y" on solaris so that it rescans rules also for changes in 318*bc4097aaSchristosinterface pointers 319*bc4097aaSchristos 320*bc4097aaSchristoslet ipmon become a daemon with -D if it is using syslog 321*bc4097aaSchristos 322*bc4097aaSchristosfix parsing of return-icmp-as-dest(foo) 323*bc4097aaSchristos 324*bc4097aaSchristosadd reference to ipfstat -g to ipfstat.8 325*bc4097aaSchristos 326*bc4097aaSchristosipf_mutex needs to be declared for irix in ip_fil.c 327*bc4097aaSchristos 328*bc4097aaSchristos3.3.3 22/10/1999 - Released 329*bc4097aaSchristos 330*bc4097aaSchristosadd -g command line option to ipfstat to show groups still define. 331*bc4097aaSchristos 332*bc4097aaSchristosfix problem with fragment table not recording rule pointer when called 333*bc4097aaSchristosfrom state functions (fin_fr not set). 334*bc4097aaSchristos 335*bc4097aaSchristosfixup fastroute problems with keep state rules. 336*bc4097aaSchristos 337*bc4097aaSchristosload rules into inactive set first, so we don't disable things like NIS 338*bc4097aaSchristoslookups half way through processing - found by Kevin Littlejohn 339*bc4097aaSchristos 340*bc4097aaSchristosfix handling of unaligned ip pointer for solaris 341*bc4097aaSchristos 342*bc4097aaSchristospatch for fr_newauth from Rudi Sluijtman 343*bc4097aaSchristos 344*bc4097aaSchristosfixed htons() bug in fr_tcpsum() where ip_p wasn't cast to u_short 345*bc4097aaSchristos 346*bc4097aaSchristos3.3.2 23/09/1999 - Released 347*bc4097aaSchristos 348*bc4097aaSchristospatches from Scott Presnell to fix rcmd proxy 349*bc4097aaSchristos 350*bc4097aaSchristospatches from Greg to fix Solaris detachment of interfaces 351*bc4097aaSchristos 352*bc4097aaSchristosadd openbsd compatibility fixes 353*bc4097aaSchristos 354*bc4097aaSchristosfix free'ing already freed memory in ipfr_slowtimer() 355*bc4097aaSchristos 356*bc4097aaSchristosfix for deferencing invalid memory in cleaning up after a device disappears 357*bc4097aaSchristos 358*bc4097aaSchristos3.3.1 14/8/1999 - Released 359*bc4097aaSchristos 360*bc4097aaSchristosremove include file sys/user.h for irix 361*bc4097aaSchristos 362*bc4097aaSchristosprevent people from running buildsunos directly 363*bc4097aaSchristos 364*bc4097aaSchristosfix up some problems with the saving of rule pointers so that NAT saves 365*bc4097aaSchristosthat information in case it should need to call fr_addstate() from a proxy. 366*bc4097aaSchristos 367*bc4097aaSchristosfix up scanning for the end of FTP messages 368*bc4097aaSchristos 369*bc4097aaSchristosdon't remove /etc/opt/ipf in postremove 370*bc4097aaSchristos 371*bc4097aaSchristosattempt to prevent people running buildsolaris script without doing a 372*bc4097aaSchristos"make solaris" 373*bc4097aaSchristos 374*bc4097aaSchristosfix timeout losing on freebsd3 375*bc4097aaSchristos 376*bc4097aaSchristos3.3 7/8/1999 - Released 377*bc4097aaSchristos 378*bc4097aaSchristosNAT: information (rules, mappings) are stored in hash tables; setup some 379*bc4097aaSchristosbasic NAT regression testing. 380*bc4097aaSchristos 381*bc4097aaSchristosdisplay version name of installed kernel code when initializing. 382*bc4097aaSchristos 383*bc4097aaSchristosadd -V command line option to ipf, showing version (program and kernel 384*bc4097aaSchristosmodule) as well as the run-status of the kernel code. 385*bc4097aaSchristos 386*bc4097aaSchristosfix problem with "log" rules actually affecting result of filtering. 387*bc4097aaSchristos 388*bc4097aaSchristosautomatically use SUNWspro if available and on a 64bit Solaris system for 389*bc4097aaSchristoscompiling. 390*bc4097aaSchristos 391*bc4097aaSchristosadd kernel proxies for rcmd(3) and RealAudio (PNA) 392*bc4097aaSchristos 393*bc4097aaSchristosuse timeout/untimeout on SunOS4/BSD platforms too rather than hijacking 394*bc4097aaSchristosip_slowtimo 395*bc4097aaSchristos 396*bc4097aaSchristosfix IP headers generated through parsing of text information 397*bc4097aaSchristos 398*bc4097aaSchristosfix NAT rules to be in the correct order again. 399*bc4097aaSchristos 400*bc4097aaSchristosmake keep-state work with to/fastroute keywords and enforce usage of those 401*bc4097aaSchristosinterfaces. 402*bc4097aaSchristos 403*bc4097aaSchristosupdate keep-state code with new algorithm from Guido 404*bc4097aaSchristos 405*bc4097aaSchristosadd FreeBSD-3 support 406*bc4097aaSchristos 407*bc4097aaSchristosadd return-icmp-as-dest option to retrun an ICMP packet using the original 408*bc4097aaSchristosdestination as the source rather than a local IP address 409*bc4097aaSchristos 410*bc4097aaSchristosadd "level [facility.]<priority>" option to filter language 411*bc4097aaSchristos 412*bc4097aaSchristosadd changes from Guido to state code. 413*bc4097aaSchristos 414*bc4097aaSchristosadd code to return EPERM if the device is opened for writing and we're 415*bc4097aaSchristosin securelevel 2 or greater. 416*bc4097aaSchristos 417*bc4097aaSchristosauthentication code patches from Guido 418*bc4097aaSchristos 419*bc4097aaSchristosfix real audio proxy 420*bc4097aaSchristos 421*bc4097aaSchristosfix ipmon rule printing of interfaces and add IN/OUT to the end of ipmon 422*bc4097aaSchristoslog output. 423*bc4097aaSchristos 424*bc4097aaSchristosfix bimap rules with hash tables 425*bc4097aaSchristos 426*bc4097aaSchristosupdate addresses used in NAT mappings for 0/32 rules for any protocol but TCP 427*bc4097aaSchristosif it changes on the interface - check every ip_natexpire() 428*bc4097aaSchristos 429*bc4097aaSchristosadd redirect regression test 430*bc4097aaSchristos 431*bc4097aaSchristoscount buckets used in the state hash table. 432*bc4097aaSchristos 433*bc4097aaSchristosfix sending of RST's with return-rst to use the ack number provided in 434*bc4097aaSchristosthe packet being replied to in addition to the sequence number. 435*bc4097aaSchristos 436*bc4097aaSchristosfix to compile as a 64bit application on solaris7-64bit 437*bc4097aaSchristos 438*bc4097aaSchristosadd NAT IP mapping to ranges of IP addresses that aren't CIDR specified 439*bc4097aaSchristos 440*bc4097aaSchristosfix calculation of in_space parameter for NAT 441*bc4097aaSchristos 442*bc4097aaSchristosfix `wrapping' when incrementing the next ip address for use in NAT 443*bc4097aaSchristos 444*bc4097aaSchristosfix free'ing of kernel memory in ip_natunload on solaris 445*bc4097aaSchristos 446*bc4097aaSchristosfix -l/-U command line options from interfering with each other 447*bc4097aaSchristos 448*bc4097aaSchristosfix fastroute under solaris2 and cleanup compilation for solaris7 449*bc4097aaSchristos 450*bc4097aaSchristosadd install scripts and compile cleanly on BSD/OS 4.0 451*bc4097aaSchristos 452*bc4097aaSchristossafely open files in /tmp for writing device output when testing. 453*bc4097aaSchristos 454*bc4097aaSchristosfix uninitialized pointer bug in NAT 455*bc4097aaSchristos 456*bc4097aaSchristosfix SIOCZRLST (zero list rule stats) bug with groups 457*bc4097aaSchristos 458*bc4097aaSchristoschange some usage of u_short to u_int in function calling 459*bc4097aaSchristos 460*bc4097aaSchristosfix compilation for Solaris7 (SUNWspro) 461*bc4097aaSchristos 462*bc4097aaSchristoschange solaris makefiles to build for either sparc or i386 rather than 463*bc4097aaSchristosper-cpu (sun4u, etc). 464*bc4097aaSchristos 465*bc4097aaSchristosfixed bug in ipllog 466*bc4097aaSchristos 467*bc4097aaSchristosadd patches from George Michaelson for FreeBSD 3.0 468*bc4097aaSchristos 469*bc4097aaSchristosadd patch from Guido to provide ICMP checking for known state in the same 470*bc4097aaSchristosmanner as is done for NAT. 471*bc4097aaSchristos 472*bc4097aaSchristosenable FTP PASV proxying and enable wildcarding in NAT/state code for ports 473*bc4097aaSchristosfor better PORT/PASV support with FTP. 474*bc4097aaSchristos 475*bc4097aaSchristosbring into main tree static nat features: map-block and "auto" portmapping. 476*bc4097aaSchristos 477*bc4097aaSchristosadd in source host filtering for redirects (alan jones) 478*bc4097aaSchristos 479*bc4097aaSchristos3.2.10 22/11/98 - Released 480*bc4097aaSchristos 481*bc4097aaSchristos3.2.10beta9 17/11/98 - Released 482*bc4097aaSchristos 483*bc4097aaSchristosfix fr_tcpsum problems in handling mbufs with an odd number of bytes 484*bc4097aaSchristosand/or split across an mbuf boundary 485*bc4097aaSchristos 486*bc4097aaSchristosfix NAT list entry comparisons and allow multiple entries for the same 487*bc4097aaSchristosproxy (but on different ports). 488*bc4097aaSchristos 489*bc4097aaSchristosdon't create duplicate NAT entries for repeated PORT commands. 490*bc4097aaSchristos 491*bc4097aaSchristos3.2.10beta8 14/11/98 - Released 492*bc4097aaSchristos 493*bc4097aaSchristosalways exit an rwlock before expecting to enter it again on solaris 494*bc4097aaSchristos 495*bc4097aaSchristosfix loop in nat_new for pre-existing nat 496*bc4097aaSchristos 497*bc4097aaSchristosdon't setup state for an ftp connection if creating nat fails. 498*bc4097aaSchristos 499*bc4097aaSchristos3.2.10beta7 05/11/98 - Released 500*bc4097aaSchristos 501*bc4097aaSchristosset fake window in ipft_tx.c to ensure code passes tests. 502*bc4097aaSchristos 503*bc4097aaSchristoscleaned up/enhanced ipnat -l/ipnat -lv output 504*bc4097aaSchristos 505*bc4097aaSchristosfixed NAT handling of non-TCP/UDP packets, esp. for ICMP errors returned. 506*bc4097aaSchristos 507*bc4097aaSchristosSolaris recusive mutex on icmp-error/tcp-reset - requires rwlock's rather 508*bc4097aaSchristosthan mutexes. 509*bc4097aaSchristos 510*bc4097aaSchristos3.2.10beta6 03/11/98 - Released 511*bc4097aaSchristos 512*bc4097aaSchristosfix mixed use of krwlock_t and kmutex_t on Solaris2 513*bc4097aaSchristos 514*bc4097aaSchristosfix FTP proxy back up, splitting pasv code out of port code. 515*bc4097aaSchristos 516*bc4097aaSchristos3.2.10beta5 02/11/98 - Released 517*bc4097aaSchristos 518*bc4097aaSchristosfixed port translation in ICMP reply handling 519*bc4097aaSchristos 520*bc4097aaSchristos3.2.10beta4 01/11/98 - Released 521*bc4097aaSchristos 522*bc4097aaSchristosincrease useful statistic collection on solaris 523*bc4097aaSchristos 524*bc4097aaSchristosfilter DL_UNITDATA_REQ as well as DL_UNITDATA_IND on solaris 525*bc4097aaSchristos 526*bc4097aaSchristosdisable PASV reply translation for now 527*bc4097aaSchristos 528*bc4097aaSchristosfail with an error if we try to load a NAT rule with a non-existant 529*bc4097aaSchristos proxy name - Guido 530*bc4097aaSchristos 531*bc4097aaSchristosfix portmap usage with 0/0 and 0/32 map rules 532*bc4097aaSchristos 533*bc4097aaSchristosremove ap_unload/ap_expire - automatically done when NAT is cleaned up 534*bc4097aaSchristos 535*bc4097aaSchristosprint "STATE:CLOSED" from ipmon if the connection progresses past established 536*bc4097aaSchristos rather than "STATE:EXPIRED" 537*bc4097aaSchristos 538*bc4097aaSchristos3.2.10beta3 26/10/98 - Released 539*bc4097aaSchristos 540*bc4097aaSchristosfixed traceroute/nat problem 541*bc4097aaSchristos 542*bc4097aaSchristosrewrote nat/proxy interface 543*bc4097aaSchristos 544*bc4097aaSchristosipnat now lists associated proxy sessions for each NAT where applicable 545*bc4097aaSchristos 546*bc4097aaSchristos3.2.10beta2 13/10/98 - Released 547*bc4097aaSchristos 548*bc4097aaSchristosuse KRWLOCK_T in place of krwlock_t for solaris as well as irix 549*bc4097aaSchristos 550*bc4097aaSchristosdisable use of read-write lock acquisition by default 551*bc4097aaSchristos 552*bc4097aaSchristosadd in mb_t for linux, non-kernel 553*bc4097aaSchristos 554*bc4097aaSchristossome changes to progress compilation on linux with glibc 555*bc4097aaSchristos 556*bc4097aaSchristoschange PASV as well as PORT when passed through kernel ftp proxy. 557*bc4097aaSchristos 558*bc4097aaSchristosdon't allow window to become 0 in tcp state code 559*bc4097aaSchristos 560*bc4097aaSchristosmake ipmon compile cleaner 561*bc4097aaSchristos 562*bc4097aaSchristosirix patches 563*bc4097aaSchristos 564*bc4097aaSchristos3.2.10beta 11/09/98 - Released 565*bc4097aaSchristos 566*bc4097aaSchristosstop fr_tcpsum() thinking it has run out of data when it hasn't. 567*bc4097aaSchristos 568*bc4097aaSchristosstop solaris panics due to fin_dp being something wild. 569*bc4097aaSchristos 570*bc4097aaSchristosrevisit usage of ATOMIC_*() 571*bc4097aaSchristos 572*bc4097aaSchristoslog closing state of TCP connection in "keep state" 573*bc4097aaSchristos 574*bc4097aaSchristosfix fake-arp table code for ipsend. 575*bc4097aaSchristos 576*bc4097aaSchristosipmon now writes pid to a file. 577*bc4097aaSchristos 578*bc4097aaSchristosfix "ipmon -a" to actually activate all logging devices. 579*bc4097aaSchristos 580*bc4097aaSchristosadd patches for BSDOS4. 581*bc4097aaSchristos 582*bc4097aaSchristosperl scripts for log analysis donated. 583*bc4097aaSchristos 584*bc4097aaSchristos3.2.9 22/06/98 - Released 585*bc4097aaSchristos 586*bc4097aaSchristosfix byte order for ICMP packets generated on Solaris 587*bc4097aaSchristos 588*bc4097aaSchristosfix some locking problems. 589*bc4097aaSchristos 590*bc4097aaSchristosfix malloc bug in NAT (introduced in 3.2.8). 591*bc4097aaSchristos 592*bc4097aaSchristospatch from guido for state connections that get fragmented 593*bc4097aaSchristos 594*bc4097aaSchristos3.2.8 08/06/98 - Released 595*bc4097aaSchristos 596*bc4097aaSchristosuse readers/writers locks in Solaris2 in place of some mutexes. 597*bc4097aaSchristos 598*bc4097aaSchristosSolaris2 installation enhancements - Martin Forssen (maf@carlstedt.se) 599*bc4097aaSchristos 600*bc4097aaSchristos3.2.7 24/05/98 - Released 601*bc4097aaSchristos 602*bc4097aaSchristosu_long -> u_32_t conversions 603*bc4097aaSchristos 604*bc4097aaSchristospatches from Bernd Ernesti for NetBSD 605*bc4097aaSchristos 606*bc4097aaSchristosfixup ipmon to actually handle HUP's. 607*bc4097aaSchristos 608*bc4097aaSchristosLinux fixes from Michael H. Warfield (mhw@wittsend.com) 609*bc4097aaSchristos 610*bc4097aaSchristosupdate for keep state patch (not security related) - Guido 611*bc4097aaSchristos 612*bc4097aaSchristosdumphex() uses stdout rather than log 613*bc4097aaSchristos 614*bc4097aaSchristos3.2.6 18/05/98 - Released 615*bc4097aaSchristos 616*bc4097aaSchristosfix potential security loop hole in keep state code. 617*bc4097aaSchristos 618*bc4097aaSchristosupdate examples. 619*bc4097aaSchristos 620*bc4097aaSchristos3.2.5 09/05/98 - Released 621*bc4097aaSchristos 622*bc4097aaSchristosBSD/OS 3.1 .o files added for the kernel. 623*bc4097aaSchristos 624*bc4097aaSchristosfix sequence # skew vs window size check. 625*bc4097aaSchristos 626*bc4097aaSchristosfix minimum ICMP header size check. 627*bc4097aaSchristos 628*bc4097aaSchristosremove references to Cybersource. 629*bc4097aaSchristos 630*bc4097aaSchristosfix my email address. 631*bc4097aaSchristos 632*bc4097aaSchristosremove ntohl in ipnat - Thomas Tornblom 633*bc4097aaSchristos 634*bc4097aaSchristos3.2.4 09/04/98 - Released 635*bc4097aaSchristos 636*bc4097aaSchristosadd script to make devices for /dev on BSD boxes 637*bc4097aaSchristos 638*bc4097aaSchristosfixup building into the kernel for FreeBSD 2.2.5 639*bc4097aaSchristos 640*bc4097aaSchristosadd -D command line option to ipmon to make it a daemon and SIGHUP causes 641*bc4097aaSchristosit to close and reopen the logfile 642*bc4097aaSchristos 643*bc4097aaSchristosfixup make clean and make package for SunOS5 - Marc Boucher 644*bc4097aaSchristos 645*bc4097aaSchristospostinstall keeps adding "minor=ipf ipl" - George Ross <gdmr@dcs.ed.ac.uk> 646*bc4097aaSchristos 647*bc4097aaSchristosprotected by IP Filter gif - Sergey Solyanik <solik@atom.ru> 648*bc4097aaSchristos 649*bc4097aaSchristos3.2.3 10/11/97 - Released 650*bc4097aaSchristos 651*bc4097aaSchristosfix some iplang bugs 652*bc4097aaSchristos 653*bc4097aaSchristosfix tcp checksum data overrun, sgi #define changes, 654*bc4097aaSchristosavoid infinite loop when nat'ing to single IP# - Marc Boucher 655*bc4097aaSchristos 656*bc4097aaSchristosfixup DEVFS usage for FreeBSD 657*bc4097aaSchristos 658*bc4097aaSchristosfix sunos5 "make clean" cleaning up too much 659*bc4097aaSchristos 660*bc4097aaSchristos3.2.2 28/11/97 - Released 661*bc4097aaSchristos 662*bc4097aaSchristoschange packet matching to return actual error, if bad packet, to facilitate 663*bc4097aaSchristosECONNRESET for TCP. 664*bc4097aaSchristos 665*bc4097aaSchristosallow ip:netmask in grammar too now - Guido 666*bc4097aaSchristos 667*bc4097aaSchristosassume IRIX has u_int32_t in sys/types.h (needed for R10000) 668*bc4097aaSchristos 669*bc4097aaSchristosrewrite parts of command line options for ipmon 670*bc4097aaSchristos 671*bc4097aaSchristosfix TCP urgent packet & offset testing and add LAND attack test for iptest 672*bc4097aaSchristos 673*bc4097aaSchristosfix grammar error in yacc grammar for iplang 674*bc4097aaSchristos 675*bc4097aaSchristosredirect (rdr) destination port bytes-wapped when it shouldn't be. 676*bc4097aaSchristos 677*bc4097aaSchristosgeneral: fr_check now returns error code, such as EHOSTUNREACH or 678*bc4097aaSchristosECONNRESET (attempt to make ECONNRESET work for locally outbound 679*bc4097aaSchristospackets). 680*bc4097aaSchristos 681*bc4097aaSchristoslinux: enable return-rst, need to filter tcp retransmits which are sent 682*bc4097aaSchristos separately from normal packets 683*bc4097aaSchristos 684*bc4097aaSchristosmemory leak plugged in ip_proxy.c 685*bc4097aaSchristos 686*bc4097aaSchristosBSDI compatibility patches from Guido 687*bc4097aaSchristos 688*bc4097aaSchristostcp checksum fix - Marc Boucher 689*bc4097aaSchristos 690*bc4097aaSchristosrecursive mutex and ioctl param fix - Marc Boucher 691*bc4097aaSchristos 692*bc4097aaSchristos3.2.1 12/11/97 - Released 693*bc4097aaSchristos 694*bc4097aaSchristosport to BSD/OS 3.0 695*bc4097aaSchristos 696*bc4097aaSchristosport to Linux 2.0.31 697*bc4097aaSchristos 698*bc4097aaSchristospatches to make "map a/m -> 0/0" work with ftp proxying properly - Marc Boucher 699*bc4097aaSchristos 700*bc4097aaSchristosadd "ipf -F s" and "ipf -F S" to flush state table entries. 701*bc4097aaSchristos 702*bc4097aaSchristosannounce if logging is on or off when ip filter initializes. 703*bc4097aaSchristos 704*bc4097aaSchristos"ipf -F a" doesn't flush groups properly for Solaris. 705*bc4097aaSchristos 706*bc4097aaSchristos3.2 30/10/97 - Released 707*bc4097aaSchristos 708*bc4097aaSchristosipnat doesn't successfully remove proxy mappings with "-rf" - 709*bc4097aaSchristosAlexander Romanyu 710*bc4097aaSchristos 711*bc4097aaSchristosuse K&R C function style for solaris kernel code 712*bc4097aaSchristos 713*bc4097aaSchristosuse m_adj() to decrease packet size in ftp proxy 714*bc4097aaSchristos 715*bc4097aaSchristosuse mbufchainlen rather than msgdsize, 716*bc4097aaSchristosIRIX update - Marc Boucher 717*bc4097aaSchristos 718*bc4097aaSchristosfix NetBSD modunload bug (pfil_add_hook done twice) 719*bc4097aaSchristos 720*bc4097aaSchristospatches for OpenBSD 2.1 - Craig Bevins <craigb@bitcom.net.au> 721*bc4097aaSchristos 722*bc4097aaSchristos3.2beta10 24/10/97 - Released 723*bc4097aaSchristos 724*bc4097aaSchristosfix fragment table entries allocated for NAT. 725*bc4097aaSchristos 726*bc4097aaSchristosfix tcp checksum calculations over mbuf/mblk boundaries 727*bc4097aaSchristos 728*bc4097aaSchristosfix panic for blen < 0 in ftp kernel proxy - marc boucher 729*bc4097aaSchristos 730*bc4097aaSchristosfix flushing of rules which have been grouped. 731*bc4097aaSchristos 732*bc4097aaSchristos3.2beta9 20/10/97 - Released 733*bc4097aaSchristos 734*bc4097aaSchristossome nit picking on solaris2 with SUNWspro - Michael Lyle <mrl@rpnet.net> 735*bc4097aaSchristos 736*bc4097aaSchristosftp kernel proxy patches from Marc Boucher 737*bc4097aaSchristos 738*bc4097aaSchristos3.2beta8 13/10/97 - Released 739*bc4097aaSchristos 740*bc4097aaSchristosadd support for passing ICMP errors back through NAT. 741*bc4097aaSchristos 742*bc4097aaSchristosIRIX port update - Marc Boucher 743*bc4097aaSchristos 744*bc4097aaSchristoscalculate correct MIN size of packet to log for UDP - Marc Boucher 745*bc4097aaSchristos 746*bc4097aaSchristosneed htons(ETHERTYPE_x) on little endian BSD boxes - Dave Huang 747*bc4097aaSchristos 748*bc4097aaSchristoscopyright header fixups 749*bc4097aaSchristos 750*bc4097aaSchristos3.2beta7 23/09/97 - Released 751*bc4097aaSchristos 752*bc4097aaSchristosfickup problems introduced by prior merges & changes. 753*bc4097aaSchristos 754*bc4097aaSchristos3.2beta6 23/09/97 - Released 755*bc4097aaSchristos 756*bc4097aaSchristospatch for spin-reading race condition - Marc Boucher. 757*bc4097aaSchristos 758*bc4097aaSchristosIRIX port by Marc Boucher. 759*bc4097aaSchristos 760*bc4097aaSchristoscompatibility updates for Linux to ipsend 761*bc4097aaSchristos 762*bc4097aaSchristos3.2beta5 13/09/97 - Released 763*bc4097aaSchristos 764*bc4097aaSchristospatches from Bernd Ernesti for NetBSD integration (mostly prototyping and 765*bc4097aaSchristoscompiler warning things) 766*bc4097aaSchristos 767*bc4097aaSchristosipf -y will resync IP#'s allocated with 0/32 in NAT to match interface if it 768*bc4097aaSchristoschanges. 769*bc4097aaSchristos 770*bc4097aaSchristosupdate manual pages and other documentation updates. 771*bc4097aaSchristos 772*bc4097aaSchristos3.2beta4 27/8/97 - Released 773*bc4097aaSchristos 774*bc4097aaSchristosenable setting IP and TCP options for iplang/ 775*bc4097aaSchristos 776*bc4097aaSchristosSolaris2 patches from Marc Boucher. 777*bc4097aaSchristos 778*bc4097aaSchristosadd groups for filter rules. 779*bc4097aaSchristos 780*bc4097aaSchristos3.2beta3 21/8/97 - Released 781*bc4097aaSchristos 782*bc4097aaSchristospatches for Solaris2 (interface panic solution ?): fix FIONREAD and 783*bc4097aaSchristosreplacing q_qinfo points - Marc Boucher <marc@CAM.ORG> 784*bc4097aaSchristos 785*bc4097aaSchristoschange ipsend/* and ipsd/* copyright notices to be the same as ip filter's 786*bc4097aaSchristos 787*bc4097aaSchristospatch for SYN-ACK skew testing fix from Eric V. Smith <EricSmith@windsor.com> 788*bc4097aaSchristos 789*bc4097aaSchristos3.2beta2 6/8/97 - Released 790*bc4097aaSchristos 791*bc4097aaSchristosmake it load on Solaris 2.3 792*bc4097aaSchristos 793*bc4097aaSchristosrewrote logging to remove solaris errors, introduced checking to see if the 794*bc4097aaSchristossame packet is logged successively. 795*bc4097aaSchristos 796*bc4097aaSchristosfix filter cache to work when there are no rules loaded. 797*bc4097aaSchristos 798*bc4097aaSchristosadd "raw" option to ipresend to send entire ethernet frames. 799*bc4097aaSchristos 800*bc4097aaSchristosnat list corruption bug - NetBSD - Klaus Klein 801*bc4097aaSchristos 802*bc4097aaSchristos3.2beta1 5/7/97 - Released 803*bc4097aaSchristos 804*bc4097aaSchristospatches from Jason Thorpe fixing: UNSIGNED_CHAR lossage, off_t being 64bits 805*bc4097aaSchristoslossage, and other NetBSD bits. 806*bc4097aaSchristos 807*bc4097aaSchristosNetBSD 1.2G update. 808*bc4097aaSchristos 809*bc4097aaSchristosfixup fwtk patches and add protocol field for SIOCGNATL. 810*bc4097aaSchristos 811*bc4097aaSchristosrdr bugs reported by Alexander Romanyu (alexr@aix.krid.crimea.ua), with 812*bc4097aaSchristosfixes: 813*bc4097aaSchristos* rdr matched all packets of a given protocol (ignored ports). 814*bc4097aaSchristos* severe bug in nat_delete which caused system crash/freeze. 815*bc4097aaSchristos 816*bc4097aaSchristoschange Makefile so that CC isn't passed on for FreeBSD/NetBSD (will use 817*bc4097aaSchristosthe default CC - cc, not gcc) 818*bc4097aaSchristos 819*bc4097aaSchristos3.2alpha9 16/6/97 - Released 820*bc4097aaSchristos 821*bc4097aaSchristosadded "skip" keyword. 822*bc4097aaSchristos 823*bc4097aaSchristosimplement preauthentication of packets, as outlined by Guido. 824*bc4097aaSchristos 825*bc4097aaSchristosMake it compile as cleanly as possible with -Wall & general code cleanup 826*bc4097aaSchristos 827*bc4097aaSchristosgetopt returns int, not char. Bernd Ernesti 828*bc4097aaSchristos 829*bc4097aaSchristos3.2alpha8 13/6/97 - Released 830*bc4097aaSchristos 831*bc4097aaSchristoscode added to support "auth" rules which require a user program to allow them 832*bc4097aaSchristosthrough. First revision and much of the code came from Guido. 833*bc4097aaSchristos 834*bc4097aaSchristoshex output from ipmon doesn't goto syslog when recovering from out of sync 835*bc4097aaSchristoserror. Luke Mewburn (lukem@connect.com.au) 836*bc4097aaSchristos 837*bc4097aaSchristosfix solaris2.6 lookup of destination ire's. 838*bc4097aaSchristos 839*bc4097aaSchristosipnat doesn't throw away unused bits (after masking), causing it to 840*bc4097aaSchristosbehave incorrectly. Carson Gaspar 841*bc4097aaSchristos 842*bc4097aaSchristosNAT code doesn't include inteface name when matching - Alexey Mavrin 843*bc4097aaSchristos<lha@elco.spb.ru> 844*bc4097aaSchristos 845*bc4097aaSchristosreplace old SunOS tcpip.h with new tcpip.h (from 4.4BSD) - Jason Thorpe. 846*bc4097aaSchristos 847*bc4097aaSchristosupdate install procedures to include ip_proxy.c 848*bc4097aaSchristos 849*bc4097aaSchristosmask out unused bits in NAT/RDR rules. 850*bc4097aaSchristos 851*bc4097aaSchristosuse a generic type (u_32_t) for 32bit variables, rather than rely on 852*bc4097aaSchristosu_long being such - Jason Thorpe. 853*bc4097aaSchristos 854*bc4097aaSchristoscreate a local "netinet" directory and include from ~netinet/*" rather than 855*bc4097aaSchristosjust "*" to make keeping the code working on ports easier. 856*bc4097aaSchristos 857*bc4097aaSchristosadd an m_copydata and m_copyback for SunOS4 (based on 4.4BSD-Lite versions) 858*bc4097aaSchristos 859*bc4097aaSchristosdocumentation updates. 860*bc4097aaSchristos 861*bc4097aaSchristosNetBSD update from Jason Thorpe <thorpej@netbsd.org> 862*bc4097aaSchristos 863*bc4097aaSchristosallow RST's through with a matching SEQ # and 0 ACK. Guido Van Rooij 864*bc4097aaSchristos 865*bc4097aaSchristosipmon uses excessive amounts of CPU on Solaris2 - Reinhard Bertram 866*bc4097aaSchristos<Reinhard.Bertram@KOM.th-darmstadt.de> 867*bc4097aaSchristos 868*bc4097aaSchristos3.2alpha7 25/5/97 - Released 869*bc4097aaSchristos 870*bc4097aaSchristosadd strlen for pre-2.2 kernels - Doug Kite <dkite@websgi.icomnet.com> 871*bc4097aaSchristos 872*bc4097aaSchristossetup bits and pieces for compiling into a FreeBSD-2.2 kernel. 873*bc4097aaSchristos 874*bc4097aaSchristossplit up "bsd" targets. Now a separate netbsd/freebsd/bsd target. 875*bc4097aaSchristosmln_ipl.c has been split up into itself and mlf_ipl.c (for freebsd). 876*bc4097aaSchristos 877*bc4097aaSchristosfix (negative) host matching in filtering. 878*bc4097aaSchristos 879*bc4097aaSchristosadd sysctl interface for some variables when compiled into FreeBSD-2.2 kernels 880*bc4097aaSchristosor later. 881*bc4097aaSchristos 882*bc4097aaSchristosmake all the candidates for kernel compiling include "netinet/..." and build 883*bc4097aaSchristosa subdirectory "netinet" when compiling and symlink all .h files into this. 884*bc4097aaSchristos 885*bc4097aaSchristosadd install make target to Makefile.ipsend 886*bc4097aaSchristos 887*bc4097aaSchristos3.2alpha6 8/5/97 - Released 888*bc4097aaSchristos 889*bc4097aaSchristosAdd "!" (not) to hostname/ip matching. 890*bc4097aaSchristos 891*bc4097aaSchristosAutomatically add packet info to the fragment cache if it is a fragment 892*bc4097aaSchristosand we're translating addreses for. 893*bc4097aaSchristos 894*bc4097aaSchristosAutomatically add packet info to the fragment cache if it is a fragment 895*bc4097aaSchristosand we're "keeping state" for the packet. 896*bc4097aaSchristos 897*bc4097aaSchristosSolaris2 patches - Anthony Baxter (arb@connect.com.au) 898*bc4097aaSchristos 899*bc4097aaSchristoschange install procedure for FreeBSD 2.2 to allow building to a kernel 900*bc4097aaSchristoswhich is different to the running kernel. 901*bc4097aaSchristos 902*bc4097aaSchristosadd FIONREAD for Solaris2! 903*bc4097aaSchristos 904*bc4097aaSchristoswhen expiring NAT table entries, if we would set a time to fr_tcpclosed 905*bc4097aaSchristos(which is 1), make it fr_tcplaskack(20) so that the state tables have a 906*bc4097aaSchristoschance to clear up. 907*bc4097aaSchristos 908*bc4097aaSchristos3.2alpha5 909*bc4097aaSchristos 910*bc4097aaSchristosadd proxying skeleton support and sample ftp transparent proxy code. 911*bc4097aaSchristos 912*bc4097aaSchristosadd printfs at startup to tell user what is happening. 913*bc4097aaSchristos 914*bc4097aaSchristosadd packets & bytes for EXPIRE NAT log records. 915*bc4097aaSchristos 916*bc4097aaSchristosfix the "install-bsd" target in the root Makefile. Chris Williams 917*bc4097aaSchristos<psion@mv.mv.com> 918*bc4097aaSchristos 919*bc4097aaSchristosFixes for FreeBSD 2.2 (and later revs) to prevent panics. Julian Assange. 920*bc4097aaSchristos 921*bc4097aaSchristos3.2alpha4 2/4/97 - Released 922*bc4097aaSchristos 923*bc4097aaSchristosSome compiler warnings cleaned up. 924*bc4097aaSchristos 925*bc4097aaSchristosFreeBSD-2.2 patches for LKM completed. 926*bc4097aaSchristos 927*bc4097aaSchristos3.2alpha3 31/3/97 - Released 928*bc4097aaSchristos 929*bc4097aaSchristosipmon changes: -N for reading NAT logfile, -S for reading state logfile. 930*bc4097aaSchristos-a for reading all. -n now toggles hostname resolution. 931*bc4097aaSchristos 932*bc4097aaSchristosAdd logging of new state entries and expiration of old state entries. 933*bc4097aaSchristoscount log successes and failures. 934*bc4097aaSchristos 935*bc4097aaSchristosAdd logging of new NAT entries and expiration of old NAT entries. 936*bc4097aaSchristoscount log successes and failures. 937*bc4097aaSchristos 938*bc4097aaSchristosUse u_quad_t for records of bytes & packets where kept 939*bc4097aaSchristos(IP Accounting: fr_hits, fr_bytes; IP state: is_pkts, is_bytes). 940*bc4097aaSchristos 941*bc4097aaSchristosFixup use of CPU and DCPU in Makefiles. 942*bc4097aaSchristos 943*bc4097aaSchristosFix broken 0/32 NAT mapping. Carl Makin <cmakin@nla.gov.au> 944*bc4097aaSchristos 945*bc4097aaSchristos3.2alpha2 946*bc4097aaSchristos 947*bc4097aaSchristosImplement mapping to 0/32 as being an alias for automatically using the 948*bc4097aaSchristosinterface's first IP address. 949*bc4097aaSchristos 950*bc4097aaSchristosImplement separate minor devices for both NAT and IP state code. 951*bc4097aaSchristos 952*bc4097aaSchristosFully prototype all functions. 953*bc4097aaSchristos 954*bc4097aaSchristosFix Makefile problem due to attempt to fix Sun compiling problems. 955*bc4097aaSchristos 956*bc4097aaSchristos3.1.10 23/3/97 - Released 957*bc4097aaSchristos 958*bc4097aaSchristosipfstat -a requires a -i or -o command line option too. Print an error 959*bc4097aaSchristoswhen not present rather than attempt to do something. 960*bc4097aaSchristos 961*bc4097aaSchristospatch updates for SunOS4 for kernel compiling. 962*bc4097aaSchristospatch for ipmon -s (flush's syslog file which isn't good). Andrew J. Schorr 963*bc4097aaSchristos<schorr@ead.dsa.com> 964*bc4097aaSchristos 965*bc4097aaSchristostoo many people hit their heads hard when compiling code into the kernel 966*bc4097aaSchristosthat doesn't let any packets through. (fil.c - IPF_NOMATCH) 967*bc4097aaSchristos 968*bc4097aaSchristosicmp-type parsing doesn't return any errors when it isn't constructed 969*bc4097aaSchristoscorrectly. Neil Readwin 970*bc4097aaSchristos 971*bc4097aaSchristosUsing "-conf" with modload on SunOS4 doesn't work. 972*bc4097aaSchristosTimothy Demarest <demarest@arraycomm.com> 973*bc4097aaSchristos 974*bc4097aaSchristosNeed to define ARCH in makefile for SunOS4 building. "make sunos4" 975*bc4097aaSchristosin INSTALL.SunOS is incorrect. James R Grinter <jrg@blodwen.demon.co.uk> 976*bc4097aaSchristos[all SunOS targets now run buildsunos] 977*bc4097aaSchristos 978*bc4097aaSchristosNAT lookups are still incorrect, matching non-TCP/UDP with TCP/UDP 979*bc4097aaSchristosinformation. ArkanoiD <ark@paranoid.convey.ru> 980*bc4097aaSchristos 981*bc4097aaSchristosNeed to check for __FreeBSD_version being 199511 rather than 199607 982*bc4097aaSchristosin mln_ipl.c. Eric Feillant <Eric.Feillant@EUnet.fr> 983*bc4097aaSchristos 984*bc4097aaSchristos3.1.9 8/3/97 - Released 985*bc4097aaSchristos 986*bc4097aaSchristosfixed incorrect lookup of active NAT entries. 987*bc4097aaSchristos 988*bc4097aaSchristospatch for ip_deq() wrong for pre 2.1.6 FreeBSD. 989*bc4097aaSchristosfyeung@fyeung8.netific.com (Francis Yeung) 990*bc4097aaSchristos 991*bc4097aaSchristoscheck for out with return-rst/return-icmp at wrong place - Erkki Ritoniemi 992*bc4097aaSchristos(erkki@vlsi.fi) 993*bc4097aaSchristos 994*bc4097aaSchristostext_readip returns the interface pointer pointing to text on stack - 995*bc4097aaSchristosNeil Readwin 996*bc4097aaSchristos 997*bc4097aaSchristosfix from Pradeep Krishnan for printout rules "with not opt sec". 998*bc4097aaSchristos 999*bc4097aaSchristos3.1.8 18/2/97 - Released 1000*bc4097aaSchristos 1001*bc4097aaSchristosDiffs for ip_output.c and ip_input.c updated to fix bug with fastroute and 1002*bc4097aaSchristoscompiling warnings about reuse of m0. 1003*bc4097aaSchristos 1004*bc4097aaSchristosprevent use of return-rst and return-icmp with rules blocking packets going 1005*bc4097aaSchristosout, preventing panics in certain situations. 1006*bc4097aaSchristos 1007*bc4097aaSchristosloop forms in frag cache table - Yury Pshenychny <yura@rd.zgik.zaporizhzhe.ua> 1008*bc4097aaSchristos 1009*bc4097aaSchristosshould use SPLNET/SPLX around expire routines in NAT/frag/state code. 1010*bc4097aaSchristos 1011*bc4097aaSchristosredeclared malloc in 44arp.c - 1012*bc4097aaSchristos 1013*bc4097aaSchristos3.1.7 8/2/97 - Released 1014*bc4097aaSchristos 1015*bc4097aaSchristosMacros used for ntohs/htons supplied with gcc don't always work very well 1016*bc4097aaSchristoswhen the assignment is the same variable being converted. 1017*bc4097aaSchristos 1018*bc4097aaSchristosFilter matching doesn't not match rule which checks tcp flags on packets 1019*bc4097aaSchristoswhich are fragments - David Wilson 1020*bc4097aaSchristos 1021*bc4097aaSchristos3.1.7beta 30/1/97 - Released 1022*bc4097aaSchristos 1023*bc4097aaSchristosFix up NAT bugs introduced in last major change (now tested), including 1024*bc4097aaSchristosnat_delete(), nat_lookupredir(), checksum changes, etc. 1025*bc4097aaSchristos 1026*bc4097aaSchristos3.1.7alpha 30/1/97 - Released 1027*bc4097aaSchristos 1028*bc4097aaSchristosMany changes to NAT code, including contributions from Laurent Joncheray 1029*bc4097aaSchristos<lpj@ans.net> 1030*bc4097aaSchristos 1031*bc4097aaSchristosUse "NO_SLEEP" when allocating memory under SunOS. 1032*bc4097aaSchristos 1033*bc4097aaSchristosMake kernel printf's nicer for BSD/SunOS4 1034*bc4097aaSchristos 1035*bc4097aaSchristosAlways do a checksum for packets being filtered going out and being 1036*bc4097aaSchristosprocessed by fastroute. 1037*bc4097aaSchristos 1038*bc4097aaSchristosLeave kernel to play with cdevsw on *BSD systems with LKM's. 1039*bc4097aaSchristos 1040*bc4097aaSchristosipnat.1 man page fixes. 1041*bc4097aaSchristos 1042*bc4097aaSchristos3.1.6 21/1/97 - Released 1043*bc4097aaSchristos 1044*bc4097aaSchristosAllow NAT to work on BSD systems in conjunction with "pass .. to ifname" 1045*bc4097aaSchristos 1046*bc4097aaSchristosMemory leak introduced in 3.1.3 in NAT lists, clearing of NAT table tried 1047*bc4097aaSchristosto free memory twice. 1048*bc4097aaSchristos 1049*bc4097aaSchristosNAT recalculates IP header checksum based on difference between IP#'s and 1050*bc4097aaSchristosport numbers - should be just IP#'s (Solaris2 only) 1051*bc4097aaSchristos 1052*bc4097aaSchristos3.1.5 13/1/97 - Released 1053*bc4097aaSchristos 1054*bc4097aaSchristosfixed setting of NAT timeouts and use different timeouts for concurrent 1055*bc4097aaSchristosTCP sessions using the same IP# mapping (when port mapping isn't used) 1056*bc4097aaSchristos 1057*bc4097aaSchristosmultiple loading/unloading of LKM's doesn't clean up cdevsw properly for 1058*bc4097aaSchristos*BSD systems. 1059*bc4097aaSchristos 1060*bc4097aaSchristos3.1.4 10/1/97 - Released 1061*bc4097aaSchristos 1062*bc4097aaSchristosadd command line options -C and -F to ipnat to flush NAT list and table 1063*bc4097aaSchristos 1064*bc4097aaSchristosipnat -l loops on output - Neil Readwin (nreadwin@nysales.micrognosis.com) 1065*bc4097aaSchristos 1066*bc4097aaSchristosNetBSD/FreeBSD kernel malloc changes - Daniel Carosone 1067*bc4097aaSchristos 1068*bc4097aaSchristos3.1.3 10/1/97 - Released 1069*bc4097aaSchristos 1070*bc4097aaSchristosNAT chains not constructed correctly in hash tables - Antony Y.R Lu 1071*bc4097aaSchristos(antony@hawk.ee.ncku.edu.tw) 1072*bc4097aaSchristos 1073*bc4097aaSchristosUpdated INSTALL.NetBSD, INSTALL.FreeBSD and INSTALL.Sol2 1074*bc4097aaSchristos 1075*bc4097aaSchristosman page update (ipf.5) from Daniel Carosone (dan@geek.com.au) 1076*bc4097aaSchristos 1077*bc4097aaSchristosICMP header checksum update now included in NAT. 1078*bc4097aaSchristos 1079*bc4097aaSchristosSolaris2 needs to modify IP header checksums in ip_natin and ip_natout. 1080*bc4097aaSchristos 1081*bc4097aaSchristos3.1.2 4/12/96 - Released 1082*bc4097aaSchristos 1083*bc4097aaSchristosipmon doesn't use syslog all the time when given -s option 1084*bc4097aaSchristos 1085*bc4097aaSchristosfixed mclput panic in ip_input.c and replace ntohs() with NTOHS() macro 1086*bc4097aaSchristos 1087*bc4097aaSchristoscheck the results of hostname resolution in ipnat 1088*bc4097aaSchristos 1089*bc4097aaSchristos"make *install" fixed for subdirectories. 1090*bc4097aaSchristos 1091*bc4097aaSchristosproblems with "ARCH:=" and gnu make resolved 1092*bc4097aaSchristos 1093*bc4097aaSchristosparser reports an error for lines with whitespaces only rather than skipping 1094*bc4097aaSchristosthem. D.Carosone@abm.com.au (Daniel Carosone) 1095*bc4097aaSchristos 1096*bc4097aaSchristospatches for integration into NetBSD-current (post 1.2). 1097*bc4097aaSchristos 1098*bc4097aaSchristosadd an option to allow non-IP packets going up/down the stream on Solaris2 1099*bc4097aaSchristosto be dropped. John Bass. 1100*bc4097aaSchristos 1101*bc4097aaSchristos3.1.2beta 21/11/96 - Released 1102*bc4097aaSchristos 1103*bc4097aaSchristosmake ipsend compile on Linux 2.0.24 1104*bc4097aaSchristos 1105*bc4097aaSchristoschanges to TCP kept state algorithm, making it watch state on TCP 1106*bc4097aaSchristosconnections in both directions. Also use the same algorithm for NAT TCP. 1107*bc4097aaSchristos 1108*bc4097aaSchristos-Wall cleanup - Bernd Ernesti 1109*bc4097aaSchristos 1110*bc4097aaSchristosadded "or-block" for "pass .. log or-block" after a suggestion from 1111*bc4097aaSchristosDavid Oppenheim (davido@optimation.com.au) 1112*bc4097aaSchristos 1113*bc4097aaSchristosadded subdirectories for building IP Filter in SunOS5/BSD for different 1114*bc4097aaSchristoscpu architecures 1115*bc4097aaSchristos 1116*bc4097aaSchristosSolaris2 fixes to logging and pre-filtering packet processing - 3.1.1p2 1117*bc4097aaSchristos 1118*bc4097aaSchristosmbuf logging not using mtod(), remove iplbusy - 3.1.1p1 1/11/96 1119*bc4097aaSchristos 1120*bc4097aaSchristos3.1.1 28/10/96 - Released 1121*bc4097aaSchristos 1122*bc4097aaSchristosInstallation script fixes and deinstall scripts for IP Filter on: 1123*bc4097aaSchristosSunOS4/FreeBSD/NetBSD 1124*bc4097aaSchristos 1125*bc4097aaSchristosMan page fixes - Paul Dubois (dubois@primate.wisc.edu) 1126*bc4097aaSchristos 1127*bc4097aaSchristosFix use of SOLARIS macro in ipmon, rewrote ipllog() (again!) 1128*bc4097aaSchristos 1129*bc4097aaSchristosparsing isn't completely case insensitive - David Wilson 1130*bc4097aaSchristos(davidw@optimation.com.au) 1131*bc4097aaSchristos 1132*bc4097aaSchristosRelease ipl_mutex across uiomove() calls 1133*bc4097aaSchristos 1134*bc4097aaSchristosprint entire rule entries out for "ipf -z" when zero'ing per-rule stats. 1135*bc4097aaSchristos 1136*bc4097aaSchristosipfstat returns same output for "hits" in "ipfstat -aio" - Terletsky Slavik 1137*bc4097aaSchristos(ts@polynet.lviv.ua) 1138*bc4097aaSchristos 1139*bc4097aaSchristosNew algorithm for setting timeouts for TCP connection (more closely follow 1140*bc4097aaSchristosTCP FSM) - Pradeep Krishnan (pkrishna@netcom.com) 1141*bc4097aaSchristos 1142*bc4097aaSchristosTrack both window sizes for TCP connections through "keep state". 1143*bc4097aaSchristos 1144*bc4097aaSchristosSolaris2 doesn't like _KERNEL defined in stdargs.h - Jos van Wezel 1145*bc4097aaSchristos(wezel@bio.vu.nl) 1146*bc4097aaSchristos 1147*bc4097aaSchristos3.1.1-beta2 6/10/96 - Released 1148*bc4097aaSchristos 1149*bc4097aaSchristosSolaris2 fastroute/dup-to/to now works 1150*bc4097aaSchristos 1151*bc4097aaSchristosipmon `record' reading rewritten 1152*bc4097aaSchristos 1153*bc4097aaSchristosAdded post-NetBSD1.2 packet filter patches - Mathew Green (mrg@eterna.com.au) 1154*bc4097aaSchristos 1155*bc4097aaSchristosAttempt to use in_proto.c.diff, not "..diffs" for SunOS4 - David Wilson 1156*bc4097aaSchristos(davidw@optimation.com.au) 1157*bc4097aaSchristos 1158*bc4097aaSchristosMichael Ryan (mike@NetworX.ie) reports the following: 1159*bc4097aaSchristos* The Trumpet WinSock under Windows always sends its SYN packet with an ACK 1160*bc4097aaSchristos value of 1, unlike any other implementation I've seen, which would set it 1161*bc4097aaSchristos to zero. The "keep state" feature of IP Filter doesn't work when receiving 1162*bc4097aaSchristos non-zero ACK values on new connection requests. 1163*bc4097aaSchristos* */Makefile install rule doesn't install all the binaries/man pages 1164*bc4097aaSchristos* Make ipnat use "tcp/udp" instead of "tcpudp" 1165*bc4097aaSchristos* Print out "tcp/udp" properly 1166*bc4097aaSchristos* ipnat "portmap tcp" matches "portmap udp" when adding/removing 1167*bc4097aaSchristos* NAT dest. ip# increased by one on mask of 0xffffffff when it shouldn't 1168*bc4097aaSchristos 1169*bc4097aaSchristos3.1.1-beta 1/9/96 - Released 1170*bc4097aaSchristos 1171*bc4097aaSchristosadd better detection of TCP connections closing to TCP state monitoring. 1172*bc4097aaSchristos 1173*bc4097aaSchristosfr_addstate() not called correctly for fragments. "keep state" and 1174*bc4097aaSchristos"keep frag" code don't work together 100% - Songqing Cai 1175*bc4097aaSchristos(songqing_cai@sterling.com) 1176*bc4097aaSchristos 1177*bc4097aaSchristoscall to fr_addstate() incorrect for adding state in combination with keeping 1178*bc4097aaSchristosfragment information - Songqing Cai (songqing_cai@sterling.com) 1179*bc4097aaSchristos 1180*bc4097aaSchristosKFREE() passed fp (incorrect) and not fr (correct) in ip_frag.c - John Hood 1181*bc4097aaSchristos(cgull@smoke.marlboro.vt.us) 1182*bc4097aaSchristos 1183*bc4097aaSchristosmake ipf parser recognise '\\' as a `continued line' marker - Dima Ruban 1184*bc4097aaSchristos(dima@best.net) 1185*bc4097aaSchristos 1186*bc4097aaSchristos3.1.1-alpha 23/8/96 - Released 1187*bc4097aaSchristos 1188*bc4097aaSchristoskernel panic's when ICMP packets go through NAT code 1189*bc4097aaSchristos 1190*bc4097aaSchristosstats aren't zero'd properly with ipf -Z 1191*bc4097aaSchristos 1192*bc4097aaSchristosipnat doesn't show port numbers correctly all the time and also add the 1193*bc4097aaSchristosprotocol (tcp/udp/tcpudp) to rdr output - Carson Gaspar (carson@lehman.com) 1194*bc4097aaSchristos 1195*bc4097aaSchristosfast checksum fixing not 100% - backout patch - Bill Dorsey (dorsey@lila.com) 1196*bc4097aaSchristos 1197*bc4097aaSchristosNetBSD-1.2 patches from - VaX#n8 <vax@linkdead.paranoia.com> 1198*bc4097aaSchristos 1199*bc4097aaSchristosUsage() call error in fils.c - Ajay Shekhawat (ajay@cedar.buffalo.edu) 1200*bc4097aaSchristos 1201*bc4097aaSchristosip_optcopy() staticly defined in ip_output.c in SunOS4 - Nick Hall 1202*bc4097aaSchristos(nrh@tardis.ed.ac.uk) 1203*bc4097aaSchristos 1204*bc4097aaSchristos3.1.0 7/7/96 - Released 1205*bc4097aaSchristos 1206*bc4097aaSchristosReformatted ipnat output to be compatible with it's input, so that 1207*bc4097aaSchristos"ipnat -l | ipnat -rf -" is possible. 1208*bc4097aaSchristos 1209*bc4097aaSchristos3.1.0beta 30/6/96 - Released 1210*bc4097aaSchristos 1211*bc4097aaSchristosNetBSD-1.2 patches from Greg Woods (woods@most.weird.com) 1212*bc4097aaSchristos 1213*bc4097aaSchristoskernel module must not be installed stripped (Solaris2), as created by 1214*bc4097aaSchristos"make package" for Solaris2 - Peter Heimann 1215*bc4097aaSchristos(peter@i3.informatik.rwth-aachen.de) 1216*bc4097aaSchristos 1217*bc4097aaSchristos3.1.0alpha 5/6/96 - Released 1218*bc4097aaSchristos 1219*bc4097aaSchristosinclude examples in package for solaris2 1220*bc4097aaSchristos 1221*bc4097aaSchristospatches for removing an extra ip header checksum (FreeBSD/NetBSD/SunOS) 1222*bc4097aaSchristos 1223*bc4097aaSchristosremoved trailing space from printouts of rules in ipf. 1224*bc4097aaSchristos 1225*bc4097aaSchristosipresend supports the same range of inputs that ipftest does. 1226*bc4097aaSchristos 1227*bc4097aaSchristossending a duplicate copy of a packet to another network devices is now 1228*bc4097aaSchristossupported. ("dup-to") 1229*bc4097aaSchristos 1230*bc4097aaSchristossending a packet to an arbitary interface is now supported, irrespective 1231*bc4097aaSchristosof its actual route, with no ttl decrement. Can also be routed without 1232*bc4097aaSchristosthe ttl being decremented. ("to" and "fastroute"). 1233*bc4097aaSchristos 1234*bc4097aaSchristos"call" option added to support calling a generic function if a packet is 1235*bc4097aaSchristosmatched. 1236*bc4097aaSchristos 1237*bc4097aaSchristosshow all (upto 4) recorded bytes from the interface name in logging from 1238*bc4097aaSchristosipmon. 1239*bc4097aaSchristos 1240*bc4097aaSchristossupport for using unix file permissions for read/write access on the device 1241*bc4097aaSchristosis now in place. 1242*bc4097aaSchristos 1243*bc4097aaSchristosrecursive mutex in nat_new() for Solaris 2.x - Per L. Hagen <per@stibo.dk> 1244*bc4097aaSchristos 1245*bc4097aaSchristosipftest doesn't call initparse() for THISHOST - Catherine Allen 1246*bc4097aaSchristos(cla@connect.com.au) 1247*bc4097aaSchristos 1248*bc4097aaSchristosMan page corrections from Rex Bona (rex@pengo.comsmiths.com.au) 1249*bc4097aaSchristos 1250*bc4097aaSchristos3.0.4 10/4/96 - Released 1251*bc4097aaSchristos 1252*bc4097aaSchristoslooop in `parsing' IP packets with optlen 0 for ip options. 1253*bc4097aaSchristos 1254*bc4097aaSchristosrule number not initialized and resulted in unexpected results for state 1255*bc4097aaSchristosmaching. 1256*bc4097aaSchristos 1257*bc4097aaSchristosoption parsing and printing bugs - Pradeep Krishnan 1258*bc4097aaSchristos 1259*bc4097aaSchristos3.0.4beta 25/3/96 - Released 1260*bc4097aaSchristos 1261*bc4097aaSchristoswouldn't parse "keep flags keep state" correctly. 1262*bc4097aaSchristos 1263*bc4097aaSchristosSunOS4.1.x ip_input.c doesn't recognise all 1s broadcast address - Nigel Verdon 1264*bc4097aaSchristos 1265*bc4097aaSchristospatches for BSDI's BSD/OS 2.1 and libpcap reader on little endian systems 1266*bc4097aaSchristosfrom Thorsten Lockert <tholo@tetherless.com> 1267*bc4097aaSchristos 1268*bc4097aaSchristosb* functions in fil.c on Solaris 2.4 1269*bc4097aaSchristos 1270*bc4097aaSchristos3.0.3 17/3/96 - Released 1271*bc4097aaSchristos 1272*bc4097aaSchristosadded patches to support IP Filter initialisation when compiled into the 1273*bc4097aaSchristoskernel. 1274*bc4097aaSchristos 1275*bc4097aaSchristosadded -x option to ipmon to display hex dumps of logged packets. 1276*bc4097aaSchristos 1277*bc4097aaSchristosadded -H option to ipftest to allow ascii-hex formatted input to specify 1278*bc4097aaSchristosarbitary IP packets. 1279*bc4097aaSchristos 1280*bc4097aaSchristosSending TCP RSTs as a response now work for Solaris2 x86 1281*bc4097aaSchristos 1282*bc4097aaSchristosadd patches to make IP Filter compile into NetBSD kernels properly. 1283*bc4097aaSchristos 1284*bc4097aaSchristospatch to stop SunOS 4.1.x kernels panicing with "data traps". 1285*bc4097aaSchristos 1286*bc4097aaSchristosipfboot script unloads and reloads ipf module on Solaris2 if it is already 1287*bc4097aaSchristosloaded into the kernel. 1288*bc4097aaSchristos 1289*bc4097aaSchristosInstallation of IP Filter as a Solaris2 package is now supported. 1290*bc4097aaSchristos 1291*bc4097aaSchristosMan pages for ipnat.4, ipnat.5 added. 1292*bc4097aaSchristos 1293*bc4097aaSchristosadded some more regression tests and fixed up IP Filter to pass the new tests 1294*bc4097aaSchristos(previous versions failed some of the tests in set 12). 1295*bc4097aaSchristos 1296*bc4097aaSchristosIP option filter processing has changed so that saying "with opt lsrr" will 1297*bc4097aaSchristoscheck only for that one, but not mask out other options, so a packet with 1298*bc4097aaSchristosstrict source routing, along with loose source routing will match all of 1299*bc4097aaSchristos"with opt lsrr", "with opt ssrr" and "with opt lsrr,ssrr". 1300*bc4097aaSchristos 1301*bc4097aaSchristosIPL_NAME needed in ipnat.c - Kelly (kelly@count04.mry.scruznet.com) 1302*bc4097aaSchristos 1303*bc4097aaSchristospatches for clean NetBSD compilation from Bernd Ernesti (bernd@arresum.inka.de) 1304*bc4097aaSchristos 1305*bc4097aaSchristosmake install is incorrect - Julian Briggs (julian@lightwork.co.uk) 1306*bc4097aaSchristos 1307*bc4097aaSchristosstrtol() returns 0x7fffffff for all negative numbers, 1308*bc4097aaSchristosprintfr() generates incorrect output for "opt sec-class *", 1309*bc4097aaSchristoshandling of "not opt xxx opt yyy" incorrect. 1310*bc4097aaSchristos- Minh Tonthat (minht@sbei.com)/Pradeep Krishnan (pradeepk@sbei.com) 1311*bc4097aaSchristos 1312*bc4097aaSchristosm_pullup() called only for input and not output; caused problems 1313*bc4097aaSchristoswith filtering icmp - Nigel Verdon (verdenn@gb.swissbank.com) 1314*bc4097aaSchristos 1315*bc4097aaSchristosparsing problem for "port 1" and NetBSD patches incorrect - 1316*bc4097aaSchristosAndreas Gustafsson (gson@guava.araneus.fi) 1317*bc4097aaSchristos 1318*bc4097aaSchristos3.0.2 4/2/96 - Released 1319*bc4097aaSchristos 1320*bc4097aaSchristosCorrected bug where NAT recalculates checksums for fragments. 1321*bc4097aaSchristos 1322*bc4097aaSchristosmake NAT recalculate UDP checksums (rather than setting them to 0), 1323*bc4097aaSchristosif they're non-zero. 1324*bc4097aaSchristos 1325*bc4097aaSchristosDNS patches - Real Page (Real.Page@Matrox.com) 1326*bc4097aaSchristos 1327*bc4097aaSchristosalteration of checksum recalculations in NAT code and addition of 1328*bc4097aaSchristosredirection with NAT - Mike Neuman 1329*bc4097aaSchristos 1330*bc4097aaSchristoscore dump, if tcp/udp is used with a port number and not service name, 1331*bc4097aaSchristosin ipf - Mike Neuman (mcn@engarde.com) 1332*bc4097aaSchristos 1333*bc4097aaSchristosinitparse() call, missing to prime "<thishost>" hook - Craig Bishop 1334*bc4097aaSchristos 1335*bc4097aaSchristos3.0.1 14/1/96 - Released 1336*bc4097aaSchristos 1337*bc4097aaSchristosmiscellaneous patches for Solaris2 1338*bc4097aaSchristos 1339*bc4097aaSchristos3.0 14/1/96 - Released 1340*bc4097aaSchristos 1341*bc4097aaSchristosPatch included for FDDI, from Richard Ohnemus 1342*bc4097aaSchristos(Richard_Ohnemus@dallas.csd.sterling.com) 1343*bc4097aaSchristos 1344*bc4097aaSchristosCode cleanup for release. 1345*bc4097aaSchristos 1346*bc4097aaSchristos3.0beta4 10/1/96 1347*bc4097aaSchristos 1348*bc4097aaSchristosrecursive mutex in ipfr_slowtimer fixed, reported by Craig Bishop 1349*bc4097aaSchristos 1350*bc4097aaSchristosrecursive mutex in sending TCP RSTs fixed, reported by Tony Becker 1351*bc4097aaSchristos 1352*bc4097aaSchristos3.0beta3 9/1/96 1353*bc4097aaSchristos 1354*bc4097aaSchristosFIxup for Solaris2.5 install and interface name bug in ipftest from 1355*bc4097aaSchristosJulian Briggs (julian@lightwork.co.uk) 1356*bc4097aaSchristos 1357*bc4097aaSchristosByte order patches for ipmon from Tony Becker (tony@mcrsys.com) 1358*bc4097aaSchristos 1359*bc4097aaSchristos3.0beta2 7/1/96 1360*bc4097aaSchristos 1361*bc4097aaSchristosAdded the (somewhat warped) IP accounting as it exists in ipfw on FreeBSD. 1362*bc4097aaSchristosNote, this isn't really what one would call IP account, when compared to 1363*bc4097aaSchristosprocess accounting, sigh. 1364*bc4097aaSchristos 1365*bc4097aaSchristosSplit up ipresend into iptest/ipresend/ipsend 1366*bc4097aaSchristos 1367*bc4097aaSchristosAdded another m_pullup() inside fr_check() for BSD style kernels and 1368*bc4097aaSchristosadded some checks to ipllog() to not log more than is present (for short 1369*bc4097aaSchristospackets). 1370*bc4097aaSchristos 1371*bc4097aaSchristosFixed bug where failed hostname/netname resolution goes undetecte and 1372*bc4097aaSchristosbecomes 0.0.0.0 (any) (reported Guido van Rooij) 1373*bc4097aaSchristos 1374*bc4097aaSchristos3.0beta 11/11/95 - Released 1375*bc4097aaSchristos 1376*bc4097aaSchristosRewrote the way rule testing is done, reducing the number of files needed and 1377*bc4097aaSchristosgenerated. 1378*bc4097aaSchristos 1379*bc4097aaSchristosSIOCIPFFL was incorrectly affected by IPFILTER_LOG (Mathew Green) 1380*bc4097aaSchristos 1381*bc4097aaSchristosPatches from Guido van Rooij to fix sending back TCP RSTs on Net-2/Net-3 1382*bc4097aaSchristosBSD based Unixes (panic'd) 1383*bc4097aaSchristos 1384*bc4097aaSchristosPatches for FreeBSD/i86 ipmon from Riku Kalinen <riku@tequila.nixu.fi> 1385*bc4097aaSchristos(I think someone else already told me about these but they got lost :-/) 1386*bc4097aaSchristos 1387*bc4097aaSchristosChanged Makefile structure to build object files for different operating 1388*bc4097aaSchristossystems in separate directories by default. 1389*bc4097aaSchristos 1390*bc4097aaSchristosBSDI has ef0 for first ethernet interface 1391*bc4097aaSchristos 1392*bc4097aaSchristosAllow for a "not" operator before optional keywords. 1393*bc4097aaSchristos 1394*bc4097aaSchristosThe "rule number" was being incorrectly incremented every time it went through 1395*bc4097aaSchristosthe loop rather than when it matched a rule. 1396*bc4097aaSchristos 1397*bc4097aaSchristos2.8.2 24/10/95 - Released 1398*bc4097aaSchristos 1399*bc4097aaSchristosFixed up problems with "textip" for doing lots of testing. 1400*bc4097aaSchristos 1401*bc4097aaSchristosFixed bug in detection of "short" tcp/ip packets (all reported as being short). 1402*bc4097aaSchristos 1403*bc4097aaSchristosSolaris 2.4 port now works 100%. 1404*bc4097aaSchristos 1405*bc4097aaSchristosMan page errors reported and fixed. 1406*bc4097aaSchristos 1407*bc4097aaSchristosRemoved duplicate entry in etc/services for login on port 49 (Craig Bishop). 1408*bc4097aaSchristos 1409*bc4097aaSchristosFixed ipmon output to put a space after the log-letter. 1410*bc4097aaSchristos 1411*bc4097aaSchristosPatch from Guido van Rooij to fix parsing problem. 1412*bc4097aaSchristos 1413*bc4097aaSchristos2.8.1 15/10/95 - Released 1414*bc4097aaSchristos 1415*bc4097aaSchristosAdded ttl and tos filtering. 1416*bc4097aaSchristos 1417*bc4097aaSchristosPatches for fixing up compilation and port problems (little endian) 1418*bc4097aaSchristosfrom Guido van Rooij <guido@IAEhv.nl>. 1419*bc4097aaSchristos 1420*bc4097aaSchristosMan page problems reported and fixed by Carson Gaspar <carson@lehman.com>. 1421*bc4097aaSchristos 1422*bc4097aaSchristosipsend doesn't compile properly on Solaris2.4 1423*bc4097aaSchristos 1424*bc4097aaSchristosLots of work done for Solaris2.4 to make it MT/MP safe and work. 1425*bc4097aaSchristos 1426*bc4097aaSchristos2.8 15/9/95 - Released 1427*bc4097aaSchristos 1428*bc4097aaSchristosipmon can now send messages to syslogd (-s) and use names instead of 1429*bc4097aaSchristosnumbers (-N). 1430*bc4097aaSchristos 1431*bc4097aaSchristosIP packets are now "compiled" into a structure only containing filterable 1432*bc4097aaSchristosbits. 1433*bc4097aaSchristos 1434*bc4097aaSchristosAdded regression testing in the test/ subdirectory, using a new option 1435*bc4097aaSchristos(-b) with the ipftest program. 1436*bc4097aaSchristos 1437*bc4097aaSchristosAdded "nomatch" return to filter results. These are counted and show 1438*bc4097aaSchristosup in reports from ipfstat. 1439*bc4097aaSchristos 1440*bc4097aaSchristosMoved filter code out of ip_fil.c and into fil.c - there is now only one 1441*bc4097aaSchristosinstance of it in the package. 1442*bc4097aaSchristos 1443*bc4097aaSchristosAdded Solaris 2.4 support. 1444*bc4097aaSchristos 1445*bc4097aaSchristosAdded IPSO basic security option filtering. 1446*bc4097aaSchristos 1447*bc4097aaSchristosAdded name support for filtering on all 19 named IP options. 1448*bc4097aaSchristos 1449*bc4097aaSchristosPatches from Ivan Brawley to log packet contents as well as packet headers. 1450*bc4097aaSchristos 1451*bc4097aaSchristosUpdate for sun/conf.c.diff from Ivan Brawley <ibrawley@awadi.com.AU> 1452*bc4097aaSchristos 1453*bc4097aaSchristosAdded patches for FreeBSD 1, and added two new switches (-E, -D) to ipf, 1454*bc4097aaSchristosalong with a new ioctl, SIOCFRENB. 1455*bc4097aaSchristosFrom: Dieter Dworkin Muller <dworkin@village.org> 1456*bc4097aaSchristos 1457*bc4097aaSchristos2.7.3 31/7.95 - Released 1458*bc4097aaSchristos 1459*bc4097aaSchristosDidn't compile cleanly without IPFILTER_LOG defined (Mathew Green). 1460*bc4097aaSchristos 1461*bc4097aaSchristosipftest now deals with tcpdump3 binary output files (from libpcap) with -P. 1462*bc4097aaSchristos 1463*bc4097aaSchristosBrought ipftest program upto date with actual filter code. 1464*bc4097aaSchristos 1465*bc4097aaSchristosFilter would cause a match to occur when it wasn't meant to if the packet 1466*bc4097aaSchristoshad short headers and was missing portions that should have been there. 1467*bc4097aaSchristosErr, it would rightly not match on them, but their absence caused a match 1468*bc4097aaSchristoswhen it shouldn't have been. 1469*bc4097aaSchristos 1470*bc4097aaSchristos2.7.2 26/7/95 - Released 1471*bc4097aaSchristos 1472*bc4097aaSchristosProblem with filtering just SYN flagged packets reported by 1473*bc4097aaSchristosDieter Dworkin Muller <dworkin@village.org>. To solve this 1474*bc4097aaSchristosproblem, added support for masking TCP flags for comparison "flags X/Y". 1475*bc4097aaSchristos 1476*bc4097aaSchristos2.7.1 9/7/95 - Released 1477*bc4097aaSchristos 1478*bc4097aaSchristosAdded ip_dirbroadcast support for Sun ip_input.c 1479*bc4097aaSchristos 1480*bc4097aaSchristosFixed up the install scripts for FreeBSD/NetBSD to recognise where they are 1481*bc4097aaSchristosbetter. 1482*bc4097aaSchristos 1483*bc4097aaSchristos2.7 7/7/95 - Released 1484*bc4097aaSchristos 1485*bc4097aaSchristosAdded "return-rst" to return TCP RST's to TCP packets. 1486*bc4097aaSchristos 1487*bc4097aaSchristosActually ported it to FreeBSD-i386 2.0.0, so it works there properly now. 1488*bc4097aaSchristos 1489*bc4097aaSchristosAdded insertion of filter rules. Use "@<#>" at the beginning of a filter 1490*bc4097aaSchristosto insert a rule at row #. 1491*bc4097aaSchristos 1492*bc4097aaSchristosFilter keeps track of how many times each rule is matched. 1493*bc4097aaSchristos 1494*bc4097aaSchristosChanged compile time things to match kernel option (IPFILTER_LKM & 1495*bc4097aaSchristosIPFILTER_LOG). 1496*bc4097aaSchristos 1497*bc4097aaSchristosUpdated ip_input.c and ip_output.c with paches for 3.5 Multicast IP. 1498*bc4097aaSchristos(No change required for 3.6) 1499*bc4097aaSchristos 1500*bc4097aaSchristosNow includes TCP fragments which start inside the TCP header as being short. 1501*bc4097aaSchristosAdded counting the number of times each rule is matched. 1502*bc4097aaSchristos 1503*bc4097aaSchristos 1504*bc4097aaSchristos2.6 11/5/95 - Released 1505*bc4097aaSchristos 1506*bc4097aaSchristosAdded -n option to ipf: when supplied, no changes are made to the kernel. 1507*bc4097aaSchristos 1508*bc4097aaSchristosAdded installation scripts for SunOS 4.1.x and NetBSD/FreeBSD/BSDI. 1509*bc4097aaSchristos 1510*bc4097aaSchristosRewrote filtering to use a more generic mask & match procedure for 1511*bc4097aaSchristoschecking if a packet matches a rule. 1512*bc4097aaSchristos 1513*bc4097aaSchristos2.5.2 27/4/95 - Released 1514*bc4097aaSchristos 1515*bc4097aaSchristos"tcp/udp" and a non-initialised pointer caused the "proto" to become 1516*bc4097aaSchristosa `random' value; added "ip#/dotted.mask" notation to the BNF. 1517*bc4097aaSchristosFrom Adam W. Feigin <feigin@iis.ee.ethz.ch> 1518*bc4097aaSchristos 1519*bc4097aaSchristos2.5.1 22/3/95 - Released 1520*bc4097aaSchristos 1521*bc4097aaSchristos"tcp/udp" had a strange effect (undesired) on getserv*() functions, 1522*bc4097aaSchristoscausing protocol/service lookups to fail. Reported by Matthew Green. 1523*bc4097aaSchristos 1524*bc4097aaSchristos2.5 17/3/95 - Released 1525*bc4097aaSchristos 1526*bc4097aaSchristosAdded a new keyword "all" to BNF and parsing of tcpdump/etherfind/snoop 1527*bc4097aaSchristosoutput through the ipftest program. Suggestions from: 1528*bc4097aaSchristosMichael Ciavarella (mikec@phyto.apana.org.au) 1529*bc4097aaSchristos 1530*bc4097aaSchristosConflicts occur when "general" filter rules are used for ports and the 1531*bc4097aaSchristoslack of a "proto" when used with "port" matches other packets when only 1532*bc4097aaSchristosTCP/UDP are implied. 1533*bc4097aaSchristosReported Matthew Green (mrg@fulcom.com.au); 1534*bc4097aaSchristosreported & fixed 6-8/3/95 1535*bc4097aaSchristos 1536*bc4097aaSchristosAdded filtering of short TCP packets using "with short" 28/2/95 1537*bc4097aaSchristos(These can possibly slip by checks for the various flags). Short UDP 1538*bc4097aaSchristosor ICMP are dropped to the floor and logged. 1539*bc4097aaSchristos 1540*bc4097aaSchristosAdded filtering of fragmented packets using "with frag" 24/2/95 1541*bc4097aaSchristos 1542*bc4097aaSchristosPort to NetBSD-current completed 20/2/95, using LKM. 1543*bc4097aaSchristos 1544*bc4097aaSchristosAdded logging of the rule # which caused the logging to happen and the 1545*bc4097aaSchristosinterface on which the packet is currently as suggested by 1546*bc4097aaSchristosAndreas Greulich (greulich@math-stat.unibe.ch) 10/2/95 1547*bc4097aaSchristos 1548*bc4097aaSchristos2.4 9/2/95 - Released 1549*bc4097aaSchristosFixed saving of IP headers in ICMP packets. 1550*bc4097aaSchristos 1551*bc4097aaSchristos2.3 29/1/95 1552*bc4097aaSchristosAdded ipf -F [in|out|all] to flush filter rule sets (SIOCIPFFL). 1553*bc4097aaSchristosFixed iplread() and iplsave() with help from Marc Huber. 1554*bc4097aaSchristos 1555*bc4097aaSchristos2.2 7/1/95 - Released 1556*bc4097aaSchristosAdded code from Marc Huber <huber@fzi.de> to allow it to allocate 1557*bc4097aaSchristosits own major char number dynamically when modload'ing. Fixed up 1558*bc4097aaSchristosuse of <, >, <=, >= and >< for ports. 1559*bc4097aaSchristos 1560*bc4097aaSchristos2.1 21/12/94 - Released 1561*bc4097aaSchristosrepackaged to include the correct ip_output.c and ip_input.c *goof* 1562*bc4097aaSchristos 1563*bc4097aaSchristos2.0 18/12/94 - Released 1564*bc4097aaSchristosadded code to check for port ranges - complete. 1565*bc4097aaSchristosrewrote to work as a loadable kernel module - complete. 1566*bc4097aaSchristos 1567*bc4097aaSchristos1.1 1568*bc4097aaSchristosadded code for ouput filtering as well as input filtering and added support for logging to a simple character device of packet headers. 1569*bc4097aaSchristos 1570*bc4097aaSchristos1.0 22/04/93 - Released 1571*bc4097aaSchristosFirst release cut. 1572