diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-15 12:40:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-15 12:40:05 -0400 |
commit | 2ed0e21b30b53d3a94e204196e523e6c8f732b56 (patch) | |
tree | de2635426477d86338a9469ce09ba0626052288f /net/ipv4/ip_options.c | |
parent | 0fa213310cd8fa7a51071cdcf130e26fa56e9549 (diff) | |
parent | 9cbc1cb8cd46ce1f7645b9de249b2ce8460129bb (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1244 commits)
pkt_sched: Rename PSCHED_US2NS and PSCHED_NS2US
ipv4: Fix fib_trie rebalancing
Bluetooth: Fix issue with uninitialized nsh.type in DTL-1 driver
Bluetooth: Fix Kconfig issue with RFKILL integration
PIM-SM: namespace changes
ipv4: update ARPD help text
net: use a deferred timer in rt_check_expire
ieee802154: fix kconfig bool/tristate muckup
bonding: initialization rework
bonding: use is_zero_ether_addr
bonding: network device names are case sensative
bonding: elminate bad refcount code
bonding: fix style issues
bonding: fix destructor
bonding: remove bonding read/write semaphore
bonding: initialize before registration
bonding: bond_create always called with default parameters
x_tables: Convert printk to pr_err
netfilter: conntrack: optional reliable conntrack event delivery
list_nulls: add hlist_nulls_add_head and hlist_nulls_del
...
Diffstat (limited to 'net/ipv4/ip_options.c')
-rw-r--r-- | net/ipv4/ip_options.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c index 2c88da6e7862..94bf105ef3c9 100644 --- a/net/ipv4/ip_options.c +++ b/net/ipv4/ip_options.c | |||
@@ -102,7 +102,7 @@ int ip_options_echo(struct ip_options * dopt, struct sk_buff * skb) | |||
102 | sptr = skb_network_header(skb); | 102 | sptr = skb_network_header(skb); |
103 | dptr = dopt->__data; | 103 | dptr = dopt->__data; |
104 | 104 | ||
105 | daddr = skb->rtable->rt_spec_dst; | 105 | daddr = skb_rtable(skb)->rt_spec_dst; |
106 | 106 | ||
107 | if (sopt->rr) { | 107 | if (sopt->rr) { |
108 | optlen = sptr[sopt->rr+1]; | 108 | optlen = sptr[sopt->rr+1]; |
@@ -143,7 +143,7 @@ int ip_options_echo(struct ip_options * dopt, struct sk_buff * skb) | |||
143 | __be32 addr; | 143 | __be32 addr; |
144 | 144 | ||
145 | memcpy(&addr, sptr+soffset-1, 4); | 145 | memcpy(&addr, sptr+soffset-1, 4); |
146 | if (inet_addr_type(dev_net(skb->dst->dev), addr) != RTN_LOCAL) { | 146 | if (inet_addr_type(dev_net(skb_dst(skb)->dev), addr) != RTN_LOCAL) { |
147 | dopt->ts_needtime = 1; | 147 | dopt->ts_needtime = 1; |
148 | soffset += 8; | 148 | soffset += 8; |
149 | } | 149 | } |
@@ -257,7 +257,7 @@ int ip_options_compile(struct net *net, | |||
257 | struct rtable *rt = NULL; | 257 | struct rtable *rt = NULL; |
258 | 258 | ||
259 | if (skb != NULL) { | 259 | if (skb != NULL) { |
260 | rt = skb->rtable; | 260 | rt = skb_rtable(skb); |
261 | optptr = (unsigned char *)&(ip_hdr(skb)[1]); | 261 | optptr = (unsigned char *)&(ip_hdr(skb)[1]); |
262 | } else | 262 | } else |
263 | optptr = opt->__data; | 263 | optptr = opt->__data; |
@@ -550,7 +550,7 @@ void ip_forward_options(struct sk_buff *skb) | |||
550 | { | 550 | { |
551 | struct ip_options * opt = &(IPCB(skb)->opt); | 551 | struct ip_options * opt = &(IPCB(skb)->opt); |
552 | unsigned char * optptr; | 552 | unsigned char * optptr; |
553 | struct rtable *rt = skb->rtable; | 553 | struct rtable *rt = skb_rtable(skb); |
554 | unsigned char *raw = skb_network_header(skb); | 554 | unsigned char *raw = skb_network_header(skb); |
555 | 555 | ||
556 | if (opt->rr_needaddr) { | 556 | if (opt->rr_needaddr) { |
@@ -598,7 +598,7 @@ int ip_options_rcv_srr(struct sk_buff *skb) | |||
598 | __be32 nexthop; | 598 | __be32 nexthop; |
599 | struct iphdr *iph = ip_hdr(skb); | 599 | struct iphdr *iph = ip_hdr(skb); |
600 | unsigned char *optptr = skb_network_header(skb) + opt->srr; | 600 | unsigned char *optptr = skb_network_header(skb) + opt->srr; |
601 | struct rtable *rt = skb->rtable; | 601 | struct rtable *rt = skb_rtable(skb); |
602 | struct rtable *rt2; | 602 | struct rtable *rt2; |
603 | int err; | 603 | int err; |
604 | 604 | ||
@@ -623,13 +623,13 @@ int ip_options_rcv_srr(struct sk_buff *skb) | |||
623 | } | 623 | } |
624 | memcpy(&nexthop, &optptr[srrptr-1], 4); | 624 | memcpy(&nexthop, &optptr[srrptr-1], 4); |
625 | 625 | ||
626 | rt = skb->rtable; | 626 | rt = skb_rtable(skb); |
627 | skb->rtable = NULL; | 627 | skb_dst_set(skb, NULL); |
628 | err = ip_route_input(skb, nexthop, iph->saddr, iph->tos, skb->dev); | 628 | err = ip_route_input(skb, nexthop, iph->saddr, iph->tos, skb->dev); |
629 | rt2 = skb->rtable; | 629 | rt2 = skb_rtable(skb); |
630 | if (err || (rt2->rt_type != RTN_UNICAST && rt2->rt_type != RTN_LOCAL)) { | 630 | if (err || (rt2->rt_type != RTN_UNICAST && rt2->rt_type != RTN_LOCAL)) { |
631 | ip_rt_put(rt2); | 631 | ip_rt_put(rt2); |
632 | skb->rtable = rt; | 632 | skb_dst_set(skb, &rt->u.dst); |
633 | return -EINVAL; | 633 | return -EINVAL; |
634 | } | 634 | } |
635 | ip_rt_put(rt); | 635 | ip_rt_put(rt); |