filter.c (171170) | filter.c (171172) |
---|---|
1/* $OpenBSD: filter.c,v 1.1 2005/12/28 19:07:07 jcs Exp $ */ | 1/* $OpenBSD: filter.c,v 1.1 2005/12/28 19:07:07 jcs Exp $ */ |
2/* $FreeBSD: head/contrib/pf/tftp-proxy/filter.c 171172 2007-07-03 12:30:03Z mlaier $ */ |
|
2 3/* 4 * Copyright (c) 2004, 2005 Camiel Dobbelaar, <cd@sentia.nl> 5 * 6 * Permission to use, copy, modify, and distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * --- 282 unchanged lines hidden (view full) --- 292 * pass quick [log] inet[6] proto tcp \ 293 * from $src to $dst port = $d_port flags S/SAFR keep state 294 * (max 1) [queue qname] 295 */ 296 pfr.rule.action = PF_PASS; 297 pfr.rule.quick = 1; 298 pfr.rule.log = rule_log; 299 pfr.rule.keep_state = 1; | 3 4/* 5 * Copyright (c) 2004, 2005 Camiel Dobbelaar, <cd@sentia.nl> 6 * 7 * Permission to use, copy, modify, and distribute this software for any 8 * purpose with or without fee is hereby granted, provided that the above 9 * copyright notice and this permission notice appear in all copies. 10 * --- 282 unchanged lines hidden (view full) --- 293 * pass quick [log] inet[6] proto tcp \ 294 * from $src to $dst port = $d_port flags S/SAFR keep state 295 * (max 1) [queue qname] 296 */ 297 pfr.rule.action = PF_PASS; 298 pfr.rule.quick = 1; 299 pfr.rule.log = rule_log; 300 pfr.rule.keep_state = 1; |
301#ifdef __FreeBSD__ 302 pfr.rule.flags = (proto == IPPROTO_TCP ? TH_SYN : 0); 303 pfr.rule.flagset = (proto == IPPROTO_TCP ? 304 (TH_SYN|TH_ACK|TH_FIN|TH_RST) : 0); 305#else |
|
300 pfr.rule.flags = (proto == IPPROTO_TCP ? TH_SYN : NULL); 301 pfr.rule.flagset = (proto == IPPROTO_TCP ? 302 (TH_SYN|TH_ACK|TH_FIN|TH_RST) : NULL); | 306 pfr.rule.flags = (proto == IPPROTO_TCP ? TH_SYN : NULL); 307 pfr.rule.flagset = (proto == IPPROTO_TCP ? 308 (TH_SYN|TH_ACK|TH_FIN|TH_RST) : NULL); |
309#endif |
|
303 pfr.rule.max_states = 1; 304 if (qname != NULL) 305 strlcpy(pfr.rule.qname, qname, sizeof pfr.rule.qname); 306 break; 307 case PF_RULESET_NAT: 308 /* 309 * nat inet[6] proto tcp from $src to $dst port $d_port -> $nat 310 */ --- 87 unchanged lines hidden --- | 310 pfr.rule.max_states = 1; 311 if (qname != NULL) 312 strlcpy(pfr.rule.qname, qname, sizeof pfr.rule.qname); 313 break; 314 case PF_RULESET_NAT: 315 /* 316 * nat inet[6] proto tcp from $src to $dst port $d_port -> $nat 317 */ --- 87 unchanged lines hidden --- |