summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorWataru ISHIDA <ishi.wata.da@gmail.com>2013-08-28 15:56:47 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2013-08-29 07:22:09 +0900
commitd5c4d774bc7c55bc861756a62f15b006d06ecdbf (patch)
tree333866112c930c50c5f00a4d9aca78be78c7bba0
parent667e41cccb7d65c04dddc0aac122ab254ee1a08e (diff)
rest_router: avoid assertion when ip_text is 0
Signed-off-by: Wataru ISHIDA <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/app/rest_router.py2
1 files changed, 2 insertions, 0 deletions
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]