[systemd-commits] src/libsystemd
Tom Gundersen
tomegun at kemper.freedesktop.org
Fri Mar 13 07:59:38 PDT 2015
src/libsystemd/sd-rtnl/sd-rtnl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 913b0eef1a01e0c78f0453b0174e75d5caae1023
Author: Tom Gundersen <teg at jklm.no>
Date: Fri Mar 13 15:49:07 2015 +0100
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.
diff --git a/src/libsystemd/sd-rtnl/sd-rtnl.c b/src/libsystemd/sd-rtnl/sd-rtnl.c
index 268d366..f483af9 100644
--- a/src/libsystemd/sd-rtnl/sd-rtnl.c
+++ b/src/libsystemd/sd-rtnl/sd-rtnl.c
@@ -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);
More information about the systemd-commits
mailing list