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:
Tom Gundersen
2015-03-14 11:27:19 -04:00
committed by Zbigniew Jędrzejewski-Szmek
parent 4bbc153799
commit 12e474fdf3
+1 -1
View File
@@ -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);