teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0100-sd-rtnl-never-set-serial-to-0.patch

923a60
From fc9d7a3891dc293cccd4e127cfb1e2355f4e93da Mon Sep 17 00:00:00 2001
923a60
From: Tom Gundersen <teg@jklm.no>
923a60
Date: Fri, 13 Mar 2015 15:49:07 +0100
923a60
Subject: [PATCH] sd-rtnl: never set serial to 0
923a60
923a60
In the unlikely event that we wrap the counter, skip 0 as this is used
923a60
for broadcasts.
923a60
923a60
Suggested by Richard Maw.
923a60
923a60
(cherry picked from commit 913b0eef1a01e0c78f0453b0174e75d5caae1023)
923a60
---
923a60
 src/libsystemd/sd-rtnl/sd-rtnl.c | 2 +-
923a60
 1 file changed, 1 insertion(+), 1 deletion(-)
923a60
923a60
diff --git a/src/libsystemd/sd-rtnl/sd-rtnl.c b/src/libsystemd/sd-rtnl/sd-rtnl.c
923a60
index 7cdcc5d96a..5df39e1177 100644
923a60
--- a/src/libsystemd/sd-rtnl/sd-rtnl.c
923a60
+++ b/src/libsystemd/sd-rtnl/sd-rtnl.c
923a60
@@ -262,7 +262,7 @@ static void rtnl_seal_message(sd_rtnl *rtnl, sd_rtnl_message *m) {
923a60
         assert(m);
923a60
         assert(m->hdr);
923a60
 
923a60
-        m->hdr->nlmsg_seq = rtnl->serial++;
923a60
+        m->hdr->nlmsg_seq = rtnl->serial++ ? : rtnl->serial++;
923a60
 
923a60
         rtnl_message_seal(m);
923a60