ofp-util: Actually map vendor codes to IDs correctly.
authorBen Pfaff <blp@nicira.com>
Thu, 4 Nov 2010 17:33:08 +0000 (10:33 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 5 Nov 2010 16:25:37 +0000 (09:25 -0700)
Reported-by: Justin Pettit <jpettit@nicira.com>
lib/ofp-util.c

index 9dc5b2a5013b4a8ec672031fe6e482c2365504f6..c95e7c6d7f9be37f01500af3820db67dbbe8a068 100644 (file)
@@ -829,6 +829,8 @@ vendor_code_to_id(uint8_t code)
 {
     switch (code) {
 #define OFPUTIL_VENDOR(NAME, VENDOR_ID) case NAME: return VENDOR_ID;
+        OFPUTIL_VENDORS
+#undef OFPUTIL_VENDOR
     default:
         return UINT32_MAX;
     }