Hi Jarno, Actually Iam trying to implement source routing using IP headers.
I have rewritten the path in the ip header using actions from the controller. But I need to edit them in the switch as well ... I cannot figure out the code segment for this Could you please guide me?? On Tue, Mar 31, 2015 at 11:41 PM, Jarno Rajahalme <jrajaha...@nicira.com> wrote: > > On Mar 30, 2015, at 10:19 PM, Sree Vidya S D <vidya...@gmail.com> wrote: > > 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?? > > > You should not write to packet headers like that. Instead, you should set > up a flow and use set field action to modify the packet headers. This might > be a good place to start: > > > https://www.opennetworking.org/images/stories/downloads/sdn-resources/onf-specifications/openflow/openflow-spec-v1.4.0.pdf > > Regards, > > Jarno > > > Thanks in advance! > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev > > > -- -- *яєgαя∂ѕ, sreevidya* _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev