Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78100
b: refs/heads/master
c: 29bb43b
h: refs/heads/master
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Jan 28, 2008
1 parent 10ec610 commit d867d5d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a2deb6d26f16ed7bf787dbd6a58c5d7be47d8db3
refs/heads/master: 29bb43b4ec4e625b0659186fc8a7c8f8b7c81982
8 changes: 4 additions & 4 deletions trunk/include/net/inet_ecn.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ static inline void IP_ECN_clear(struct iphdr *iph)
iph->tos &= ~INET_ECN_MASK;
}

static inline void ipv4_copy_dscp(struct iphdr *outer, struct iphdr *inner)
static inline void ipv4_copy_dscp(unsigned int dscp, struct iphdr *inner)
{
u32 dscp = ipv4_get_dsfield(outer) & ~INET_ECN_MASK;
dscp &= ~INET_ECN_MASK;
ipv4_change_dsfield(inner, INET_ECN_MASK, dscp);
}

Expand All @@ -104,9 +104,9 @@ static inline void IP6_ECN_clear(struct ipv6hdr *iph)
*(__be32*)iph &= ~htonl(INET_ECN_MASK << 20);
}

static inline void ipv6_copy_dscp(struct ipv6hdr *outer, struct ipv6hdr *inner)
static inline void ipv6_copy_dscp(unsigned int dscp, struct ipv6hdr *inner)
{
u32 dscp = ipv6_get_dsfield(outer) & ~INET_ECN_MASK;
dscp &= ~INET_ECN_MASK;
ipv6_change_dsfield(inner, INET_ECN_MASK, dscp);
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/xfrm4_mode_tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static int xfrm4_tunnel_input(struct xfrm_state *x, struct sk_buff *skb)
iph = ip_hdr(skb);
if (iph->protocol == IPPROTO_IPIP) {
if (x->props.flags & XFRM_STATE_DECAP_DSCP)
ipv4_copy_dscp(iph, ipip_hdr(skb));
ipv4_copy_dscp(ipv4_get_dsfield(iph), ipip_hdr(skb));
if (!(x->props.flags & XFRM_STATE_NOECN))
ipip_ecn_decapsulate(skb);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv6/ip6_tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ static void ip6ip6_dscp_ecn_decapsulate(struct ip6_tnl *t,
struct sk_buff *skb)
{
if (t->parms.flags & IP6_TNL_F_RCV_DSCP_COPY)
ipv6_copy_dscp(ipv6h, ipv6_hdr(skb));
ipv6_copy_dscp(ipv6_get_dsfield(ipv6h), ipv6_hdr(skb));

if (INET_ECN_is_ce(ipv6_get_dsfield(ipv6h)))
IP6_ECN_set_ce(ipv6_hdr(skb));
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/ipv6/xfrm6_mode_tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ static int xfrm6_tunnel_input(struct xfrm_state *x, struct sk_buff *skb)
nh = skb_network_header(skb);
if (nh[IP6CB(skb)->nhoff] == IPPROTO_IPV6) {
if (x->props.flags & XFRM_STATE_DECAP_DSCP)
ipv6_copy_dscp(ipv6_hdr(skb), ipipv6_hdr(skb));
ipv6_copy_dscp(ipv6_get_dsfield(ipv6_hdr(skb)),
ipipv6_hdr(skb));
if (!(x->props.flags & XFRM_STATE_NOECN))
ipip6_ecn_decapsulate(skb);
} else {
Expand Down

0 comments on commit d867d5d

Please sign in to comment.