From: Hannes Frederic Sowa Date: Sat, 11 Jan 2014 10:55:46 +0000 (+0100) Subject: ipv6: copy traffic class from ping request to reply X-Git-Tag: v3.14-rc1~94^2~192 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=825edac4e78ded9e621c167a4f47a2392bd9e082;p=linux.git ipv6: copy traffic class from ping request to reply Suggested-by: Simon Schneider Signed-off-by: Hannes Frederic Sowa Signed-off-by: David S. Miller --- diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 9a809a4b3d86..8003b4930267 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c @@ -67,6 +67,7 @@ #include #include #include +#include #include @@ -553,6 +554,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb) struct dst_entry *dst; int err = 0; int hlimit; + u8 tclass; saddr = &ipv6_hdr(skb)->daddr; @@ -603,8 +605,9 @@ static void icmpv6_echo_reply(struct sk_buff *skb) msg.offset = 0; msg.type = ICMPV6_ECHO_REPLY; + tclass = ipv6_get_dsfield(ipv6_hdr(skb)); err = ip6_append_data(sk, icmpv6_getfrag, &msg, skb->len + sizeof(struct icmp6hdr), - sizeof(struct icmp6hdr), hlimit, np->tclass, NULL, &fl6, + sizeof(struct icmp6hdr), hlimit, tclass, NULL, &fl6, (struct rt6_info *)dst, MSG_DONTWAIT, np->dontfrag);