X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=net%2Fipv6%2Fip6_output.c;h=6ad5aadf81ad73b53f7e2320c87fe265140df691;hb=e651f03afe833326faa0abe55948c1c6cfd0b8ac;hp=93beee944657f12c61482996b941dd6b9cf1f7be;hpb=74d154189d597b91da4322996dbf4f5c3d1544ab;p=deliverable%2Flinux.git diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 93beee944657..6ad5aadf81ad 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -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);