Skip to content

Commit

Permalink
packets: Fix typo in reserved multicast Ethernet addresses.
Browse files Browse the repository at this point in the history
The reserved multicast Ethernet addresses begin with 01:80:c2, not
01:08:c2.

Reported-by: Padmanabhan Krishnan <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
Acked-by: Ethan Jackson <[email protected]>
  • Loading branch information
blp committed Jun 5, 2013
1 parent ec9f40d commit f0ac9da
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 23 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ Min Chen [email protected]
Murphy McCauley [email protected]
Mikael Doverhag [email protected]
Niklas Andersson [email protected]
Padmanabhan Krishnan [email protected]
Pankaj Thakkar [email protected]
Paul Ingram [email protected]
Paulo Cravero [email protected]
Expand Down
32 changes: 16 additions & 16 deletions lib/packets.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,22 @@ eth_addr_is_reserved(const uint8_t ea[ETH_ADDR_LEN])

static struct eth_addr_node nodes[] = {
/* STP, IEEE pause frames, and other reserved protocols. */
{ HMAP_NODE_NULL_INITIALIZER, 0x0108c2000000ULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0108c2000001ULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0108c2000002ULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0108c2000003ULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0108c2000004ULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0108c2000005ULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0108c2000006ULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0108c2000007ULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0108c2000008ULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0108c2000009ULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0108c200000aULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0108c200000bULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0108c200000cULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0108c200000dULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0108c200000eULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0108c200000fULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0180c2000000ULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0180c2000001ULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0180c2000002ULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0180c2000003ULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0180c2000004ULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0180c2000005ULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0180c2000006ULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0180c2000007ULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0180c2000008ULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0180c2000009ULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0180c200000aULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0180c200000bULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0180c200000cULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0180c200000dULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0180c200000eULL },
{ HMAP_NODE_NULL_INITIALIZER, 0x0180c200000fULL },

/* Extreme protocols. */
{ HMAP_NODE_NULL_INITIALIZER, 0x00e02b000000ULL }, /* EDP. */
Expand Down
12 changes: 6 additions & 6 deletions tutorial/Tutorial
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ A switch should also not forward IEEE 802.1D Spanning Tree Protocol
packets with reserved multicast protocols:

ovs-ofctl add-flow br0 \
"table=0, dl_dst=01:08:c2:00:00:00/ff:ff:ff:ff:ff:f0, actions=drop"
"table=0, dl_dst=01:80:c2:00:00:00/ff:ff:ff:ff:ff:f0, actions=drop"

We could add flows to drop other protocols, but these demonstrate the
pattern.
Expand Down Expand Up @@ -287,12 +287,12 @@ such a flow would be treated as it goes through the switch.

Try this command:

ovs-appctl ofproto/trace br0 in_port=1,dl_dst=01:08:c2:00:00:05
ovs-appctl ofproto/trace br0 in_port=1,dl_dst=01:80:c2:00:00:05

The output should look something like this:

Flow: metadata=0,in_port=1,vlan_tci=0x0000,dl_src=00:00:00:00:00:00,dl_dst=01:08:c2:00:00:05,dl_type=0x0000
Rule: table=0 cookie=0 dl_dst=01:08:c2:00:00:00/ff:ff:ff:ff:ff:f0
Flow: metadata=0,in_port=1,vlan_tci=0x0000,dl_src=00:00:00:00:00:00,dl_dst=01:80:c2:00:00:05,dl_type=0x0000
Rule: table=0 cookie=0 dl_dst=01:80:c2:00:00:00/ff:ff:ff:ff:ff:f0
OpenFlow actions=drop

Final flow: unchanged
Expand All @@ -315,11 +315,11 @@ interesting here.

Try another command:

ovs-appctl ofproto/trace br0 in_port=1,dl_dst=01:08:c2:00:00:10
ovs-appctl ofproto/trace br0 in_port=1,dl_dst=01:80:c2:00:00:10

The output should be:

Flow: metadata=0,in_port=1,vlan_tci=0x0000,dl_src=00:00:00:00:00:00,dl_dst=01:08:c2:00:00:10,dl_type=0x0000
Flow: metadata=0,in_port=1,vlan_tci=0x0000,dl_src=00:00:00:00:00:00,dl_dst=01:80:c2:00:00:10,dl_type=0x0000
Rule: table=0 cookie=0 priority=0
OpenFlow actions=resubmit(,1)

Expand Down
2 changes: 1 addition & 1 deletion tutorial/t-stage0
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ ovs-ofctl add-flow br0 \
"table=0, dl_src=01:00:00:00:00:00/01:00:00:00:00:00, actions=drop"

ovs-ofctl add-flow br0 \
"table=0, dl_dst=01:08:c2:00:00:00/ff:ff:ff:ff:ff:f0, actions=drop"
"table=0, dl_dst=01:80:c2:00:00:00/ff:ff:ff:ff:ff:f0, actions=drop"

ovs-ofctl add-flow br0 "table=0, priority=0, actions=resubmit(,1)"

0 comments on commit f0ac9da

Please sign in to comment.