Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

route_get hangs on ipv6 / mac os x #19

Closed
GoogleCodeExporter opened this issue Jun 14, 2015 · 2 comments
Closed

route_get hangs on ipv6 / mac os x #19

GoogleCodeExporter opened this issue Jun 14, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

This is on Mac OS X 10.6

/*
 * function: find_default_route_entry input: none output: addr (libdnet)
 * structure with the default route address
 */
struct addr    *
find_default_route_entry()
{
        route_t        *r = NULL;
        struct route_entry *e = NULL;
        int             i = 0;

        if ((e = malloc(sizeof(struct route_entry))) == NULL)
                crapout("malloc: failed to allocate route_entry for find_default_route");


        memset((void *) e, 0, sizeof(struct route_entry));
        if ((i = addr_pton("::", &((*e).route_dst))) < 0)
                crapout("dnet: Failed to addr_pton");

        if ((r = route_open()) == NULL)
                crapout("dnet: Failed to route_open");

        if ((i = route_get(r, e)) < 0)
                crapout("dnet: Failed to route_get");

        route_close(r);

        dprintf("default gateway addr: %s\n", addr_ntoa(&((*e).route_gw)));

        return &((*e).route_gw);

}


Expected output: interface for default route on IPv6.
dnet 1.12
OS X 10.6.7

Original issue reported on code.google.com by jfesler on 23 Mar 2011 at 10:00

@ReturnToTheYouth
Copy link

hello ! I want to ask you that how to use lidnet?

@ofalk
Copy link
Owner

ofalk commented Apr 30, 2022

old report. if there is still an issue, please open a new one on a fresh system.

@ofalk ofalk closed this as completed Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants