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/ip_output.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/ip_output.c')
-rw-r--r-- | net/ipv4/ip_output.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index ea19c37ccc0c..8d845ebfccaa 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -140,7 +140,7 @@ int ip_build_and_send_pkt(struct sk_buff *skb, struct sock *sk, | |||
140 | __be32 saddr, __be32 daddr, struct ip_options *opt) | 140 | __be32 saddr, __be32 daddr, struct ip_options *opt) |
141 | { | 141 | { |
142 | struct inet_sock *inet = inet_sk(sk); | 142 | struct inet_sock *inet = inet_sk(sk); |
143 | struct rtable *rt = skb->rtable; | 143 | struct rtable *rt = skb_rtable(skb); |
144 | struct iphdr *iph; | 144 | struct iphdr *iph; |
145 | 145 | ||
146 | /* Build the IP header. */ | 146 | /* Build the IP header. */ |
@@ -238,7 +238,7 @@ static int ip_finish_output(struct sk_buff *skb) | |||
238 | int ip_mc_output(struct sk_buff *skb) | 238 | int ip_mc_output(struct sk_buff *skb) |
239 | { | 239 | { |
240 | struct sock *sk = skb->sk; | 240 | struct sock *sk = skb->sk; |
241 | struct rtable *rt = skb->rtable; | 241 | struct rtable *rt = skb_rtable(skb); |
242 | struct net_device *dev = rt->u.dst.dev; | 242 | struct net_device *dev = rt->u.dst.dev; |
243 | 243 | ||
244 | /* | 244 | /* |
@@ -319,7 +319,7 @@ int ip_queue_xmit(struct sk_buff *skb, int ipfragok) | |||
319 | /* Skip all of this if the packet is already routed, | 319 | /* Skip all of this if the packet is already routed, |
320 | * f.e. by something like SCTP. | 320 | * f.e. by something like SCTP. |
321 | */ | 321 | */ |
322 | rt = skb->rtable; | 322 | rt = skb_rtable(skb); |
323 | if (rt != NULL) | 323 | if (rt != NULL) |
324 | goto packet_routed; | 324 | goto packet_routed; |
325 | 325 | ||
@@ -440,7 +440,7 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) | |||
440 | unsigned int mtu, hlen, left, len, ll_rs, pad; | 440 | unsigned int mtu, hlen, left, len, ll_rs, pad; |
441 | int offset; | 441 | int offset; |
442 | __be16 not_last_frag; | 442 | __be16 not_last_frag; |
443 | struct rtable *rt = skb->rtable; | 443 | struct rtable *rt = skb_rtable(skb); |
444 | int err = 0; | 444 | int err = 0; |
445 | 445 | ||
446 | dev = rt->u.dst.dev; | 446 | dev = rt->u.dst.dev; |
@@ -1362,7 +1362,7 @@ void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *ar | |||
1362 | } replyopts; | 1362 | } replyopts; |
1363 | struct ipcm_cookie ipc; | 1363 | struct ipcm_cookie ipc; |
1364 | __be32 daddr; | 1364 | __be32 daddr; |
1365 | struct rtable *rt = skb->rtable; | 1365 | struct rtable *rt = skb_rtable(skb); |
1366 | 1366 | ||
1367 | if (ip_options_echo(&replyopts.opt, skb)) | 1367 | if (ip_options_echo(&replyopts.opt, skb)) |
1368 | return; | 1368 | return; |