ICMP6_MIB_INMSGS,                       /* InMsgs */
        ICMP6_MIB_INERRORS,                     /* InErrors */
        ICMP6_MIB_OUTMSGS,                      /* OutMsgs */
+       ICMP6_MIB_OUTERRORS,                    /* OutErrors */
        __ICMP6_MIB_MAX
 };
 
 
        if (ip_append_data(sk, icmp_glue_bits, icmp_param,
                           icmp_param->data_len+icmp_param->head_len,
                           icmp_param->head_len,
-                          ipc, rt, MSG_DONTWAIT) < 0)
+                          ipc, rt, MSG_DONTWAIT) < 0) {
+               ICMP_INC_STATS_BH(sock_net(sk), ICMP_MIB_OUTERRORS);
                ip_flush_pending_frames(sk);
-       else if ((skb = skb_peek(&sk->sk_write_queue)) != NULL) {
+       } else if ((skb = skb_peek(&sk->sk_write_queue)) != NULL) {
                struct icmphdr *icmph = icmp_hdr(skb);
                __wsum csum = 0;
                struct sk_buff *skb1;
 
                              np->tclass, NULL, &fl, (struct rt6_info*)dst,
                              MSG_DONTWAIT);
        if (err) {
+               ICMP6_INC_STATS_BH(net, idev, ICMP6_MIB_OUTMSGS);
                ip6_flush_pending_frames(sk);
                goto out_put;
        }
                                (struct rt6_info*)dst, MSG_DONTWAIT);
 
        if (err) {
+               ICMP6_INC_STATS_BH(net, idev, ICMP6_MIB_OUTMSGS);
                ip6_flush_pending_frames(sk);
                goto out_put;
        }
 
        SNMP_MIB_ITEM("Icmp6InMsgs", ICMP6_MIB_INMSGS),
        SNMP_MIB_ITEM("Icmp6InErrors", ICMP6_MIB_INERRORS),
        SNMP_MIB_ITEM("Icmp6OutMsgs", ICMP6_MIB_OUTMSGS),
+       SNMP_MIB_ITEM("Icmp6OutErrors", ICMP6_MIB_OUTERRORS),
        SNMP_MIB_SENTINEL
 };