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