Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351330
b: refs/heads/master
c: a0376db
h: refs/heads/master
v: v3
  • Loading branch information
YOSHIFUJI Hideaki / 吉藤英明 authored and David S. Miller committed Jan 10, 2013
1 parent 2437df9 commit 914965a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 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: 6c40d100ce3311a44ef82c678fb46833a270c007
refs/heads/master: a0376db0f234a8053100bddf26c073be79546b2b
6 changes: 2 additions & 4 deletions trunk/include/net/dsfield.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,9 @@ static inline void ipv4_change_dsfield(struct iphdr *iph,__u8 mask,
static inline void ipv6_change_dsfield(struct ipv6hdr *ipv6h,__u8 mask,
__u8 value)
{
__u16 tmp;
__be16 *p = (__force __be16 *)ipv6h;

tmp = ntohs(*(__be16 *) ipv6h);
tmp = (tmp & ((mask << 4) | 0xf00f)) | (value << 4);
*(__be16 *) ipv6h = htons(tmp);
*p = (*p & htons((((u16)mask << 4) | 0xf00f))) | htons((u16)value << 4);
}


Expand Down

0 comments on commit 914965a

Please sign in to comment.