[pox-dev] Wildcard tp_src
Murphy McCauley
murphy.mccauley at gmail.com
Thu Nov 28 12:44:53 PST 2013
On Nov 28, 2013, at 6:56 AM, Silvia Fichera <fichera.sil at gmail.com> wrote:
> Hi all,
> I have a tcp traffic with l3_learning and I noticed that when a flow is installed there's also the source TCP port field.
> I wouldn't like have this match.
> I've tried to create the match rule from the packet and wildcard the field tp_src:
>
> actions = []
> actions.append(of.ofp_action_dl_addr.set_dst(mac))
> actions.append(of.ofp_action_output(port = prt))
> match = of.ofp_match.from_packet(packet, inport)
> match.dl_src = None # Wildcard source MAC
> match.tp_src=None
> msg = of.ofp_flow_mod(command=of.OFPFC_ADD,
> idle_timeout=FLOW_IDLE_TIMEOUT,
> hard_timeout=of.OFP_FLOW_PERMANENT,
> buffer_id=event.ofp.buffer_id,
> actions=actions,
> match=of.ofp_match.from_packet(packet,
> inport)))
.. in this line, you're creating a new match which doesn't have your wildcarded fields, and you're using it in the flow mod rather than the one you crafted earlier. You probably want to change this line to something like "match=match)".
Alternately, you could do something like...
msg = of.ofp_flow_mod(command=of.OFPFC_ADD,
idle_timeout=FLOW_IDLE_TIMEOUT,
hard_timeout=of.OFP_FLOW_PERMANENT,
buffer_id=event.ofp.buffer_id,
actions=actions,
match=of.ofp_match.from_packet(packet,
inport))
msg.match.dl_src = None
msg.match.tp_src = None
> event.connection.send(msg.pack())
>
> but it doesn't work.
>
> Have you got any suggestions?
>
> Thanks
>
>
>
> --
> Silvia Fichera
More information about the pox-dev
mailing list