~ubuntu-branches/ubuntu/precise/network-manager/precise

« back to all changes in this revision

Viewing changes to src/nm-system.c

  • Committer: Package Import Robot
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2012-02-09 16:45:41 UTC
  • mfrom: (1.1.53)
  • Revision ID: package-import@ubuntu.com-20120209164541-4h90zknlsfdb7x35
Tags: 0.9.2.0+git201202091925.c721477-0ubuntu1
* upstream snapshot 2012-02-09 19:25:59 (GMT)
  + c721477d11d4fe144111d6d2eec8f93f2e9186c9
* debian/patches/avoid-periodic-disk-wakeups.patch: refreshed.
* debian/patches/nl3-default-ip6-route.patch: refreshed.
* debian/libnm-glib4.symbols: add symbols:
  + nm_active_connection_get_master@Base
  + nm_client_new_async@Base
  + nm_client_new_finish@Base
  + nm_remote_settings_new_async@Base
  + nm_remote_settings_new_finish@Base
  + nm_device_get_state_reason@Base
* debian/libnm-util2.symbols: add symbols:
  + nm_setting_802_1x_get_pac_file@Base
  + nm_setting_infiniband_get_transport_mode@Base

Show diffs side-by-side

added added

removed removed

Lines of Context:
849
849
        struct rtnl_route *route = NULL;
850
850
        struct nl_sock *nlh;
851
851
        int err = -1;
852
 
        int dst=0;
 
852
        int dst = 0;
853
853
 
854
854
        g_return_val_if_fail (ifindex > 0, -ENODEV);
855
855
 
864
864
 
865
865
        /* Add the new default route */
866
866
        err = nm_netlink_route_add (route, AF_INET, &dst, 0, &gw, NLM_F_REPLACE);
 
867
        if (err == -NLE_EXIST)
 
868
                err = 0;
867
869
 
868
870
        rtnl_route_put (route);
869
871
        return err;
1034
1036
        g_return_val_if_fail (route != NULL, -ENOMEM);
1035
1037
 
1036
1038
        /* Add the new default route */
1037
 
        err = nm_netlink_route_add(route, AF_INET6, &dest, 0, gw, NLM_F_REPLACE);
 
1039
        err = nm_netlink_route_add (route, AF_INET6, &dest, 0, gw, NLM_F_REPLACE);
1038
1040
        if (err == -NLE_EXIST) {
1039
1041
                /* FIXME: even though we use NLM_F_REPLACE the kernel won't replace
1040
1042
                 * the route if it's the same.  Should try to remove it first, then
1065
1067
        if (err == 0)
1066
1068
                return TRUE;
1067
1069
 
 
1070
        if (err == -NLE_EXIST)
 
1071
                return TRUE;
 
1072
 
1068
1073
        iface = nm_netlink_index_to_iface (ifindex);
1069
1074
        if (!iface)
1070
1075
                goto out;