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

CLI vs VAT ip address byte order

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • None
    • None
    • None
    • None

      VAT and CLI use different byte orders when adding and reading interface IP addresses.

      Test:
      Start VPP
      ~/Projects/vpp/build-root$ telnet 0 5002
      vpp# set interface ip address local0 1.2.3.4/24
      vpp# show int address
      GigabitEthernet0/8/0 (dn):
      local0 (dn):
      1.2.3.4/24
      pg/stream-0 (dn):
      pg/stream-1 (dn):
      pg/stream-2 (dn):
      pg/stream-3 (dn):

      Now reading with VAT:
      ~/Projects/$ sudo vpp_api_test json
      vat# ip_address_dump ipv4 sw_if_index 0

      [

      { "ip": "4.3.2.1", "prefix_length": 24 }

      ]

      So VAT and CLI treat the bytes differently. Which one is correct ?

            mgsmith Matthew Smith
            mmarsale Maroš Maršalek
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: