aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/igmp.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/ipv4/igmp.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/ipv4/igmp.c')
-rw-r--r--net/ipv4/igmp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index a1bf2f49e716..afb1e82a59f9 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -314,8 +314,7 @@ static struct sk_buff *igmpv3_newpack(struct net_device *dev, int size)
314 314
315 { 315 {
316 struct flowi fl = { .oif = dev->ifindex, 316 struct flowi fl = { .oif = dev->ifindex,
317 .nl_u = { .ip4_u = { 317 .fl4_dst = IGMPV3_ALL_MCR,
318 .daddr = IGMPV3_ALL_MCR } },
319 .proto = IPPROTO_IGMP }; 318 .proto = IPPROTO_IGMP };
320 if (ip_route_output_key(net, &rt, &fl)) { 319 if (ip_route_output_key(net, &rt, &fl)) {
321 kfree_skb(skb); 320 kfree_skb(skb);
@@ -660,7 +659,7 @@ static int igmp_send_report(struct in_device *in_dev, struct ip_mc_list *pmc,
660 659
661 { 660 {
662 struct flowi fl = { .oif = dev->ifindex, 661 struct flowi fl = { .oif = dev->ifindex,
663 .nl_u = { .ip4_u = { .daddr = dst } }, 662 .fl4_dst = dst,
664 .proto = IPPROTO_IGMP }; 663 .proto = IPPROTO_IGMP };
665 if (ip_route_output_key(net, &rt, &fl)) 664 if (ip_route_output_key(net, &rt, &fl))
666 return -1; 665 return -1;
@@ -1425,8 +1424,7 @@ void ip_mc_destroy_dev(struct in_device *in_dev)
1425/* RTNL is locked */ 1424/* RTNL is locked */
1426static struct in_device *ip_mc_find_dev(struct net *net, struct ip_mreqn *imr) 1425static struct in_device *ip_mc_find_dev(struct net *net, struct ip_mreqn *imr)
1427{ 1426{
1428 struct flowi fl = { .nl_u = { .ip4_u = 1427 struct flowi fl = { .fl4_dst = imr->imr_multiaddr.s_addr };
1429 { .daddr = imr->imr_multiaddr.s_addr } } };
1430 struct rtable *rt; 1428 struct rtable *rt;
1431 struct net_device *dev = NULL; 1429 struct net_device *dev = NULL;
1432 struct in_device *idev = NULL; 1430 struct in_device *idev = NULL;