summaryrefslogtreecommitdiff
path: root/net/ipv4/ipmr.c
diff options
context:
space:
mode:
authorCong Wang <amwang@redhat.com>2013-06-05 20:14:10 +0800
committerDavid S. Miller <davem@davemloft.net>2013-06-10 22:22:23 -0700
commit30f3a40f9a2a2869a560a9cb9ef488d10c803e14 (patch)
treecdaf18b7bf9c7f38eaaaa95f45a073d693223e18 /net/ipv4/ipmr.c
parent0a4db187a999c4a715bf56b8ab6c4705b524e4bb (diff)
downloadlwn-30f3a40f9a2a2869a560a9cb9ef488d10c803e14.tar.gz
lwn-30f3a40f9a2a2869a560a9cb9ef488d10c803e14.zip
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/ipmr.c')
-rw-r--r--net/ipv4/ipmr.c8
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,
struct igmpmsg *msg;
struct sock *mroute_sk;
int ret;
- unsigned long tail_offset;
#ifdef CONFIG_IP_PIMSM
if (assert == IGMPMSG_WHOLEPKT)
@@ -981,12 +980,7 @@ static int ipmr_cache_report(struct mr_table *mrt,
/* Copy the IP header */
- tail_offset = skb_tail_offset(skb);
- if (tail_offset > 0xffff) {
- kfree_skb(skb);
- return -EINVAL;
- }
- skb_set_network_header(skb, tail_offset);
+ skb_set_network_header(skb, skb->len);
skb_put(skb, ihl);
skb_copy_to_linear_data(skb, pkt->data, ihl);
ip_hdr(skb)->protocol = 0; /* Flag to the kernel this is a route add */