projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
inet: constify ip headers and in6_addr
[deliverable/linux.git]
/
net
/
core
/
dev.c
diff --git
a/net/core/dev.c
b/net/core/dev.c
index 3871bf69a38680a290dfa76636e74bb214f6f13a..379c993ff42175f62d4d105aa5488db6aa40e575 100644
(file)
--- a/
net/core/dev.c
+++ b/
net/core/dev.c
@@
-2502,8
+2502,8
@@
static inline void ____napi_schedule(struct softnet_data *sd,
__u32 __skb_get_rxhash(struct sk_buff *skb)
{
int nhoff, hash = 0, poff;
__u32 __skb_get_rxhash(struct sk_buff *skb)
{
int nhoff, hash = 0, poff;
- struct ipv6hdr *ip6;
- struct iphdr *ip;
+
const
struct ipv6hdr *ip6;
+
const
struct iphdr *ip;
u8 ip_proto;
u32 addr1, addr2, ihl;
union {
u8 ip_proto;
u32 addr1, addr2, ihl;
union {
@@
-2518,7
+2518,7
@@
__u32 __skb_get_rxhash(struct sk_buff *skb)
if (!pskb_may_pull(skb, sizeof(*ip) + nhoff))
goto done;
if (!pskb_may_pull(skb, sizeof(*ip) + nhoff))
goto done;
- ip = (struct iphdr *) (skb->data + nhoff);
+ ip = (
const
struct iphdr *) (skb->data + nhoff);
if (ip->frag_off & htons(IP_MF | IP_OFFSET))
ip_proto = 0;
else
if (ip->frag_off & htons(IP_MF | IP_OFFSET))
ip_proto = 0;
else
@@
-2531,7
+2531,7
@@
__u32 __skb_get_rxhash(struct sk_buff *skb)
if (!pskb_may_pull(skb, sizeof(*ip6) + nhoff))
goto done;
if (!pskb_may_pull(skb, sizeof(*ip6) + nhoff))
goto done;
- ip6 = (struct ipv6hdr *) (skb->data + nhoff);
+ ip6 = (
const
struct ipv6hdr *) (skb->data + nhoff);
ip_proto = ip6->nexthdr;
addr1 = (__force u32) ip6->saddr.s6_addr32[3];
addr2 = (__force u32) ip6->daddr.s6_addr32[3];
ip_proto = ip6->nexthdr;
addr1 = (__force u32) ip6->saddr.s6_addr32[3];
addr2 = (__force u32) ip6->daddr.s6_addr32[3];
This page took
0.028688 seconds
and
5
git commands to generate.