summaryrefslogtreecommitdiff
path: root/src/test/test-socket-util.c
diff options
context:
space:
mode:
authorpeoronoob <peoro.noob@gmail.com>2017-01-24 04:26:41 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-01-23 22:26:41 -0500
commita341dfe563bf3be791107a0c98d47f74366c637d (patch)
treebccb578d77e07eb113084cb2c08e9f49d352f963 /src/test/test-socket-util.c
parent7e974e8530e3605db8186bd0c33bf36087e24e22 (diff)
downloadsystemd-a341dfe563bf3be791107a0c98d47f74366c637d.tar.gz
network: accept colons in network interface names, normally used for alias interfaces (#5117)
Diffstat (limited to 'src/test/test-socket-util.c')
-rw-r--r--src/test/test-socket-util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test-socket-util.c b/src/test/test-socket-util.c
index d80613dc84..e1f5fd5084 100644
--- a/src/test/test-socket-util.c
+++ b/src/test/test-socket-util.c
@@ -30,6 +30,7 @@
static void test_ifname_valid(void) {
assert(ifname_valid("foo"));
assert(ifname_valid("eth0"));
+ assert(ifname_valid("eth0:0"));
assert(!ifname_valid("0"));
assert(!ifname_valid("99"));
@@ -44,7 +45,7 @@ static void test_ifname_valid(void) {
assert(!ifname_valid("."));
assert(!ifname_valid(".."));
assert(ifname_valid("foo.bar"));
- assert(!ifname_valid("x:y"));
+ assert(ifname_valid("x:y"));
assert(ifname_valid("xxxxxxxxxxxxxxx"));
assert(!ifname_valid("xxxxxxxxxxxxxxxx"));