gss_krb5: Introduce encryption type framework
[safe/jmp/linux-2.6] / net / 802 / garp.c
index 3b78f7b..9ed7c0e 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/etherdevice.h>
 #include <linux/rtnetlink.h>
 #include <linux/llc.h>
+#include <linux/slab.h>
 #include <net/llc.h>
 #include <net/llc_pdu.h>
 #include <net/garp.h>
@@ -323,7 +324,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);