Forum Discussion

Ahmed_Galal's avatar
Ahmed_Galal
Icon for Cirrostratus rankCirrostratus
Oct 09, 2019

Irule to insert source IP in UDP payload

Hi All,   can anyone please provide me with iRule that insert Source IP address in UDP payload?
  • PeteWhite's avatar
    Oct 09, 2019
    when CLIENT_ACCEPTED {
      set payloadLength [UDP::payload length]
      set address [IP::client_addr]
      set addressLength [ string length $address ]
      UDP::payload replace $payloadLength $addressLength $address
    }

    You can also use the CLIENT_DATA and SERVER_DATA events and take a look at https://clouddocs.f5.com/api/irules/UDP__payload.html