diff options
author | Cong Wang <amwang@redhat.com> | 2013-06-05 08:14:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-11 01:22:23 -0400 |
commit | 30f3a40f9a2a2869a560a9cb9ef488d10c803e14 (patch) | |
tree | cdaf18b7bf9c7f38eaaaa95f45a073d693223e18 /net/ipv4 | |
parent | 0a4db187a999c4a715bf56b8ab6c4705b524e4bb (diff) |
net: remove last caller of skb_tail_offset() and itself
Similar to the following commits:
commit 00f97da17a0c8d656d0c9 (netpoll: fix position of network header)
commit 525cebedb32a87fa48584 (pktgen: Fix position of ip and udp header)
using skb_tail_offset() seems not correct since the offset
is based on head pointer.
With the last caller removed, skb_tail_offset() can be killed
finally.
Cc: Thomas Graf <tgraf@suug.ch>
Cc: Daniel Borkmann <dborkmann@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/ipmr.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index df97f0ac1a1c..132a09664704 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -945,7 +945,6 @@ static int ipmr_cache_report(struct mr_table *mrt, | |||
945 | struct igmpmsg *msg; | 945 | struct igmpmsg *msg; |
946 | struct sock *mroute_sk; | 946 | struct sock *mroute_sk; |
947 | int ret; | 947 | int ret; |
948 | unsigned long tail_offset; | ||
949 | 948 | ||
950 | #ifdef CONFIG_IP_PIMSM | 949 | #ifdef CONFIG_IP_PIMSM |
951 | if (assert == IGMPMSG_WHOLEPKT) | 950 | if (assert == IGMPMSG_WHOLEPKT) |
@@ -981,12 +980,7 @@ static int ipmr_cache_report(struct mr_table *mrt, | |||
981 | 980 | ||
982 | /* Copy the IP header */ | 981 | /* Copy the IP header */ |
983 | 982 | ||
984 | tail_offset = skb_tail_offset(skb); | 983 | skb_set_network_header(skb, skb->len); |
985 | if (tail_offset > 0xffff) { | ||
986 | kfree_skb(skb); | ||
987 | return -EINVAL; | ||
988 | } | ||
989 | skb_set_network_header(skb, tail_offset); | ||
990 | skb_put(skb, ihl); | 984 | skb_put(skb, ihl); |
991 | skb_copy_to_linear_data(skb, pkt->data, ihl); | 985 | skb_copy_to_linear_data(skb, pkt->data, ihl); |
992 | ip_hdr(skb)->protocol = 0; /* Flag to the kernel this is a route add */ | 986 | ip_hdr(skb)->protocol = 0; /* Flag to the kernel this is a route add */ |