aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv6/ip6mr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 2b70774be61f..da673ef75e12 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -733,7 +733,7 @@ static void ip6mr_cache_resolve(struct mfc6_cache *uc, struct mfc6_cache *c)
733 struct nlmsghdr *nlh = (struct nlmsghdr *)skb_pull(skb, sizeof(struct ipv6hdr)); 733 struct nlmsghdr *nlh = (struct nlmsghdr *)skb_pull(skb, sizeof(struct ipv6hdr));
734 734
735 if (ip6mr_fill_mroute(skb, c, NLMSG_DATA(nlh)) > 0) { 735 if (ip6mr_fill_mroute(skb, c, NLMSG_DATA(nlh)) > 0) {
736 nlh->nlmsg_len = skb->tail - (u8 *)nlh; 736 nlh->nlmsg_len = skb_tail_pointer(skb) - (u8 *)nlh;
737 } else { 737 } else {
738 nlh->nlmsg_type = NLMSG_ERROR; 738 nlh->nlmsg_type = NLMSG_ERROR;
739 nlh->nlmsg_len = NLMSG_LENGTH(sizeof(struct nlmsgerr)); 739 nlh->nlmsg_len = NLMSG_LENGTH(sizeof(struct nlmsgerr));
@@ -1562,7 +1562,7 @@ ip6mr_fill_mroute(struct sk_buff *skb, struct mfc6_cache *c, struct rtmsg *rtm)
1562 int ct; 1562 int ct;
1563 struct rtnexthop *nhp; 1563 struct rtnexthop *nhp;
1564 struct net_device *dev = vif6_table[c->mf6c_parent].dev; 1564 struct net_device *dev = vif6_table[c->mf6c_parent].dev;
1565 u8 *b = skb->tail; 1565 u8 *b = skb_tail_pointer(skb);
1566 struct rtattr *mp_head; 1566 struct rtattr *mp_head;
1567 1567
1568 if (dev) 1568 if (dev)
@@ -1582,7 +1582,7 @@ ip6mr_fill_mroute(struct sk_buff *skb, struct mfc6_cache *c, struct rtmsg *rtm)
1582 } 1582 }
1583 } 1583 }
1584 mp_head->rta_type = RTA_MULTIPATH; 1584 mp_head->rta_type = RTA_MULTIPATH;
1585 mp_head->rta_len = skb->tail - (u8 *)mp_head; 1585 mp_head->rta_len = skb_tail_pointer(skb) - (u8 *)mp_head;
1586 rtm->rtm_type = RTN_MULTICAST; 1586 rtm->rtm_type = RTN_MULTICAST;
1587 return 1; 1587 return 1;
1588 1588