From: Patrick McHardy Date: Thu, 17 Jul 2008 03:51:47 +0000 (-0700) Subject: garp: retry sending JoinIn messages after allocation failures X-Git-Tag: MMI-PSA29.97-13-9~33552^2~84 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=51ce7ec92187b22ab1598987bb5f9776f6e0ebad;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Signed-off-by: David S. Miller --- diff --git a/net/802/garp.c b/net/802/garp.c index 3b78f7b74fd4..1dcb0660c49d 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);