ovsdb-client: Add "dump" command for dumping entire database contents.
[openvswitch] / ofproto / ofproto.c
index c44762c467f0c4f0153102446114d33dfcc1109b..a431cc78f00295aeb05f82b4ab562bf2fd589b11 100644 (file)
@@ -600,7 +600,7 @@ ofproto_set_rate_limit(struct ofproto *ofproto,
 }
 
 int
-ofproto_set_stp(struct ofproto *ofproto UNUSED, bool enable_stp)
+ofproto_set_stp(struct ofproto *ofproto OVS_UNUSED, bool enable_stp)
 {
     /* XXX */
     if (enable_stp) {
@@ -2795,11 +2795,13 @@ add_flow(struct ofproto *p, struct ofconn *ofconn,
                        ntohs(ofm->hard_timeout));
     cls_rule_from_match(&rule->cr, &ofm->match, ntohs(ofm->priority));
 
-    packet = NULL;
     error = 0;
     if (ofm->buffer_id != htonl(UINT32_MAX)) {
         error = pktbuf_retrieve(ofconn->pktbuf, ntohl(ofm->buffer_id),
                                 &packet, &in_port);
+    } else {
+        packet = NULL;
+        in_port = UINT16_MAX;
     }
 
     rule_insert(p, rule, packet, in_port);
@@ -3458,10 +3460,7 @@ static uint64_t
 pick_fallback_dpid(void)
 {
     uint8_t ea[ETH_ADDR_LEN];
-    eth_addr_random(ea);
-    ea[0] = 0x00;               /* Set Nicira OUI. */
-    ea[1] = 0x23;
-    ea[2] = 0x20;
+    eth_addr_nicira_random(ea);
     return eth_addr_to_uint64(ea);
 }
 \f