Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153151084
D17373.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D17373.id.diff
View Options
Index: head/sbin/ipfw/ipfw2.c
===================================================================
--- head/sbin/ipfw/ipfw2.c
+++ head/sbin/ipfw/ipfw2.c
@@ -2207,6 +2207,12 @@
*/
if (co->comment_only != 0)
goto end;
+
+ if (rule->flags & IPFW_RULE_JUSTOPTS) {
+ state.flags |= HAVE_PROTO | HAVE_SRCIP | HAVE_DSTIP;
+ goto justopts;
+ }
+
print_proto(bp, fo, &state);
/* Print source */
@@ -2219,6 +2225,7 @@
print_address(bp, fo, &state, dst_opcodes, nitems(dst_opcodes),
O_IP_DSTPORT, HAVE_DSTIP);
+justopts:
/* Print the rest of options */
while (print_opcode(bp, fo, &state, -1))
;
@@ -4340,8 +4347,10 @@
}
} else if (first_cmd != cmd) {
errx(EX_DATAERR, "invalid protocol ``%s''", *av);
- } else
+ } else {
+ rule->flags |= IPFW_RULE_JUSTOPTS;
goto read_options;
+ }
OR_BLOCK(get_proto);
/*
Index: head/sys/netinet/ip_fw.h
===================================================================
--- head/sys/netinet/ip_fw.h
+++ head/sys/netinet/ip_fw.h
@@ -615,6 +615,7 @@
ipfw_insn cmd[1]; /* storage for commands */
};
#define IPFW_RULE_NOOPT 0x01 /* Has no options in body */
+#define IPFW_RULE_JUSTOPTS 0x02 /* new format of rule body */
/* Unaligned version */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 20, 12:05 PM (3 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31838196
Default Alt Text
D17373.id.diff (1 KB)
Attached To
Mode
D17373: Add ability to show ipfw rules, that were added using new rule format (without generic rule body, just rule options)
Attached
Detach File
Event Timeline
Log In to Comment