}
if (!error && router.s_addr) {
- error = netdev_add_router(router);
+ error = netdev_add_router(cli->netdev, router);
if (error) {
VLOG_ERR("failed to add default route to "IP_FMT" on %s: %s",
IP_ARGS(&router), netdev_get_name(cli->netdev),
return error;
}
-/* Adds 'router' as a default IP gateway. */
+/* Adds 'router' as a default IP gateway for the TCP/IP stack that corresponds
+ * to 'netdev'. */
int
-netdev_add_router(struct in_addr router)
+netdev_add_router(struct netdev *netdev UNUSED, struct in_addr router)
{
struct in_addr any = { INADDR_ANY };
struct rtentry rt;
int netdev_set_advertisements(struct netdev *, uint32_t advertise);
int netdev_get_in4(const struct netdev *, struct in_addr *);
int netdev_set_in4(struct netdev *, struct in_addr addr, struct in_addr mask);
-int netdev_add_router(struct in_addr router);
+int netdev_add_router(struct netdev *, struct in_addr router);
bool netdev_get_in6(const struct netdev *, struct in6_addr *);
int netdev_get_flags(const struct netdev *, enum netdev_flags *);
int netdev_set_flags(struct netdev *, enum netdev_flags, bool permanent);
}
if (gateway.s_addr) {
- if (!netdev_add_router(gateway)) {
+ if (!netdev_add_router(netdev, gateway)) {
VLOG_INFO("bridge %s: configured gateway "IP_FMT,
br->name, IP_ARGS(&gateway.s_addr));
}