The cache here doesn't work anymore as the recent
commit
b772066ffd066d59d9ebce092f6665150723d2ad
("route-table: Remove Unregister.")
made this function called before daemonizing,
thus with a different pid.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Acked-by: Ben Pfaff <blp@nicira.com>
#include "ovs-router.h"
#include "util.h"
-static int pid;
-
bool
ovs_router_lookup(ovs_be32 ip, char name[], ovs_be32 *gw)
{
struct sockaddr *sa;
static int seq;
int i, len, namelen, rtsock;
+ const pid_t pid = getpid();
rtsock = socket(PF_ROUTE, SOCK_RAW, 0);
if (rtsock < 0)
void
route_table_init(void)
{
- pid = getpid();
}
void