summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>2012-09-26 10:11:16 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-09-28 06:39:30 (GMT)
commitfc6c9684cc5a63c3d03aed3df201e89b4257f368 (patch)
treed4eabfd3adfce909ab362c0ec482021f3f7eea47 /test
parent48987a5bb9c608b5189cd4c4ae19128c1f82b0ea (diff)
downloadconnman-fc6c9684cc5a63c3d03aed3df201e89b4257f368.zip
connman-fc6c9684cc5a63c3d03aed3df201e89b4257f368.tar.gz
connman-fc6c9684cc5a63c3d03aed3df201e89b4257f368.tar.bz2
test: Fix PrefixLength setting in set-ipv6-method
Diffstat (limited to 'test')
-rwxr-xr-xtest/set-ipv6-method5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/set-ipv6-method b/test/set-ipv6-method
index 4f2de09..eb1f1b5 100755
--- a/test/set-ipv6-method
+++ b/test/set-ipv6-method
@@ -6,6 +6,9 @@ import dbus
def make_variant(string):
return dbus.String(string, variant_level=1)
+def make_byte_variant(string):
+ return dbus.Byte(int(string), variant_level=1)
+
def print_usage():
print "Usage: %s <service> off|manual|auto [<address> [prefixlen] [gateway]] [<privacy>]" % (sys.argv[0])
@@ -30,7 +33,7 @@ else:
if (len(sys.argv) > 3):
ipv6_configuration["Address"] = make_variant(sys.argv[3])
if (len(sys.argv) > 4):
- ipv6_configuration["PrefixLength"] = make_variant(sys.argv[4])
+ ipv6_configuration["PrefixLength"] = make_byte_variant(sys.argv[4])
if (len(sys.argv) > 5):
ipv6_configuration["Gateway"] = make_variant(sys.argv[5])