pkt_sched: pedit use proper struct
[safe/jmp/linux-2.6] / net / ipv6 / ip6_output.c
index 93beee9..cd48801 100644 (file)
@@ -194,7 +194,8 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
        struct ipv6hdr *hdr;
        u8  proto = fl->proto;
        int seg_len = skb->len;
-       int hlimit, tclass;
+       int hlimit = -1;
+       int tclass = 0;
        u32 mtu;
 
        if (opt) {
@@ -237,19 +238,13 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
        /*
         *      Fill in the IPv6 header
         */
-
-       hlimit = -1;
-       if (np)
+       if (np) {
+               tclass = np->tclass;
                hlimit = np->hop_limit;
+       }
        if (hlimit < 0)
                hlimit = ip6_dst_hoplimit(dst);
 
-       tclass = -1;
-       if (np)
-               tclass = np->tclass;
-       if (tclass < 0)
-               tclass = 0;
-
        *(__be32 *)hdr = htonl(0x60000000 | (tclass << 20)) | fl->fl6_flowlabel;
 
        hdr->payload_len = htons(seg_len);
@@ -1516,7 +1511,7 @@ int ip6_push_pending_frames(struct sock *sk)
        err = ip6_local_out(skb);
        if (err) {
                if (err > 0)
-                       err = np->recverr ? net_xmit_errno(err) : 0;
+                       err = net_xmit_errno(err);
                if (err)
                        goto error;
        }
@@ -1525,6 +1520,7 @@ out:
        ip6_cork_release(inet, np);
        return err;
 error:
+       IP6_INC_STATS(net, rt->rt6i_idev, IPSTATS_MIB_OUTDISCARDS);
        goto out;
 }