From d5c4d774bc7c55bc861756a62f15b006d06ecdbf Mon Sep 17 00:00:00 2001 From: Wataru ISHIDA Date: Wed, 28 Aug 2013 15:56:47 +0900 Subject: [PATCH] rest_router: avoid assertion when ip_text is 0 Signed-off-by: Wataru ISHIDA Signed-off-by: FUJITA Tomonori --- ryu/app/rest_router.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ryu/app/rest_router.py b/ryu/app/rest_router.py index e0ca1bfd..26443a64 100644 --- a/ryu/app/rest_router.py +++ b/ryu/app/rest_router.py @@ -1831,6 +1831,8 @@ def ipv4_int_to_text(ip_int): def ipv4_text_to_int(ip_text): + if ip_text == 0: + return ip_text assert isinstance(ip_text, str) return struct.unpack('!I', addrconv.ipv4.text_to_bin(ip_text))[0]