diff options
| author | Chris Metcalf <cmetcalf@tilera.com> | 2010-08-06 10:37:02 -0400 | 
|---|---|---|
| committer | Chris Metcalf <cmetcalf@tilera.com> | 2010-08-06 10:37:02 -0400 | 
| commit | ab11b487402f97975f3ac1eeea09c82f4431481e (patch) | |
| tree | 86337c5cbbd2b0c4bd07c0847a1dc7de3d898147 /net/ipv4/fib_frontend.c | |
| parent | 1c689cbcf2c2b7a35cd237abddd9206bb1b6fee1 (diff) | |
| parent | fc1caf6eafb30ea185720e29f7f5eccca61ecd60 (diff) | |
Merge branch 'master' into for-linus
Diffstat (limited to 'net/ipv4/fib_frontend.c')
| -rw-r--r-- | net/ipv4/fib_frontend.c | 13 | 
1 files changed, 7 insertions, 6 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index 4f0ed458c883..a43968918350 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c  | |||
| @@ -175,6 +175,7 @@ out: | |||
| 175 | fib_res_put(&res); | 175 | fib_res_put(&res); | 
| 176 | return dev; | 176 | return dev; | 
| 177 | } | 177 | } | 
| 178 | EXPORT_SYMBOL(ip_dev_find); | ||
| 178 | 179 | ||
| 179 | /* | 180 | /* | 
| 180 | * Find address type as if only "dev" was present in the system. If | 181 | * Find address type as if only "dev" was present in the system. If | 
| @@ -214,12 +215,14 @@ unsigned int inet_addr_type(struct net *net, __be32 addr) | |||
| 214 | { | 215 | { | 
| 215 | return __inet_dev_addr_type(net, NULL, addr); | 216 | return __inet_dev_addr_type(net, NULL, addr); | 
| 216 | } | 217 | } | 
| 218 | EXPORT_SYMBOL(inet_addr_type); | ||
| 217 | 219 | ||
| 218 | unsigned int inet_dev_addr_type(struct net *net, const struct net_device *dev, | 220 | unsigned int inet_dev_addr_type(struct net *net, const struct net_device *dev, | 
| 219 | __be32 addr) | 221 | __be32 addr) | 
| 220 | { | 222 | { | 
| 221 | return __inet_dev_addr_type(net, dev, addr); | 223 | return __inet_dev_addr_type(net, dev, addr); | 
| 222 | } | 224 | } | 
| 225 | EXPORT_SYMBOL(inet_dev_addr_type); | ||
| 223 | 226 | ||
| 224 | /* Given (packet source, input interface) and optional (dst, oif, tos): | 227 | /* Given (packet source, input interface) and optional (dst, oif, tos): | 
| 225 | - (main) check, that source is valid i.e. not broadcast or our local | 228 | - (main) check, that source is valid i.e. not broadcast or our local | 
| @@ -284,7 +287,7 @@ int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif, | |||
| 284 | if (no_addr) | 287 | if (no_addr) | 
| 285 | goto last_resort; | 288 | goto last_resort; | 
| 286 | if (rpf == 1) | 289 | if (rpf == 1) | 
| 287 | goto e_inval; | 290 | goto e_rpf; | 
| 288 | fl.oif = dev->ifindex; | 291 | fl.oif = dev->ifindex; | 
| 289 | 292 | ||
| 290 | ret = 0; | 293 | ret = 0; | 
| @@ -299,7 +302,7 @@ int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif, | |||
| 299 | 302 | ||
| 300 | last_resort: | 303 | last_resort: | 
| 301 | if (rpf) | 304 | if (rpf) | 
| 302 | goto e_inval; | 305 | goto e_rpf; | 
| 303 | *spec_dst = inet_select_addr(dev, 0, RT_SCOPE_UNIVERSE); | 306 | *spec_dst = inet_select_addr(dev, 0, RT_SCOPE_UNIVERSE); | 
| 304 | *itag = 0; | 307 | *itag = 0; | 
| 305 | return 0; | 308 | return 0; | 
| @@ -308,6 +311,8 @@ e_inval_res: | |||
| 308 | fib_res_put(&res); | 311 | fib_res_put(&res); | 
| 309 | e_inval: | 312 | e_inval: | 
| 310 | return -EINVAL; | 313 | return -EINVAL; | 
| 314 | e_rpf: | ||
| 315 | return -EXDEV; | ||
| 311 | } | 316 | } | 
| 312 | 317 | ||
| 313 | static inline __be32 sk_extract_addr(struct sockaddr *addr) | 318 | static inline __be32 sk_extract_addr(struct sockaddr *addr) | 
| @@ -1075,7 +1080,3 @@ void __init ip_fib_init(void) | |||
| 1075 | 1080 | ||
| 1076 | fib_hash_init(); | 1081 | fib_hash_init(); | 
| 1077 | } | 1082 | } | 
| 1078 | |||
| 1079 | EXPORT_SYMBOL(inet_addr_type); | ||
| 1080 | EXPORT_SYMBOL(inet_dev_addr_type); | ||
| 1081 | EXPORT_SYMBOL(ip_dev_find); | ||
