From dad6d904ee96a2411c4bfa30cc59f1451f6e13df Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Tue, 18 Sep 2012 17:55:38 +0200 Subject: Use source address in get_nexthop() call Otherwise the nexthop returned might belong to a different route than the one actually used with the current source address. --- src/libhydra/kernel/kernel_interface.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/libhydra/kernel/kernel_interface.h') diff --git a/src/libhydra/kernel/kernel_interface.h b/src/libhydra/kernel/kernel_interface.h index a17e8c6bb..338cf39af 100644 --- a/src/libhydra/kernel/kernel_interface.h +++ b/src/libhydra/kernel/kernel_interface.h @@ -282,7 +282,7 @@ struct kernel_interface_t { * Does a route lookup to get the source address used to reach dest. * The returned host is allocated and must be destroyed. * An optional src address can be used to check if a route is available - * for given source to dest. + * for the given source to dest. * * @param dest target destination address * @param src source address to check, or NULL @@ -296,11 +296,13 @@ struct kernel_interface_t { * * Does a route lookup to get the next hop used to reach dest. * The returned host is allocated and must be destroyed. + * An optional src address can be used to check if a route is available + * for the given source to dest. * * @param dest target destination address * @return next hop address, NULL if unreachable */ - host_t* (*get_nexthop)(kernel_interface_t *this, host_t *dest); + host_t* (*get_nexthop)(kernel_interface_t *this, host_t *dest, host_t *src); /** * Get the interface name of a local address. -- cgit v1.2.3