Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d553fed3 authored by Niranjan Pendharkar's avatar Niranjan Pendharkar Committed by Steve Kondik
Browse files

Do not add default route during ifc_configure

Avoid duplicate default routes.
Remove adding of default routes during interface configuration as
route add/remove operation is managed by ConnectivityService via netd.
(cherry picked from commit 4a48635c72d91cf8decb7653948fe0c76de46098)

Change-Id: I982b95a44bf91d3850ca7752e307c1b1b6a66ecf
parent 46ccee6e
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2013 The Linux Foundation. All rights reserved.
 * Copyright 2008, The Android Open Source Project
 * Copyright (C) 2011, Code Aurora Forum. All rights reserved.
 *
@@ -802,11 +803,14 @@ ifc_configure(const char *ifname,
        ifc_close();
        return -1;
    }

#ifndef QCOM_HARDWARE
    if (ifc_create_default_route(ifname, gateway)) {
        printerr("failed to set default route %s: %s\n", ipaddr_to_string(gateway), strerror(errno));
        ifc_close();
        return -1;
    }
#endif

    ifc_close();