diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2005-09-08 12:59:43 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-09-08 12:59:43 -0700 |
commit | 2e66fc41169c90d93b7811caf7e7822de6aa2259 (patch) | |
tree | 014db698b03f898c560919e56fbdae8ca6ad3dd5 /net/ipv6/icmp.c | |
parent | 42ca89c18b75e1c4c3b02aa5589ad3aa916909a8 (diff) | |
parent | 41a1f8ea4fbfcdc4232f023732584aae2220de31 (diff) | |
download | kernel_samsung_smdk4412-2e66fc41169c90d93b7811caf7e7822de6aa2259.zip kernel_samsung_smdk4412-2e66fc41169c90d93b7811caf7e7822de6aa2259.tar.gz kernel_samsung_smdk4412-2e66fc41169c90d93b7811caf7e7822de6aa2259.tar.bz2 |
Merge git://git.skbuff.net/gitroot/yoshfuji/linux-2.6-git-rfc3542
Diffstat (limited to 'net/ipv6/icmp.c')
-rw-r--r-- | net/ipv6/icmp.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index fa8f1bb..34e99c5 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c @@ -287,7 +287,7 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, int iif = 0; int addr_type = 0; int len; - int hlimit; + int hlimit, tclass; int err = 0; if ((u8*)hdr < skb->head || (u8*)(hdr+1) > skb->tail) @@ -385,6 +385,10 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, if (hlimit < 0) hlimit = ipv6_get_hoplimit(dst->dev); + tclass = np->cork.tclass; + if (tclass < 0) + tclass = 0; + msg.skb = skb; msg.offset = skb->nh.raw - skb->data; @@ -400,7 +404,7 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, err = ip6_append_data(sk, icmpv6_getfrag, &msg, len + sizeof(struct icmp6hdr), sizeof(struct icmp6hdr), - hlimit, NULL, &fl, (struct rt6_info*)dst, + hlimit, tclass, NULL, &fl, (struct rt6_info*)dst, MSG_DONTWAIT); if (err) { ip6_flush_pending_frames(sk); @@ -434,6 +438,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb) struct dst_entry *dst; int err = 0; int hlimit; + int tclass; saddr = &skb->nh.ipv6h->daddr; @@ -475,13 +480,17 @@ static void icmpv6_echo_reply(struct sk_buff *skb) if (hlimit < 0) hlimit = ipv6_get_hoplimit(dst->dev); + tclass = np->cork.tclass; + if (tclass < 0) + tclass = 0; + idev = in6_dev_get(skb->dev); msg.skb = skb; msg.offset = 0; err = ip6_append_data(sk, icmpv6_getfrag, &msg, skb->len + sizeof(struct icmp6hdr), - sizeof(struct icmp6hdr), hlimit, NULL, &fl, + sizeof(struct icmp6hdr), hlimit, tclass, NULL, &fl, (struct rt6_info*)dst, MSG_DONTWAIT); if (err) { |