diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-06-02 01:14:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-03 05:51:02 -0400 |
commit | 511c3f92ad5b6d9f8f6464be1b4f85f0422be91a (patch) | |
tree | 3e368d9a78f87eb9dd7ff9e57f4aab3f4a96e3b1 /net/ipv4/icmp.c | |
parent | dfbf97f3ac980b69dfbc41c83a208211a38443e8 (diff) |
net: skb->rtable accessor
Define skb_rtable(const struct sk_buff *skb) accessor to get rtable from skb
Delete skb->rtable field
Setting rtable is not allowed, just set dst instead as rtable is an alias.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/icmp.c')
-rw-r--r-- | net/ipv4/icmp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 3f50807237e0..94f75efae938 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c | |||
@@ -356,7 +356,7 @@ static void icmp_push_reply(struct icmp_bxm *icmp_param, | |||
356 | static void icmp_reply(struct icmp_bxm *icmp_param, struct sk_buff *skb) | 356 | static void icmp_reply(struct icmp_bxm *icmp_param, struct sk_buff *skb) |
357 | { | 357 | { |
358 | struct ipcm_cookie ipc; | 358 | struct ipcm_cookie ipc; |
359 | struct rtable *rt = skb->rtable; | 359 | struct rtable *rt = skb_rtable(skb); |
360 | struct net *net = dev_net(rt->u.dst.dev); | 360 | struct net *net = dev_net(rt->u.dst.dev); |
361 | struct sock *sk; | 361 | struct sock *sk; |
362 | struct inet_sock *inet; | 362 | struct inet_sock *inet; |
@@ -416,7 +416,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info) | |||
416 | struct iphdr *iph; | 416 | struct iphdr *iph; |
417 | int room; | 417 | int room; |
418 | struct icmp_bxm icmp_param; | 418 | struct icmp_bxm icmp_param; |
419 | struct rtable *rt = skb_in->rtable; | 419 | struct rtable *rt = skb_rtable(skb_in); |
420 | struct ipcm_cookie ipc; | 420 | struct ipcm_cookie ipc; |
421 | __be32 saddr; | 421 | __be32 saddr; |
422 | u8 tos; | 422 | u8 tos; |
@@ -596,7 +596,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info) | |||
596 | RT_TOS(tos), rt2->u.dst.dev); | 596 | RT_TOS(tos), rt2->u.dst.dev); |
597 | 597 | ||
598 | dst_release(&rt2->u.dst); | 598 | dst_release(&rt2->u.dst); |
599 | rt2 = skb_in->rtable; | 599 | rt2 = skb_rtable(skb_in); |
600 | skb_in->dst = odst; | 600 | skb_in->dst = odst; |
601 | } | 601 | } |
602 | 602 | ||
@@ -926,7 +926,7 @@ static void icmp_address(struct sk_buff *skb) | |||
926 | 926 | ||
927 | static void icmp_address_reply(struct sk_buff *skb) | 927 | static void icmp_address_reply(struct sk_buff *skb) |
928 | { | 928 | { |
929 | struct rtable *rt = skb->rtable; | 929 | struct rtable *rt = skb_rtable(skb); |
930 | struct net_device *dev = skb->dev; | 930 | struct net_device *dev = skb->dev; |
931 | struct in_device *in_dev; | 931 | struct in_device *in_dev; |
932 | struct in_ifaddr *ifa; | 932 | struct in_ifaddr *ifa; |
@@ -970,7 +970,7 @@ static void icmp_discard(struct sk_buff *skb) | |||
970 | int icmp_rcv(struct sk_buff *skb) | 970 | int icmp_rcv(struct sk_buff *skb) |
971 | { | 971 | { |
972 | struct icmphdr *icmph; | 972 | struct icmphdr *icmph; |
973 | struct rtable *rt = skb->rtable; | 973 | struct rtable *rt = skb_rtable(skb); |
974 | struct net *net = dev_net(rt->u.dst.dev); | 974 | struct net *net = dev_net(rt->u.dst.dev); |
975 | 975 | ||
976 | if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) { | 976 | if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) { |