diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-04-21 01:47:35 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:25:10 -0400 |
commit | eddc9ec53be2ecdbf4efe0efd4a83052594f0ac0 (patch) | |
tree | 4a38ab4dbd9d61fdf5a5ea6ed61463e0b9e33ba7 /net/ipv4/route.c | |
parent | e023dd643798c4f06c16466af90b4d250e4b8bd7 (diff) |
[SK_BUFF]: Introduce ip_hdr(), remove skb->nh.iph
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index e50ad7dbbde8..58417393dec1 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -1519,7 +1519,7 @@ static void ipv4_link_failure(struct sk_buff *skb) | |||
1519 | static int ip_rt_bug(struct sk_buff *skb) | 1519 | static int ip_rt_bug(struct sk_buff *skb) |
1520 | { | 1520 | { |
1521 | printk(KERN_DEBUG "ip_rt_bug: %u.%u.%u.%u -> %u.%u.%u.%u, %s\n", | 1521 | printk(KERN_DEBUG "ip_rt_bug: %u.%u.%u.%u -> %u.%u.%u.%u, %s\n", |
1522 | NIPQUAD(skb->nh.iph->saddr), NIPQUAD(skb->nh.iph->daddr), | 1522 | NIPQUAD(ip_hdr(skb)->saddr), NIPQUAD(ip_hdr(skb)->daddr), |
1523 | skb->dev ? skb->dev->name : "?"); | 1523 | skb->dev ? skb->dev->name : "?"); |
1524 | kfree_skb(skb); | 1524 | kfree_skb(skb); |
1525 | return 0; | 1525 | return 0; |
@@ -2134,7 +2134,7 @@ int ip_route_input(struct sk_buff *skb, __be32 daddr, __be32 saddr, | |||
2134 | rcu_read_lock(); | 2134 | rcu_read_lock(); |
2135 | if ((in_dev = __in_dev_get_rcu(dev)) != NULL) { | 2135 | if ((in_dev = __in_dev_get_rcu(dev)) != NULL) { |
2136 | int our = ip_check_mc(in_dev, daddr, saddr, | 2136 | int our = ip_check_mc(in_dev, daddr, saddr, |
2137 | skb->nh.iph->protocol); | 2137 | ip_hdr(skb)->protocol); |
2138 | if (our | 2138 | if (our |
2139 | #ifdef CONFIG_IP_MROUTE | 2139 | #ifdef CONFIG_IP_MROUTE |
2140 | || (!LOCAL_MCAST(daddr) && IN_DEV_MFORWARD(in_dev)) | 2140 | || (!LOCAL_MCAST(daddr) && IN_DEV_MFORWARD(in_dev)) |
@@ -2751,7 +2751,7 @@ int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void *arg) | |||
2751 | skb_reset_network_header(skb); | 2751 | skb_reset_network_header(skb); |
2752 | 2752 | ||
2753 | /* Bugfix: need to give ip_route_input enough of an IP header to not gag. */ | 2753 | /* Bugfix: need to give ip_route_input enough of an IP header to not gag. */ |
2754 | skb->nh.iph->protocol = IPPROTO_ICMP; | 2754 | ip_hdr(skb)->protocol = IPPROTO_ICMP; |
2755 | skb_reserve(skb, MAX_HEADER + sizeof(struct iphdr)); | 2755 | skb_reserve(skb, MAX_HEADER + sizeof(struct iphdr)); |
2756 | 2756 | ||
2757 | src = tb[RTA_SRC] ? nla_get_be32(tb[RTA_SRC]) : 0; | 2757 | src = tb[RTA_SRC] ? nla_get_be32(tb[RTA_SRC]) : 0; |