Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41581
b: refs/heads/master
c: 8a9ae21
h: refs/heads/master
i:
  41579: cdd2a2e
v: v3
  • Loading branch information
Al Viro authored and David S. Miller committed Dec 3, 2006
1 parent 794adcf commit 0afe86d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: 5d36b1803d875cf101fdb972ff9c56663e508e39
refs/heads/master: 8a9ae2110baf39b2dc53c2891e0705895a8829a9
6 changes: 3 additions & 3 deletions trunk/include/net/dsfield.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ static inline __u8 ipv4_get_dsfield(struct iphdr *iph)

static inline __u8 ipv6_get_dsfield(struct ipv6hdr *ipv6h)
{
return ntohs(*(__u16 *) ipv6h) >> 4;
return ntohs(*(__be16 *) ipv6h) >> 4;
}


Expand All @@ -45,9 +45,9 @@ static inline void ipv6_change_dsfield(struct ipv6hdr *ipv6h,__u8 mask,
{
__u16 tmp;

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


Expand Down

0 comments on commit 0afe86d

Please sign in to comment.