Hi, > when the stat reply comes, it runs successfully with the message that > has ip_src, ip_dst, but it gives Key error with that does'n have them.
When the stat reply comes, please check whether a message has ip_src, ip_dst. Please refer to the following. https://www.mail-archive.com/ryu-devel%40lists.sourceforge.net/msg11388.html Thanks, On 2016年05月19日 06:59, Eman Bany salameh wrote: > Sorry. I forgot to mention that in stat reply I use > stat.match['ipv4_src'] and stat.match['ipv4_dst']. so I gives the error > > 'KeyError: 'ipv4_src > > Regards, > Eman > > > ------------------------------------------------------------------------ > *من:* Eman Bany salameh <[email protected]> > *إلى:* "[email protected]" <[email protected]> > *تاريخ الإرسال:* الخميس 19 مايو، 2016 12:54 ص > *الموضوع:* The Packet does't have IP Source and IP destination > > :Hi > > I want to collect statistics from flows based on IP source and IP > destination. I used this code to add flow. > > if(pkt.get_protocols(ethernet.ethernet) and pkt.get_protocols(ipv4.ipv4)): > (ip4,) = pkt.get_protocols(ipv4.ipv4) > ipsrc = ip4.src > ipdst = ip4.dst > protocol = ip4.proto > match = parser.OFPMatch(in_port=in_port, eth_dst=dst, > eth_src=src, eth_type=ether_types.ETH_TYPE_IP, > ipv4_src=ipsrc, ipv4_dst=ipdst ) > else: > match = parser.OFPMatch(in_port=in_port, eth_dst=dst, > eth_src=src) > print match > > when the stat reply comes, it runs successfully with the message that > has ip_src, ip_dst, but it gives Key error with that does'n have them. > > I sent ICMP messages. I want to know what exactly the packet that does > not have ip_src, ip_dst? So it caused this error? > > > > > ------------------------------------------------------------------------------ > Mobile security can be enabling, not merely restricting. Employees who > bring their own devices (BYOD) to work are irked by the imposition of MDM > restrictions. Mobile Device Manager Plus allows you to control only the > apps on BYO-devices by containerizing them, leaving personal data untouched! > https://ad.doubleclick.net/ddm/clk/304595813;131938128;j > > > > _______________________________________________ > Ryu-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/ryu-devel > ------------------------------------------------------------------------------ Mobile security can be enabling, not merely restricting. Employees who bring their own devices (BYOD) to work are irked by the imposition of MDM restrictions. Mobile Device Manager Plus allows you to control only the apps on BYO-devices by containerizing them, leaving personal data untouched! https://ad.doubleclick.net/ddm/clk/304595813;131938128;j _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
