FreeBSD Bugzilla – Attachment 9986 Details for
Bug 20198
log setup of dynamic rules for ipfw
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.08 KB, created by
Stephen Montgomery-Smith
on 2000-07-26 19:20:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Stephen Montgomery-Smith
Created:
2000-07-26 19:20:00 UTC
Size:
2.08 KB
patch
obsolete
>diff -ru /sys/netinet/ip_fw.c sys/netinet/ip_fw.c >--- /sys/netinet/ip_fw.c Sat Jul 15 19:25:45 2000 >+++ sys/netinet/ip_fw.c Wed Jul 26 12:21:45 2000 >@@ -1215,8 +1215,16 @@ > f->timestamp = time_second; > > /* Log to console if desired */ >+#if STATEFUL >+ if (((f->fw_flg & IP_FW_F_PRN) || >+ ((f->fw_flg & IP_FW_F_PRN_S) && q == NULL)) && fw_verbose) { >+ ipfw_report(f, ip, rif, oif); >+ } >+ >+#else > if ((f->fw_flg & IP_FW_F_PRN) && fw_verbose) > ipfw_report(f, ip, rif, oif); >+#endif > > /* Take appropriate action */ > switch (f->fw_flg & IP_FW_F_COMMAND) { >diff -ru /sys/netinet/ip_fw.h sys/netinet/ip_fw.h >--- /sys/netinet/ip_fw.h Sat Jul 15 19:25:45 2000 >+++ sys/netinet/ip_fw.h Tue Jul 25 23:12:33 2000 >@@ -204,8 +204,9 @@ > #define IP_FW_BRIDGED 0x04000000 /* only match bridged packets */ > #define IP_FW_F_KEEP_S 0x08000000 /* keep state */ > #define IP_FW_F_CHECK_S 0x10000000 /* check state */ >+#define IP_FW_F_PRN_S 0x20000000 /* Print if this state created */ > >-#define IP_FW_F_MASK 0x1FFFFFFF /* All possible flag bits mask */ >+#define IP_FW_F_MASK 0x3FFFFFFF /* All possible flag bits mask */ > > /* > * For backwards compatibility with rules specifying "via iface" but >diff -ru /usr/src/sbin/ipfw/ipfw.c sbin/ipfw/ipfw.c >--- /usr/src/sbin/ipfw/ipfw.c Sat Jul 15 19:25:50 2000 >+++ sbin/ipfw/ipfw.c Wed Jul 26 12:48:45 2000 >@@ -385,6 +385,9 @@ > else > printf(" keep-state"); > } >+ if (chain->fw_flg & IP_FW_F_PRN_S) { >+ printf(" log"); >+ } > /* Direction */ > if (chain->fw_flg & IP_FW_BRIDGED) > printf(" bridged"); >@@ -1759,6 +1762,10 @@ > av++; ac--; > } > continue; >+ } >+ if ((rule.fw_flg & IP_FW_F_KEEP_S) && !strncmp(*av,"log",strlen(*av))) { >+ rule.fw_flg |= IP_FW_F_PRN_S; >+ av++; ac--; continue; > } > if (!strncmp(*av,"bridged",strlen(*av))) { > rule.fw_flg |= IP_FW_BRIDGED;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 20198
: 9986 |
9987