teknoraver / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone

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

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