aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
authorChangli Gao <xiaosuo@gmail.com>2010-11-12 13:43:55 -0500
committerDavid S. Miller <davem@davemloft.net>2010-11-17 15:27:45 -0500
commit5811662b15db018c740c57d037523683fd3e6123 (patch)
treef820610a6024799a26699f22dc9a4ef5dee07978 /net/ipv6/route.c
parentdd68ad2235b4625e0dc928b2b4c614d265f976d3 (diff)
net: use the macros defined for the members of flowi
Use the macros defined for the members of flowi to clean the code up. Signed-off-by: Changli Gao <xiaosuo@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 96455ffb76fb..c346ccf66ae1 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -558,11 +558,7 @@ struct rt6_info *rt6_lookup(struct net *net, const struct in6_addr *daddr,
558{ 558{
559 struct flowi fl = { 559 struct flowi fl = {
560 .oif = oif, 560 .oif = oif,
561 .nl_u = { 561 .fl6_dst = *daddr,
562 .ip6_u = {
563 .daddr = *daddr,
564 },
565 },
566 }; 562 };
567 struct dst_entry *dst; 563 struct dst_entry *dst;
568 int flags = strict ? RT6_LOOKUP_F_IFACE : 0; 564 int flags = strict ? RT6_LOOKUP_F_IFACE : 0;
@@ -778,13 +774,9 @@ void ip6_route_input(struct sk_buff *skb)
778 int flags = RT6_LOOKUP_F_HAS_SADDR; 774 int flags = RT6_LOOKUP_F_HAS_SADDR;
779 struct flowi fl = { 775 struct flowi fl = {
780 .iif = skb->dev->ifindex, 776 .iif = skb->dev->ifindex,
781 .nl_u = { 777 .fl6_dst = iph->daddr,
782 .ip6_u = { 778 .fl6_src = iph->saddr,
783 .daddr = iph->daddr, 779 .fl6_flowlabel = (* (__be32 *) iph)&IPV6_FLOWINFO_MASK,
784 .saddr = iph->saddr,
785 .flowlabel = (* (__be32 *) iph)&IPV6_FLOWINFO_MASK,
786 },
787 },
788 .mark = skb->mark, 780 .mark = skb->mark,
789 .proto = iph->nexthdr, 781 .proto = iph->nexthdr,
790 }; 782 };
@@ -1463,12 +1455,8 @@ static struct rt6_info *ip6_route_redirect(struct in6_addr *dest,
1463 struct ip6rd_flowi rdfl = { 1455 struct ip6rd_flowi rdfl = {
1464 .fl = { 1456 .fl = {
1465 .oif = dev->ifindex, 1457 .oif = dev->ifindex,
1466 .nl_u = { 1458 .fl6_dst = *dest,
1467 .ip6_u = { 1459 .fl6_src = *src,
1468 .daddr = *dest,
1469 .saddr = *src,
1470 },
1471 },
1472 }, 1460 },
1473 }; 1461 };
1474 1462