summaryrefslogtreecommitdiff
path: root/src/libsystemd-network
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2015-01-20 19:36:00 +0200
committerPatrik Flykt <patrik.flykt@linux.intel.com>2015-01-27 09:35:24 +0200
commit8d7f2c6a47db4bdb753b9d523d3bcb1105827991 (patch)
treef14ad5f4e307e2a4c6e1999ad45c986a997164e4 /src/libsystemd-network
parentd14b5bc621fc1fa57ef0db3ccba6957efed8e7d4 (diff)
test-icmp6-rs: Add trivial test case for an MTU that is not present
Diffstat (limited to 'src/libsystemd-network')
-rw-r--r--src/libsystemd-network/test-icmp6-rs.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/libsystemd-network/test-icmp6-rs.c b/src/libsystemd-network/test-icmp6-rs.c
index be64d334fa..9d50c57927 100644
--- a/src/libsystemd-network/test-icmp6-rs.c
+++ b/src/libsystemd-network/test-icmp6-rs.c
@@ -93,6 +93,8 @@ static void test_rs_done(sd_icmp6_nd *nd, int event, void *userdata) {
{ ND_RA_FLAG_OTHER, ICMP6_EVENT_ROUTER_ADVERTISMENT_OTHER },
{ ND_RA_FLAG_MANAGED, ICMP6_EVENT_ROUTER_ADVERTISMENT_MANAGED }
};
+ uint32_t mtu;
+
assert_se(nd);
assert_se(event == flag_event[idx].event);
@@ -101,10 +103,14 @@ static void test_rs_done(sd_icmp6_nd *nd, int event, void *userdata) {
if (verbose)
printf(" got event %d\n", event);
- if (idx < 3)
+ if (idx < 3) {
send_ra(flag_event[idx].flag);
- else
- sd_event_exit(e, 0);
+ return;
+ }
+
+ assert_se(sd_icmp6_ra_get_mtu(nd, &mtu) == -ENOMSG);
+
+ sd_event_exit(e, 0);
}
static void test_rs(sd_event *e) {