int rt_genid;
unsigned int rt_flags;
__u16 rt_type;
+ __u16 rt_is_input;
- int rt_route_iif;
int rt_iif;
/* Info on neighbour */
static inline bool rt_is_input_route(const struct rtable *rt)
{
- return rt->rt_route_iif != 0;
+ return rt->rt_is_input != 0;
}
static inline bool rt_is_output_route(const struct rtable *rt)
{
- return rt->rt_route_iif == 0;
+ return rt->rt_is_input == 0;
}
static inline __be32 rt_nexthop(const struct rtable *rt, __be32 daddr)
rth->rt_genid = rt_genid(dev_net(dev));
rth->rt_flags = RTCF_MULTICAST;
rth->rt_type = RTN_MULTICAST;
- rth->rt_route_iif = dev->ifindex;
+ rth->rt_is_input= 1;
rth->rt_iif = dev->ifindex;
rth->rt_pmtu = 0;
rth->rt_gateway = 0;
rth->rt_genid = rt_genid(dev_net(rth->dst.dev));
rth->rt_flags = flags;
rth->rt_type = res->type;
- rth->rt_route_iif = in_dev->dev->ifindex;
+ rth->rt_is_input = 1;
rth->rt_iif = in_dev->dev->ifindex;
rth->rt_pmtu = 0;
rth->rt_gateway = 0;
rth->rt_genid = rt_genid(net);
rth->rt_flags = flags|RTCF_LOCAL;
rth->rt_type = res.type;
- rth->rt_route_iif = dev->ifindex;
+ rth->rt_is_input = 1;
rth->rt_iif = dev->ifindex;
rth->rt_pmtu = 0;
rth->rt_gateway = 0;
rth->rt_genid = rt_genid(dev_net(dev_out));
rth->rt_flags = flags;
rth->rt_type = type;
- rth->rt_route_iif = 0;
+ rth->rt_is_input = 0;
rth->rt_iif = orig_oif ? : dev_out->ifindex;
rth->rt_pmtu = 0;
rth->rt_gateway = 0;
if (new->dev)
dev_hold(new->dev);
- rt->rt_route_iif = ort->rt_route_iif;
+ rt->rt_is_input = ort->rt_is_input;
rt->rt_iif = ort->rt_iif;
rt->rt_pmtu = ort->rt_pmtu;
struct rtable *rt = (struct rtable *)xdst->route;
const struct flowi4 *fl4 = &fl->u.ip4;
- xdst->u.rt.rt_route_iif = fl4->flowi4_iif;
xdst->u.rt.rt_iif = fl4->flowi4_iif;
xdst->u.dst.dev = dev;
/* Sheit... I remember I did this right. Apparently,
* it was magically lost, so this code needs audit */
+ xdst->u.rt.rt_is_input = rt->rt_is_input;
xdst->u.rt.rt_flags = rt->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST |
RTCF_LOCAL);
xdst->u.rt.rt_type = rt->rt_type;