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>
This commit is contained in:
Changli Gao
2010-11-12 18:43:55 +00:00
committed by David S. Miller
parent dd68ad2235
commit 5811662b15
32 changed files with 171 additions and 316 deletions

View File

@@ -1537,13 +1537,9 @@ static void ipmr_queue_xmit(struct net *net, struct mr_table *mrt,
if (vif->flags & VIFF_TUNNEL) {
struct flowi fl = {
.oif = vif->link,
.nl_u = {
.ip4_u = {
.daddr = vif->remote,
.saddr = vif->local,
.tos = RT_TOS(iph->tos)
}
},
.fl4_dst = vif->remote,
.fl4_src = vif->local,
.fl4_tos = RT_TOS(iph->tos),
.proto = IPPROTO_IPIP
};
@@ -1553,12 +1549,8 @@ static void ipmr_queue_xmit(struct net *net, struct mr_table *mrt,
} else {
struct flowi fl = {
.oif = vif->link,
.nl_u = {
.ip4_u = {
.daddr = iph->daddr,
.tos = RT_TOS(iph->tos)
}
},
.fl4_dst = iph->daddr,
.fl4_tos = RT_TOS(iph->tos),
.proto = IPPROTO_IPIP
};