diff options
author | Hannes Frederic Sowa <hannes@stressinduktion.org> | 2014-01-11 05:55:46 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-14 18:08:52 -0500 |
commit | 825edac4e78ded9e621c167a4f47a2392bd9e082 (patch) | |
tree | cc953c1f938bd18f472cebe557d21eca5ec5a084 /net/ipv6/icmp.c | |
parent | 72c1d3bdd5bf10a789608336ba0d61f1e44e4350 (diff) |
ipv6: copy traffic class from ping request to reply
Suggested-by: Simon Schneider <simon-schneider@gmx.net>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/icmp.c')
-rw-r--r-- | net/ipv6/icmp.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 @@ | |||
67 | #include <net/icmp.h> | 67 | #include <net/icmp.h> |
68 | #include <net/xfrm.h> | 68 | #include <net/xfrm.h> |
69 | #include <net/inet_common.h> | 69 | #include <net/inet_common.h> |
70 | #include <net/dsfield.h> | ||
70 | 71 | ||
71 | #include <asm/uaccess.h> | 72 | #include <asm/uaccess.h> |
72 | 73 | ||
@@ -553,6 +554,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb) | |||
553 | struct dst_entry *dst; | 554 | struct dst_entry *dst; |
554 | int err = 0; | 555 | int err = 0; |
555 | int hlimit; | 556 | int hlimit; |
557 | u8 tclass; | ||
556 | 558 | ||
557 | saddr = &ipv6_hdr(skb)->daddr; | 559 | saddr = &ipv6_hdr(skb)->daddr; |
558 | 560 | ||
@@ -603,8 +605,9 @@ static void icmpv6_echo_reply(struct sk_buff *skb) | |||
603 | msg.offset = 0; | 605 | msg.offset = 0; |
604 | msg.type = ICMPV6_ECHO_REPLY; | 606 | msg.type = ICMPV6_ECHO_REPLY; |
605 | 607 | ||
608 | tclass = ipv6_get_dsfield(ipv6_hdr(skb)); | ||
606 | err = ip6_append_data(sk, icmpv6_getfrag, &msg, skb->len + sizeof(struct icmp6hdr), | 609 | err = ip6_append_data(sk, icmpv6_getfrag, &msg, skb->len + sizeof(struct icmp6hdr), |
607 | sizeof(struct icmp6hdr), hlimit, np->tclass, NULL, &fl6, | 610 | sizeof(struct icmp6hdr), hlimit, tclass, NULL, &fl6, |
608 | (struct rt6_info *)dst, MSG_DONTWAIT, | 611 | (struct rt6_info *)dst, MSG_DONTWAIT, |
609 | np->dontfrag); | 612 | np->dontfrag); |
610 | 613 | ||