aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_frontend.c
diff options
context:
space:
mode:
authorMichael Smith <msmith@cbnco.com>2011-04-07 00:51:50 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-10 21:50:59 -0400
commit5c04c819a20af40adb7d282199f4e34e14fa05c5 (patch)
treec92925ffcf83d593f8cd52faed144cc43289d7f9 /net/ipv4/fib_frontend.c
parent5325e92f33eef5fb54e2e63185d965b4be59a4b3 (diff)
fib_validate_source(): pass sk_buff instead of mark
This makes sk_buff available for other use in fib_validate_source(). Signed-off-by: Michael Smith <msmith@cbnco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_frontend.c')
-rw-r--r--net/ipv4/fib_frontend.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 451088330bbb..f162f84b8d6d 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -188,9 +188,9 @@ EXPORT_SYMBOL(inet_dev_addr_type);
188 * - check, that packet arrived from expected physical interface. 188 * - check, that packet arrived from expected physical interface.
189 * called with rcu_read_lock() 189 * called with rcu_read_lock()
190 */ 190 */
191int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif, 191int fib_validate_source(struct sk_buff *skb, __be32 src, __be32 dst, u8 tos,
192 struct net_device *dev, __be32 *spec_dst, 192 int oif, struct net_device *dev, __be32 *spec_dst,
193 u32 *itag, u32 mark) 193 u32 *itag)
194{ 194{
195 struct in_device *in_dev; 195 struct in_device *in_dev;
196 struct flowi4 fl4; 196 struct flowi4 fl4;
@@ -202,7 +202,6 @@ int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif,
202 202
203 fl4.flowi4_oif = 0; 203 fl4.flowi4_oif = 0;
204 fl4.flowi4_iif = oif; 204 fl4.flowi4_iif = oif;
205 fl4.flowi4_mark = mark;
206 fl4.daddr = src; 205 fl4.daddr = src;
207 fl4.saddr = dst; 206 fl4.saddr = dst;
208 fl4.flowi4_tos = tos; 207 fl4.flowi4_tos = tos;
@@ -214,8 +213,7 @@ int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif,
214 no_addr = in_dev->ifa_list == NULL; 213 no_addr = in_dev->ifa_list == NULL;
215 rpf = IN_DEV_RPFILTER(in_dev); 214 rpf = IN_DEV_RPFILTER(in_dev);
216 accept_local = IN_DEV_ACCEPT_LOCAL(in_dev); 215 accept_local = IN_DEV_ACCEPT_LOCAL(in_dev);
217 if (mark && !IN_DEV_SRC_VMARK(in_dev)) 216 fl4.flowi4_mark = IN_DEV_SRC_VMARK(in_dev) ? skb->mark : 0;
218 fl4.flowi4_mark = 0;
219 } 217 }
220 218
221 if (in_dev == NULL) 219 if (in_dev == NULL)