View | Details | Raw Unified | Return to bug 20198
Collapse All | Expand All

(-)sys/netinet/ip_fw.c (+8 lines)
Lines 1215-1222 Link Here
1215
		f->timestamp = time_second;
1215
		f->timestamp = time_second;
1216
1216
1217
		/* Log to console if desired */
1217
		/* Log to console if desired */
1218
#if STATEFUL
1219
		if (((f->fw_flg & IP_FW_F_PRN) || 
1220
		     ((f->fw_flg & IP_FW_F_PRN_S) && q == NULL)) && fw_verbose) {
1221
			ipfw_report(f, ip, rif, oif);
1222
		}
1223
			
1224
#else
1218
		if ((f->fw_flg & IP_FW_F_PRN) && fw_verbose)
1225
		if ((f->fw_flg & IP_FW_F_PRN) && fw_verbose)
1219
			ipfw_report(f, ip, rif, oif);
1226
			ipfw_report(f, ip, rif, oif);
1227
#endif
1220
1228
1221
		/* Take appropriate action */
1229
		/* Take appropriate action */
1222
		switch (f->fw_flg & IP_FW_F_COMMAND) {
1230
		switch (f->fw_flg & IP_FW_F_COMMAND) {
(-)sys/netinet/ip_fw.h (-1 / +2 lines)
Lines 204-211 Link Here
204
#define	IP_FW_BRIDGED	0x04000000	/* only match bridged packets		*/
204
#define	IP_FW_BRIDGED	0x04000000	/* only match bridged packets		*/
205
#define IP_FW_F_KEEP_S	0x08000000	/* keep state	 			*/
205
#define IP_FW_F_KEEP_S	0x08000000	/* keep state	 			*/
206
#define IP_FW_F_CHECK_S	0x10000000	/* check state	 			*/
206
#define IP_FW_F_CHECK_S	0x10000000	/* check state	 			*/
207
#define IP_FW_F_PRN_S	0x20000000	/* Print if this state created		*/
207
208
208
#define IP_FW_F_MASK	0x1FFFFFFF	/* All possible flag bits mask		*/
209
#define IP_FW_F_MASK	0x3FFFFFFF	/* All possible flag bits mask		*/
209
210
210
/*
211
/*
211
 * For backwards compatibility with rules specifying "via iface" but
212
 * For backwards compatibility with rules specifying "via iface" but
(-)sbin/ipfw/ipfw.c (+7 lines)
Lines 385-390 Link Here
385
                else
385
                else
386
                    printf(" keep-state");
386
                    printf(" keep-state");
387
        }
387
        }
388
        if (chain->fw_flg & IP_FW_F_PRN_S) {
389
                printf(" log");
390
        }
388
        /* Direction */
391
        /* Direction */
389
        if (chain->fw_flg & IP_FW_BRIDGED)
392
        if (chain->fw_flg & IP_FW_BRIDGED)
390
                printf(" bridged");
393
                printf(" bridged");
Lines 1759-1764 Link Here
1759
                            av++; ac--;
1762
                            av++; ac--;
1760
                        }
1763
                        }
1761
                        continue;
1764
                        continue;
1765
                }
1766
                if ((rule.fw_flg & IP_FW_F_KEEP_S) && !strncmp(*av,"log",strlen(*av))) { 
1767
                        rule.fw_flg |= IP_FW_F_PRN_S;
1768
                        av++; ac--; continue;
1762
                }
1769
                }
1763
                if (!strncmp(*av,"bridged",strlen(*av))) { 
1770
                if (!strncmp(*av,"bridged",strlen(*av))) { 
1764
                        rule.fw_flg |= IP_FW_BRIDGED;
1771
                        rule.fw_flg |= IP_FW_BRIDGED;

Return to bug 20198