Skip to content

Commit

Permalink
garp: retry sending JoinIn messages after allocation failures
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jul 17, 2008
1 parent 9a6d276 commit 51ce7ec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/802/garp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 51ce7ec

Please sign in to comment.