[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#694965: netcfg: Allow setup of pointopoint routes to reach gateway



There already seems to be some code in static.c like the code below, but it doesn't seem to be working

Manual configuration always only cycles through the following requests:
IP Address
Mask
Gateway

then it seems to try to configure the network and complains about an unreachable gateway.

Instead I'd expect it to pop up the query for the pointopoint link.

Sometimes you can even trigger netcfg tp pop up a dialog box which shows the network config overview and there it is obvious that there is a unfilled pointopoint variable.

So this is rather a bug to be fixed then a wishlist item.

Please fix.

Thank you.

Cheers
  Mike

static int netcfg_get_pointopoint(struct debconfclient *client, struct netcfg_interface *interface)
{
    int ret, ok = 0;
    union inX_addr addr;

    while (!ok) {
        debconf_input(client, "critical", "netcfg/get_pointopoint");
        ret = debconf_go(client);

        if (ret)
            return ret;

        debconf_get(client, "netcfg/get_pointopoint");

        if (empty_str(client->value)) {           /* No P-P is ok */
            interface->pointopoint[0] = '\0';
            return 0;
        }

        ok = inet_pton (interface->address_family, client->value, &addr);

        if (!ok) {
            debconf_capb(client);
            debconf_input (client, "critical", "netcfg/bad_ipaddress");
            debconf_go (client);
            debconf_capb(client, "backup");
        }
    }

inet_ntop(interface->address_family, &addr, interface->pointopoint, NETCFG_ADDRSTRLEN);
    return 0;
}


Reply to: