Skip to content

Commit

Permalink
libopenflow: Update _wire_wildcards docstring
Browse files Browse the repository at this point in the history
In particular, this points out that the issue is relevant for OpenFlow
1.0 as well (made clear in 1.0.1).
  • Loading branch information
MurphyMc committed Sep 15, 2013
1 parent 5813c34 commit 7e7005f
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions pox/openflow/libopenflow_01.py
Original file line number Diff line number Diff line change
Expand Up @@ -1224,17 +1224,22 @@ def _normalize_wildcards (self, wildcards):

def _wire_wildcards (self, wildcards):
"""
Normalize the wildcard bits to the openflow wire representation.
Normalize the wildcard bits
Note this atrocity from the OF1.1 spec:
Protocol-specific fields within ofp_match will be ignored within
a single table when the corresponding protocol is not specified in the
match. The IP header and transport header fields
will be ignored unless the Ethertype is specified as either IPv4 or
ARP. The tp_src and tp_dst fields will be ignored unless the network
protocol specified is as TCP, UDP or SCTP. Fields that are ignored
don't need to be wildcarded and should be set to 0.
Note the following from the OpenFlow 1.1 spec:
Protocol-specific fields within ofp_match will be ignored within
a single table when the corresponding protocol is not specified in the
match. The IP header and transport header fields
will be ignored unless the Ethertype is specified as either IPv4 or
ARP. The tp_src and tp_dst fields will be ignored unless the network
protocol specified is as TCP, UDP or SCTP. Fields that are ignored
don't need to be wildcarded and should be set to 0.
OpenFlow 1.0.1 Section 3.4 actually has an improved version of the above,
but we won't quote it here because it seems to have a restrictive license.
"""
#TODO: Set the masked fields to 0.
if self.dl_type == 0x0800:
# IP
if self.nw_proto not in (1,6,17):
Expand Down

0 comments on commit 7e7005f

Please sign in to comment.