On Tue, Sep 23, 2014 at 10:02:10AM +0100, Mounir Azizi wrote: > Dear Ryu Experts, > > I'm trying to inject an "echo" mpls packet using ryu, so I created an MPLS > packet using this code : > > f = EchoRyu() > f.timestamp = int(time.time()*1000 - start_time) > eth_MPLS = ether.ETH_TYPE_MPLS > parser = datapath.ofproto_parser > ofproto = datapath.ofproto > actions = [parser.OFPActionPushMpls(eth_MPLS)] > src = "00:00:00:00:00:01" > dst = "00:01:00:00:00:01" > in_port = ofproto.OFPP_CONTROLLER > pkt = packet.Packet() > pkt.add_protocol(ethernet.ethernet(ethertype=ether.ETH_TYPE_MPLS, > dst=dst, src=src)) > pkt.add_protocol(mpls.mpls(label=50, exp=0, bsb=1, ttl=255)) > pkt.payload = f > pkt.serialize() > out = parser.OFPPacketOut(datapath=datapath, buffer_id=0xffffffff, > in_port=in_port, actions=actions, data=pkt.data) > datapath.send_msg(out) > > but my packet seems to be malformed accordind to wireshark trace: > > No. Time Source Destination Protocol > Length Info > 64 7.006662000 192.168.1.200 192.168.1.200 OpenFlow > 118 51241 > > Frame 64: 118 bytes on wire (944 bits), 118 bytes captured (944 bits) on > interface 0 > Linux cooked capture > Internet Protocol Version 4, Src: 192.168.1.200 (192.168.1.200), Dst: > 192.168.1.200 (192.168.1.200) > Transmission Control Protocol, Src Port: 6633 (6633), Dst Port: 51241 > (51241), Seq: 99, Ack: 705, Len: 50 > OpenFlow 1.3 > Version: 1.3 (0x04) > Type: OFPT_PACKET_OUT (13) > Length: 50 > Transaction ID: 2770032434 > Buffer ID: OFP_NO_BUFFER (0xffffffff) > In port: OFPP_CONTROLLER (0xfffffffd) > Actions length: 8 > Pad: 000000000000 > Action > Type: OFPAT_PUSH_MPLS (19) > Length: 8 > Ethertype: MPLS label switched packet (0x8847) > Pad: 0000 > Data > Ethernet II, Src: 00:00:00_00:00:01 (00:00:00:00:00:01), Dst: > EquipTra_00:00:01 (00:01:00:00:00:01) > Destination: EquipTra_00:00:01 (00:01:00:00:00:01) > Source: 00:00:00_00:00:01 (00:00:00:00:00:01) > Type: MPLS label switched packet (0x8847) > MultiProtocol Label Switching Header, Label: 50, Exp: 0, S: 1, TTL: > 255 > [Malformed Packet: MPLS] > [Expert Info (Error/Malformed): Malformed Packet (Exception > occurred)] > [Malformed Packet (Exception occurred)] > [Severity level: Error] > [Group: Malformed] > > Can someone please firgure out if I'm missing something here ?
Is it possible to provide a hex-dump of the packet? The entire packet, including the bits after the MPLS LSE. ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
