aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6mr.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/ip6mr.c')
-rw-r--r--net/ipv6/ip6mr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 96bfb4e4b820..241fb8ad9fcf 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -842,9 +842,9 @@ static void ip6mr_destroy_unres(struct mr6_table *mrt, struct mfc6_cache *c)
842 if (ipv6_hdr(skb)->version == 0) { 842 if (ipv6_hdr(skb)->version == 0) {
843 struct nlmsghdr *nlh = (struct nlmsghdr *)skb_pull(skb, sizeof(struct ipv6hdr)); 843 struct nlmsghdr *nlh = (struct nlmsghdr *)skb_pull(skb, sizeof(struct ipv6hdr));
844 nlh->nlmsg_type = NLMSG_ERROR; 844 nlh->nlmsg_type = NLMSG_ERROR;
845 nlh->nlmsg_len = NLMSG_LENGTH(sizeof(struct nlmsgerr)); 845 nlh->nlmsg_len = nlmsg_msg_size(sizeof(struct nlmsgerr));
846 skb_trim(skb, nlh->nlmsg_len); 846 skb_trim(skb, nlh->nlmsg_len);
847 ((struct nlmsgerr *)NLMSG_DATA(nlh))->error = -ETIMEDOUT; 847 ((struct nlmsgerr *)nlmsg_data(nlh))->error = -ETIMEDOUT;
848 rtnl_unicast(skb, net, NETLINK_CB(skb).portid); 848 rtnl_unicast(skb, net, NETLINK_CB(skb).portid);
849 } else 849 } else
850 kfree_skb(skb); 850 kfree_skb(skb);
@@ -1100,13 +1100,13 @@ static void ip6mr_cache_resolve(struct net *net, struct mr6_table *mrt,
1100 if (ipv6_hdr(skb)->version == 0) { 1100 if (ipv6_hdr(skb)->version == 0) {
1101 struct nlmsghdr *nlh = (struct nlmsghdr *)skb_pull(skb, sizeof(struct ipv6hdr)); 1101 struct nlmsghdr *nlh = (struct nlmsghdr *)skb_pull(skb, sizeof(struct ipv6hdr));
1102 1102
1103 if (__ip6mr_fill_mroute(mrt, skb, c, NLMSG_DATA(nlh)) > 0) { 1103 if (__ip6mr_fill_mroute(mrt, skb, c, nlmsg_data(nlh)) > 0) {
1104 nlh->nlmsg_len = skb_tail_pointer(skb) - (u8 *)nlh; 1104 nlh->nlmsg_len = skb_tail_pointer(skb) - (u8 *)nlh;
1105 } else { 1105 } else {
1106 nlh->nlmsg_type = NLMSG_ERROR; 1106 nlh->nlmsg_type = NLMSG_ERROR;
1107 nlh->nlmsg_len = NLMSG_LENGTH(sizeof(struct nlmsgerr)); 1107 nlh->nlmsg_len = nlmsg_msg_size(sizeof(struct nlmsgerr));
1108 skb_trim(skb, nlh->nlmsg_len); 1108 skb_trim(skb, nlh->nlmsg_len);
1109 ((struct nlmsgerr *)NLMSG_DATA(nlh))->error = -EMSGSIZE; 1109 ((struct nlmsgerr *)nlmsg_data(nlh))->error = -EMSGSIZE;
1110 } 1110 }
1111 rtnl_unicast(skb, net, NETLINK_CB(skb).portid); 1111 rtnl_unicast(skb, net, NETLINK_CB(skb).portid);
1112 } else 1112 } else