From: Patrick McHardy <kaber@trash.net>
To: "David S. Miller" <davem@davemloft.net>
Cc: Linux Netdev List <netdev@vger.kernel.org>
Subject: [PATCH]: garp: retry sending JoinIn messages after allocation failures
Date: Tue, 15 Jul 2008 15:02:51 +0200 [thread overview]
Message-ID: <487C9FFB.5060103@trash.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: 01.diff --]
[-- Type: text/x-diff, Size: 997 bytes --]
commit ca42e467171a856e008b754b72c3446b70a7c48d
Author: Patrick McHardy <kaber@trash.net>
Date: Tue Jul 15 15:00:44 2008 +0200
garp: retry sending JoinIn messages after allocation failures
Increase reliability by retrying to send JoinIn messages after memory
allocation failures on each TRANSMIT_PDU event until it succeeds.
Signed-off-by: Patrick McHardy <kaber@trash.net>
diff --git a/net/802/garp.c b/net/802/garp.c
index 3b78f7b..1dcb066 100644
--- a/net/802/garp.c
+++ b/net/802/garp.c
@@ -323,7 +323,10 @@ static void garp_attr_event(struct garp_applicant *app,
case GARP_ACTION_NONE:
break;
case GARP_ACTION_S_JOIN_IN:
- garp_pdu_append_attr(app, attr, GARP_JOIN_IN);
+ /* When appending the attribute fails, don't update state in
+ * order to retry on next TRANSMIT_PDU event. */
+ if (garp_pdu_append_attr(app, attr, GARP_JOIN_IN) < 0)
+ return;
break;
case GARP_ACTION_S_LEAVE_EMPTY:
garp_pdu_append_attr(app, attr, GARP_LEAVE_EMPTY);
next reply other threads:[~2008-07-15 13:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-15 13:02 Patrick McHardy [this message]
2008-07-17 3:52 ` [PATCH]: garp: retry sending JoinIn messages after allocation failures David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=487C9FFB.5060103@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).