aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_frontend.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/fib_frontend.c')
-rw-r--r--net/ipv4/fib_frontend.c28
1 files changed, 8 insertions, 20 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index eb6f69a8f27a..d3a1112b9d9c 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -158,11 +158,7 @@ static void fib_flush(struct net *net)
158struct net_device *__ip_dev_find(struct net *net, __be32 addr, bool devref) 158struct net_device *__ip_dev_find(struct net *net, __be32 addr, bool devref)
159{ 159{
160 struct flowi fl = { 160 struct flowi fl = {
161 .nl_u = { 161 .fl4_dst = addr,
162 .ip4_u = {
163 .daddr = addr
164 }
165 },
166 .flags = FLOWI_FLAG_MATCH_ANY_IIF 162 .flags = FLOWI_FLAG_MATCH_ANY_IIF
167 }; 163 };
168 struct fib_result res = { 0 }; 164 struct fib_result res = { 0 };
@@ -193,7 +189,7 @@ static inline unsigned __inet_dev_addr_type(struct net *net,
193 const struct net_device *dev, 189 const struct net_device *dev,
194 __be32 addr) 190 __be32 addr)
195{ 191{
196 struct flowi fl = { .nl_u = { .ip4_u = { .daddr = addr } } }; 192 struct flowi fl = { .fl4_dst = addr };
197 struct fib_result res; 193 struct fib_result res;
198 unsigned ret = RTN_BROADCAST; 194 unsigned ret = RTN_BROADCAST;
199 struct fib_table *local_table; 195 struct fib_table *local_table;
@@ -247,13 +243,9 @@ int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif,
247{ 243{
248 struct in_device *in_dev; 244 struct in_device *in_dev;
249 struct flowi fl = { 245 struct flowi fl = {
250 .nl_u = { 246 .fl4_dst = src,
251 .ip4_u = { 247 .fl4_src = dst,
252 .daddr = src, 248 .fl4_tos = tos,
253 .saddr = dst,
254 .tos = tos
255 }
256 },
257 .mark = mark, 249 .mark = mark,
258 .iif = oif 250 .iif = oif
259 }; 251 };
@@ -853,13 +845,9 @@ static void nl_fib_lookup(struct fib_result_nl *frn, struct fib_table *tb)
853 struct fib_result res; 845 struct fib_result res;
854 struct flowi fl = { 846 struct flowi fl = {
855 .mark = frn->fl_mark, 847 .mark = frn->fl_mark,
856 .nl_u = { 848 .fl4_dst = frn->fl_addr,
857 .ip4_u = { 849 .fl4_tos = frn->fl_tos,
858 .daddr = frn->fl_addr, 850 .fl4_scope = frn->fl_scope,
859 .tos = frn->fl_tos,
860 .scope = frn->fl_scope
861 }
862 }
863 }; 851 };
864 852
865#ifdef CONFIG_IP_MULTIPLE_TABLES 853#ifdef CONFIG_IP_MULTIPLE_TABLES