mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-06 21:51:37 +00:00
sd-rtnl: never set serial to 0
In the unlikely event that we wrap the counter, skip 0 as this is used
for broadcasts.
Suggested by Richard Maw.
(cherry picked from commit 913b0eef1a)
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
4bbc153799
commit
12e474fdf3
@@ -262,7 +262,7 @@ static void rtnl_seal_message(sd_rtnl *rtnl, sd_rtnl_message *m) {
|
||||
assert(m);
|
||||
assert(m->hdr);
|
||||
|
||||
m->hdr->nlmsg_seq = rtnl->serial++;
|
||||
m->hdr->nlmsg_seq = rtnl->serial++ ? : rtnl->serial++;
|
||||
|
||||
rtnl_message_seal(m);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user