\fBof\fIn\fR network device (see \fBCONTACTING THE CONTROLLER\fR in
\fBsecchan\fR(8) for information on the \fBof\fIn\fR network device).
+.IP \fBdrop\fR
+Discards the packet, so no further processing or forwarding takes place.
+If a drop action is used, no other actions may be specified.
+
.IP \fBmod_vlan_vid\fR:\fIvlan_vid\fR
Modifies the VLAN id on a packet. The VLAN tag is added or modified
as necessary to match the value specified. If the VLAN tag is added,
{
char *act, *arg;
char *saveptr = NULL;
+ bool drop = false;
for (act = strtok_r(str, ", \t\r\n", &saveptr); act;
act = strtok_r(NULL, ", \t\r\n", &saveptr))
{
uint16_t port;
+ if (drop) {
+ ofp_fatal(0, "Drop actions must not be followed by other actions");
+ }
+
/* Arguments are separated by colons */
arg = strchr(act, ':');
if (arg) {
put_dl_addr_action(b, OFPAT_SET_DL_DST, arg);
} else if (!strcasecmp(act, "output")) {
put_output_action(b, str_to_u32(arg));
+ } else if (!strcasecmp(act, "drop")) {
+ /* A drop action in OpenFlow occurs by just not setting
+ * an action. */
+ drop=true;
#ifdef SUPPORT_SNAT
} else if (!strcasecmp(act, "nat")) {
struct nx_action_snat *sa;