[PATCH] Fixes ARP requests and replies for in-band mode

Andreas Brinner andreas at brinner.de
Wed Jul 10 13:02:24 UTC 2013


Rules (d) and (e) for in-band control need to allow ARP requests to and
ARP replies from the next hop. Only then an OpenFlow switch on the other
side of the Open vSwitch can find out the controller's MAC address.
---
 DESIGN            |    4 ++--
 ofproto/in-band.c |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/DESIGN b/DESIGN
index d36b025..adbe056 100644
--- a/DESIGN
+++ b/DESIGN
@@ -716,8 +716,8 @@ In-band also sets up the following rules for each
unique next-hop MAC
 address for the remotes' IPs (the "next hop" is either the remote
 itself, if it is on a local subnet, or the gateway to reach the remote):

-   (d) ARP replies to the next hop's MAC address.
-   (e) ARP requests from the next hop's MAC address.
+   (d) ARP requests to the next hop's MAC address.
+   (e) ARP replies from the next hop's MAC address.

 In-band also sets up the following rules for each unique remote IP address:

diff --git a/ofproto/in-band.c b/ofproto/in-band.c
index 265dcb2..a880cc5 100644
--- a/ofproto/in-band.c
+++ b/ofproto/in-band.c
@@ -301,18 +301,18 @@ update_rules(struct in_band *ib)
             continue;
         }

-        /* (d) Allow ARP replies to the next hop's MAC address. */
+        /* (d) Allow ARP requests to the next hop's MAC address. */
         match_init_catchall(&match);
         match_set_dl_type(&match, htons(ETH_TYPE_ARP));
         match_set_dl_dst(&match, remote_mac);
-        match_set_nw_proto(&match, ARP_OP_REPLY);
+        match_set_nw_proto(&match, ARP_OP_REQUEST);
         add_rule(ib, &match, IBR_TO_NEXT_HOP_ARP);

-        /* (e) Allow ARP requests from the next hop's MAC address. */
+        /* (e) Allow ARP replies from the next hop's MAC address. */
         match_init_catchall(&match);
         match_set_dl_type(&match, htons(ETH_TYPE_ARP));
         match_set_dl_src(&match, remote_mac);
-        match_set_nw_proto(&match, ARP_OP_REQUEST);
+        match_set_nw_proto(&match, ARP_OP_REPLY);
         add_rule(ib, &match, IBR_FROM_NEXT_HOP_ARP);
     }

-- 
1.7.10.4





More information about the dev mailing list