kernel-pfroute: Don't set a gateway if it is of a different address family than the destination
This commit is contained in:
parent
896d729a60
commit
da565d9832
|
@ -1448,7 +1448,8 @@ static status_t manage_route(private_kernel_pfroute_net_t *this, int op,
|
|||
}
|
||||
break;
|
||||
case RTAX_GATEWAY:
|
||||
if (gateway)
|
||||
if (gateway &&
|
||||
gateway->get_family(gateway) == dst->get_family(dst))
|
||||
{
|
||||
add_rt_addr(&msg.hdr, RTA_GATEWAY, gateway);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue