"Alternate approach to MPLS" adds an new way of formatting
the MPLS label stack in the case where more than one LSE is present.
It seems to me that this format should use host byte order rather
than network byte order.

Signed-off-by: Simon Horman <[email protected]>
---
 lib/odp-util.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/odp-util.c b/lib/odp-util.c
index 84272fa..9bf53c6 100644
--- a/lib/odp-util.c
+++ b/lib/odp-util.c
@@ -372,9 +372,9 @@ format_mpls(struct ds *ds, const struct ovs_key_mpls 
*mpls_key,
         int i;
 
         for (i = 0; i < n; i++) {
-            ds_put_format(ds, "lse%d=%#"PRIx32, i, mpls_key[i].mpls_lse);
+            ds_put_format(ds, "lse%d=%#"PRIx32, i, 
ntohl(mpls_key[i].mpls_lse));
             if (mpls_mask) {
-                ds_put_format(ds, "%#"PRIx32, mpls_mask[i].mpls_lse);
+                ds_put_format(ds, "%#"PRIx32, ntohl(mpls_mask[i].mpls_lse));
             }
             ds_put_char(ds, ',');
         }
-- 
1.8.4

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to