diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-02-18 07:23:09 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-04-16 04:18:33 +0200 |
commit | 19f3cc86a04ff7870dea3ac97fcbf624db3330fe (patch) | |
tree | 101ce6448c83d535a1d3393646ad9f20bcc57cb1 /src/libsystemd-network/test-ndisc-ra.c | |
parent | Merge pull request #32267 from yuwata/sd-ndisc-router-solicit (diff) | |
download | systemd-19f3cc86a04ff7870dea3ac97fcbf624db3330fe.tar.xz systemd-19f3cc86a04ff7870dea3ac97fcbf624db3330fe.zip |
sd-radv: set only basic information on stop
There are many possible reasons to stop the service;
tentative reboot of the service or the system, the router may be
revoked, and so on.
And, each situations, the availability of the previously announced
options e.g. prefixes, DNSSL and so on is not clear.
So, let's announce only the clear information, that is, the router
lifetime is zero. which indicates that the router will be invalidated
(regardless tentative or not).
Diffstat (limited to 'src/libsystemd-network/test-ndisc-ra.c')
-rw-r--r-- | src/libsystemd-network/test-ndisc-ra.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libsystemd-network/test-ndisc-ra.c b/src/libsystemd-network/test-ndisc-ra.c index c5f10cc795..76f4d7ba3f 100644 --- a/src/libsystemd-network/test-ndisc-ra.c +++ b/src/libsystemd-network/test-ndisc-ra.c @@ -294,8 +294,13 @@ static void verify_message(const uint8_t *buf, size_t len) { /* verify only up to known options, rest is not yet implemented */ for (size_t i = 0, m = MIN(len, sizeof(advertisement)); i < m; i++) { if (test_stopped) + /* on stop, many header fields are zero */ switch (i) { - case 6 ... 7: /* router lifetime must be zero on stop. */ + case 4: /* hop limit */ + case 5: /* flags */ + case 6 ... 7: /* router lifetime */ + case 8 ... 11: /* reachable time */ + case 12 ... 15: /* retrans timer */ assert_se(buf[i] == 0); continue; } |