[ovs-dev] Editing Ip headers in datapath.c

Sree Vidya S D vidya426 at gmail.com
Tue Mar 31 05:19:19 UTC 2015


I am trying to edit the Ip source and destination address in

void ovs_dp_process_received_packet(struct vport *p, struct sk_buff *skb)

in datapath.c file. I am able to edit mac headers successfully using

memcpy(eth_hdr(skb), str, 2)

// str contains my target data

I tried a similar approach with Ip headers as well

memcpy(ip_hdr(skb), str, 2)

But it isnt giving the expected results, in fact the rewriting isnt getting
executed.

Could anyone please help me with the proper code segment to implement the
above??


Thanks in advance!



More information about the dev mailing list