diff options
Diffstat (limited to 'net/ipv6/ip6mr.c')
-rw-r--r-- | net/ipv6/ip6mr.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 0e1d53bcf1e..7ff0343e05c 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c | |||
@@ -135,14 +135,15 @@ static struct mr6_table *ip6mr_get_table(struct net *net, u32 id) | |||
135 | return NULL; | 135 | return NULL; |
136 | } | 136 | } |
137 | 137 | ||
138 | static int ip6mr_fib_lookup(struct net *net, struct flowi *flp, | 138 | static int ip6mr_fib_lookup(struct net *net, struct flowi6 *flp6, |
139 | struct mr6_table **mrt) | 139 | struct mr6_table **mrt) |
140 | { | 140 | { |
141 | struct ip6mr_result res; | 141 | struct ip6mr_result res; |
142 | struct fib_lookup_arg arg = { .result = &res, }; | 142 | struct fib_lookup_arg arg = { .result = &res, }; |
143 | int err; | 143 | int err; |
144 | 144 | ||
145 | err = fib_rules_lookup(net->ipv6.mr6_rules_ops, flp, 0, &arg); | 145 | err = fib_rules_lookup(net->ipv6.mr6_rules_ops, |
146 | flowi6_to_flowi(flp6), 0, &arg); | ||
146 | if (err < 0) | 147 | if (err < 0) |
147 | return err; | 148 | return err; |
148 | *mrt = res.mrt; | 149 | *mrt = res.mrt; |
@@ -270,7 +271,7 @@ static struct mr6_table *ip6mr_get_table(struct net *net, u32 id) | |||
270 | return net->ipv6.mrt6; | 271 | return net->ipv6.mrt6; |
271 | } | 272 | } |
272 | 273 | ||
273 | static int ip6mr_fib_lookup(struct net *net, struct flowi *flp, | 274 | static int ip6mr_fib_lookup(struct net *net, struct flowi6 *flp6, |
274 | struct mr6_table **mrt) | 275 | struct mr6_table **mrt) |
275 | { | 276 | { |
276 | *mrt = net->ipv6.mrt6; | 277 | *mrt = net->ipv6.mrt6; |
@@ -617,9 +618,9 @@ static int pim6_rcv(struct sk_buff *skb) | |||
617 | struct net_device *reg_dev = NULL; | 618 | struct net_device *reg_dev = NULL; |
618 | struct net *net = dev_net(skb->dev); | 619 | struct net *net = dev_net(skb->dev); |
619 | struct mr6_table *mrt; | 620 | struct mr6_table *mrt; |
620 | struct flowi fl = { | 621 | struct flowi6 fl6 = { |
621 | .iif = skb->dev->ifindex, | 622 | .flowi6_iif = skb->dev->ifindex, |
622 | .mark = skb->mark, | 623 | .flowi6_mark = skb->mark, |
623 | }; | 624 | }; |
624 | int reg_vif_num; | 625 | int reg_vif_num; |
625 | 626 | ||
@@ -644,7 +645,7 @@ static int pim6_rcv(struct sk_buff *skb) | |||
644 | ntohs(encap->payload_len) + sizeof(*pim) > skb->len) | 645 | ntohs(encap->payload_len) + sizeof(*pim) > skb->len) |
645 | goto drop; | 646 | goto drop; |
646 | 647 | ||
647 | if (ip6mr_fib_lookup(net, &fl, &mrt) < 0) | 648 | if (ip6mr_fib_lookup(net, &fl6, &mrt) < 0) |
648 | goto drop; | 649 | goto drop; |
649 | reg_vif_num = mrt->mroute_reg_vif_num; | 650 | reg_vif_num = mrt->mroute_reg_vif_num; |
650 | 651 | ||
@@ -687,14 +688,14 @@ static netdev_tx_t reg_vif_xmit(struct sk_buff *skb, | |||
687 | { | 688 | { |
688 | struct net *net = dev_net(dev); | 689 | struct net *net = dev_net(dev); |
689 | struct mr6_table *mrt; | 690 | struct mr6_table *mrt; |
690 | struct flowi fl = { | 691 | struct flowi6 fl6 = { |
691 | .oif = dev->ifindex, | 692 | .flowi6_oif = dev->ifindex, |
692 | .iif = skb->skb_iif, | 693 | .flowi6_iif = skb->skb_iif, |
693 | .mark = skb->mark, | 694 | .flowi6_mark = skb->mark, |
694 | }; | 695 | }; |
695 | int err; | 696 | int err; |
696 | 697 | ||
697 | err = ip6mr_fib_lookup(net, &fl, &mrt); | 698 | err = ip6mr_fib_lookup(net, &fl6, &mrt); |
698 | if (err < 0) | 699 | if (err < 0) |
699 | return err; | 700 | return err; |
700 | 701 | ||
@@ -1039,7 +1040,6 @@ static void ip6mr_cache_resolve(struct net *net, struct mr6_table *mrt, | |||
1039 | 1040 | ||
1040 | while((skb = __skb_dequeue(&uc->mfc_un.unres.unresolved))) { | 1041 | while((skb = __skb_dequeue(&uc->mfc_un.unres.unresolved))) { |
1041 | if (ipv6_hdr(skb)->version == 0) { | 1042 | if (ipv6_hdr(skb)->version == 0) { |
1042 | int err; | ||
1043 | struct nlmsghdr *nlh = (struct nlmsghdr *)skb_pull(skb, sizeof(struct ipv6hdr)); | 1043 | struct nlmsghdr *nlh = (struct nlmsghdr *)skb_pull(skb, sizeof(struct ipv6hdr)); |
1044 | 1044 | ||
1045 | if (__ip6mr_fill_mroute(mrt, skb, c, NLMSG_DATA(nlh)) > 0) { | 1045 | if (__ip6mr_fill_mroute(mrt, skb, c, NLMSG_DATA(nlh)) > 0) { |
@@ -1050,7 +1050,7 @@ static void ip6mr_cache_resolve(struct net *net, struct mr6_table *mrt, | |||
1050 | skb_trim(skb, nlh->nlmsg_len); | 1050 | skb_trim(skb, nlh->nlmsg_len); |
1051 | ((struct nlmsgerr *)NLMSG_DATA(nlh))->error = -EMSGSIZE; | 1051 | ((struct nlmsgerr *)NLMSG_DATA(nlh))->error = -EMSGSIZE; |
1052 | } | 1052 | } |
1053 | err = rtnl_unicast(skb, net, NETLINK_CB(skb).pid); | 1053 | rtnl_unicast(skb, net, NETLINK_CB(skb).pid); |
1054 | } else | 1054 | } else |
1055 | ip6_mr_forward(net, mrt, skb, c); | 1055 | ip6_mr_forward(net, mrt, skb, c); |
1056 | } | 1056 | } |
@@ -1548,13 +1548,13 @@ int ip6mr_sk_done(struct sock *sk) | |||
1548 | struct sock *mroute6_socket(struct net *net, struct sk_buff *skb) | 1548 | struct sock *mroute6_socket(struct net *net, struct sk_buff *skb) |
1549 | { | 1549 | { |
1550 | struct mr6_table *mrt; | 1550 | struct mr6_table *mrt; |
1551 | struct flowi fl = { | 1551 | struct flowi6 fl6 = { |
1552 | .iif = skb->skb_iif, | 1552 | .flowi6_iif = skb->skb_iif, |
1553 | .oif = skb->dev->ifindex, | 1553 | .flowi6_oif = skb->dev->ifindex, |
1554 | .mark = skb->mark, | 1554 | .flowi6_mark = skb->mark, |
1555 | }; | 1555 | }; |
1556 | 1556 | ||
1557 | if (ip6mr_fib_lookup(net, &fl, &mrt) < 0) | 1557 | if (ip6mr_fib_lookup(net, &fl6, &mrt) < 0) |
1558 | return NULL; | 1558 | return NULL; |
1559 | 1559 | ||
1560 | return mrt->mroute6_sk; | 1560 | return mrt->mroute6_sk; |
@@ -1898,7 +1898,7 @@ static int ip6mr_forward2(struct net *net, struct mr6_table *mrt, | |||
1898 | struct mif_device *vif = &mrt->vif6_table[vifi]; | 1898 | struct mif_device *vif = &mrt->vif6_table[vifi]; |
1899 | struct net_device *dev; | 1899 | struct net_device *dev; |
1900 | struct dst_entry *dst; | 1900 | struct dst_entry *dst; |
1901 | struct flowi fl; | 1901 | struct flowi6 fl6; |
1902 | 1902 | ||
1903 | if (vif->dev == NULL) | 1903 | if (vif->dev == NULL) |
1904 | goto out_free; | 1904 | goto out_free; |
@@ -1916,12 +1916,12 @@ static int ip6mr_forward2(struct net *net, struct mr6_table *mrt, | |||
1916 | 1916 | ||
1917 | ipv6h = ipv6_hdr(skb); | 1917 | ipv6h = ipv6_hdr(skb); |
1918 | 1918 | ||
1919 | fl = (struct flowi) { | 1919 | fl6 = (struct flowi6) { |
1920 | .oif = vif->link, | 1920 | .flowi6_oif = vif->link, |
1921 | .fl6_dst = ipv6h->daddr, | 1921 | .daddr = ipv6h->daddr, |
1922 | }; | 1922 | }; |
1923 | 1923 | ||
1924 | dst = ip6_route_output(net, NULL, &fl); | 1924 | dst = ip6_route_output(net, NULL, &fl6); |
1925 | if (!dst) | 1925 | if (!dst) |
1926 | goto out_free; | 1926 | goto out_free; |
1927 | 1927 | ||
@@ -2044,13 +2044,13 @@ int ip6_mr_input(struct sk_buff *skb) | |||
2044 | struct mfc6_cache *cache; | 2044 | struct mfc6_cache *cache; |
2045 | struct net *net = dev_net(skb->dev); | 2045 | struct net *net = dev_net(skb->dev); |
2046 | struct mr6_table *mrt; | 2046 | struct mr6_table *mrt; |
2047 | struct flowi fl = { | 2047 | struct flowi6 fl6 = { |
2048 | .iif = skb->dev->ifindex, | 2048 | .flowi6_iif = skb->dev->ifindex, |
2049 | .mark = skb->mark, | 2049 | .flowi6_mark = skb->mark, |
2050 | }; | 2050 | }; |
2051 | int err; | 2051 | int err; |
2052 | 2052 | ||
2053 | err = ip6mr_fib_lookup(net, &fl, &mrt); | 2053 | err = ip6mr_fib_lookup(net, &fl6, &mrt); |
2054 | if (err < 0) | 2054 | if (err < 0) |
2055 | return err; | 2055 | return err; |
2056 | 2056 | ||