Uploaded image for project: 'vpp'
  1. vpp
  2. VPP-1081

Incorect endianess for next-hop of DX4 function

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • 18.07
    • 18.01
    • SR
    • None

      When you fill next hop address with v4 address while using DX4 function, it parses it from last 4 bytes, not first 4

      if you use

      new byte[]{X,X,X,X,0,0,0,0,0,0,0,0,0,0,0,0} - It writes 0.0.0.0

       

      if you use 

      new byte[]{0,0,0,0,0,0,0,0,0,0,0,0,X,X,X,X} It writes address correctly.

       

      From experience of other vpp apis, in general ,if there is an array used both for v4 and v6 addresses, v4 address is put in first 4 bytes, not last.

       

      For ex: one_add_del_map_resolver uses this ordering of bytes(and many others)

            pcamaril Pablo Camarillo
            jsrnicek_cisco Jan Srnicek
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: