Fujita-san,

src_port and dst_port cannot be empty either.

Best Regards!
Arne Goetje (???)



From:   FUJITA Tomonori <fujita.tomon...@lab.ntt.co.jp>
To:     takahashi.mino...@gmail.com, 
Cc:     arne_goe...@accton.com, ryu-devel@lists.sourceforge.net
Date:   07/28/2014 08:16 PM
Subject:        Re: [Ryu-devel] sw test tool: Meter tests send buggy 
packets



On Thu, 17 Jul 2014 18:18:32 +0900
Minoru TAKAHASHI <takahashi.mino...@gmail.com> wrote:

> (2014年07月17日 17:41), FUJITA Tomonori wrote:
>> On Thu, 17 Jul 2014 17:32:17 +0900
>> Minoru TAKAHASHI <takahashi.mino...@gmail.com> wrote:
>> 
>>> Hi,thank you for reporting again.
>>> If possible, please send me a log of the test results.
>> 
>> 
https://github.com/osrg/ryu/blob/master/ryu/tests/switch/of13/meter/01_DROP_00_KBPS_00_1M.json#L60

>> 
>> Meter test creates an ip packet only with 'proto' argument, which
>> use 0.0.0.0 for both dst and src. You have to specify both src and
>> dst.
> 
> I understand.I will make a patch. 

How about the following? The default value (0.0.0.0) is an invalid
address so I guess that we can change it safely.

diff --git a/ryu/lib/packet/ipv4.py b/ryu/lib/packet/ipv4.py
index a252c70..4da0bcc 100644
--- a/ryu/lib/packet/ipv4.py
+++ b/ryu/lib/packet/ipv4.py
@@ -79,8 +79,8 @@ class ipv4(packet_base.PacketBase):
     def __init__(self, version=4, header_length=5, tos=0,
                  total_length=0, identification=0, flags=0,
                  offset=0, ttl=255, proto=0, csum=0,
-                 src='0.0.0.0',
-                 dst='0.0.0.0',
+                 src='10.0.0.1',
+                 dst='10.0.0.2',
                  option=None):
         super(ipv4, self).__init__()
         self.version = version




------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to