diff options
author | Ethan Jackson <ethan@nicira.com> | 2011-11-21 10:59:41 -0800 |
---|---|---|
committer | Ethan Jackson <ethan@nicira.com> | 2011-11-21 11:07:48 -0800 |
commit | 451256f6c83873a6f636186d109baeb24f102c0a (patch) | |
tree | 81a03cf35110d7f04f487c7bf202a7476e9a2919 /utilities | |
parent | da83319670f1697b1354fc8cb213d682cf43df83 (diff) |
ovs-ofctl: Support OFPPC_NO_FWD.
Currently, there is no way to disable forwarding on an OpenFlow
port from the command line. This patch adds support for the
OFPPC_NO_FWD flag to the ovs-ofctl utility.
Diffstat (limited to 'utilities')
-rw-r--r-- | utilities/ovs-ofctl.8.in | 7 | ||||
-rw-r--r-- | utilities/ovs-ofctl.c | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in index 531fd9c9..17b445d5 100644 --- a/utilities/ovs-ofctl.8.in +++ b/utilities/ovs-ofctl.8.in @@ -81,6 +81,13 @@ system. Disables the interface. This is equivalent to ``ifconfig down'' on a Unix system. . +.IP \fBforward\fR +Allows forwarding of traffic on this interface. This is the default posture +for all ports. +. +.IP \fBnoforward\fR +Disallows forwarding of traffic on this interface. +. .IP \fBflood\fR When a \fIflood\fR action is specified, traffic will be sent out this interface. This is the default posture for monitored ports. diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index ff52cb22..7b2b1860 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl.c @@ -839,6 +839,11 @@ do_mod_port(int argc OVS_UNUSED, char *argv[]) } else if (!strcasecmp(argv[3], "noflood")) { opm->mask |= htonl(OFPPC_NO_FLOOD); opm->config |= htonl(OFPPC_NO_FLOOD); + } else if (!strcasecmp(argv[3], "forward")) { + opm->mask |= htonl(OFPPC_NO_FWD); + } else if (!strcasecmp(argv[3], "noforward")) { + opm->mask |= htonl(OFPPC_NO_FWD); + opm->config |= htonl(OFPPC_NO_FWD); } else { ovs_fatal(0, "unknown mod-port command '%s'", argv[3]); } |