···1414extern struct proto udplitev6_prot;1515extern struct proto tcpv6_prot;16161717-struct flowi;1717+struct flowi6;18181919/* extention headers */2020extern int ipv6_exthdrs_init(void);···42424343extern int datagram_send_ctl(struct net *net,4444 struct msghdr *msg,4545- struct flowi *fl,4545+ struct flowi6 *fl6,4646 struct ipv6_txoptions *opt,4747 int *hlimit, int *tclass,4848 int *dontfrag);
···876876 * fl6_update_dst - update flowi destination address with info given877877 * by srcrt option, if any.878878 *879879- * @fl: flowi for which fl6_dst is to be updated879879+ * @fl6: flowi6 for which daddr is to be updated880880 * @opt: struct ipv6_txoptions in which to look for srcrt opt881881- * @orig: copy of original fl6_dst address if modified881881+ * @orig: copy of original daddr address if modified882882 *883883 * Returns NULL if no txoptions or no srcrt, otherwise returns orig884884- * and initial value of fl->fl6_dst set in orig884884+ * and initial value of fl6->daddr set in orig885885 */886886-struct in6_addr *fl6_update_dst(struct flowi *fl,886886+struct in6_addr *fl6_update_dst(struct flowi6 *fl6,887887 const struct ipv6_txoptions *opt,888888 struct in6_addr *orig)889889{890890 if (!opt || !opt->srcrt)891891 return NULL;892892893893- ipv6_addr_copy(orig, &fl->fl6_dst);894894- ipv6_addr_copy(&fl->fl6_dst, ((struct rt0_hdr *)opt->srcrt)->addr);893893+ ipv6_addr_copy(orig, &fl6->daddr);894894+ ipv6_addr_copy(&fl6->daddr, ((struct rt0_hdr *)opt->srcrt)->addr);895895 return orig;896896}897897
+11-8
net/ipv6/fib6_rules.c
···2929 u8 tclass;3030};31313232-struct dst_entry *fib6_rule_lookup(struct net *net, struct flowi *fl,3232+struct dst_entry *fib6_rule_lookup(struct net *net, struct flowi6 *fl6,3333 int flags, pol_lookup_t lookup)3434{3535 struct fib_lookup_arg arg = {···3737 .flags = FIB_LOOKUP_NOREF,3838 };39394040- fib_rules_lookup(net->ipv6.fib6_rules_ops, fl, flags, &arg);4040+ fib_rules_lookup(net->ipv6.fib6_rules_ops,4141+ flowi6_to_flowi(fl6), flags, &arg);41424243 if (arg.result)4344 return arg.result;···5049static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp,5150 int flags, struct fib_lookup_arg *arg)5251{5252+ struct flowi6 *flp6 = &flp->u.ip6;5353 struct rt6_info *rt = NULL;5454 struct fib6_table *table;5555 struct net *net = rule->fr_net;···73717472 table = fib6_get_table(net, rule->table);7573 if (table)7676- rt = lookup(net, table, flp, flags);7474+ rt = lookup(net, table, flp6, flags);77757876 if (rt != net->ipv6.ip6_null_entry) {7977 struct fib6_rule *r = (struct fib6_rule *)rule;···88868987 if (ipv6_dev_get_saddr(net,9088 ip6_dst_idev(&rt->dst)->dev,9191- &flp->fl6_dst,8989+ &flp6->daddr,9290 rt6_flags2srcprefs(flags),9391 &saddr))9492 goto again;9593 if (!ipv6_prefix_equal(&saddr, &r->src.addr,9694 r->src.plen))9795 goto again;9898- ipv6_addr_copy(&flp->fl6_src, &saddr);9696+ ipv6_addr_copy(&flp6->saddr, &saddr);9997 }10098 goto out;10199 }···115113static int fib6_rule_match(struct fib_rule *rule, struct flowi *fl, int flags)116114{117115 struct fib6_rule *r = (struct fib6_rule *) rule;116116+ struct flowi6 *fl6 = &fl->u.ip6;118117119118 if (r->dst.plen &&120120- !ipv6_prefix_equal(&fl->fl6_dst, &r->dst.addr, r->dst.plen))119119+ !ipv6_prefix_equal(&fl6->daddr, &r->dst.addr, r->dst.plen))121120 return 0;122121123122 /*···128125 */129126 if (r->src.plen) {130127 if (flags & RT6_LOOKUP_F_HAS_SADDR) {131131- if (!ipv6_prefix_equal(&fl->fl6_src, &r->src.addr,128128+ if (!ipv6_prefix_equal(&fl6->saddr, &r->src.addr,132129 r->src.plen))133130 return 0;134131 } else if (!(r->common.flags & FIB_RULE_FIND_SADDR))135132 return 0;136133 }137134138138- if (r->tclass && r->tclass != ((ntohl(fl->fl6_flowlabel) >> 20) & 0xff))135135+ if (r->tclass && r->tclass != ((ntohl(fl6->flowlabel) >> 20) & 0xff))139136 return 0;140137141138 return 1;