summaryrefslogtreecommitdiff
path: root/pppd/sys-solaris.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2021-01-02 04:25:48 +0100
committerGitHub <noreply@github.com>2021-01-02 14:25:48 +1100
commitd0ccb87156c295da4f679f35936a976cea46d38c (patch)
tree79317d3a0c4faf01f353e8560f7be9e9dfa29769 /pppd/sys-solaris.c
parent965e7fd1c49547535097d3ee98b60f73b7152d38 (diff)
downloadppp-d0ccb87156c295da4f679f35936a976cea46d38c.tar.gz
pppd: Add replacedefaultroute option (#200)
Adds an option to pppd to control whether to replace existing default routes when using the 'defaultroute' option. If defaultroute and replacedefaultroute are both set, pppd replaces an existing default route with the new default route. The old default route is restored when the connection is taken down. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Co-authored-by: Chris Boot <bootc@debian.org>
Diffstat (limited to 'pppd/sys-solaris.c')
-rw-r--r--pppd/sys-solaris.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/pppd/sys-solaris.c b/pppd/sys-solaris.c
index 7e3a7e9..24c3776 100644
--- a/pppd/sys-solaris.c
+++ b/pppd/sys-solaris.c
@@ -2038,10 +2038,15 @@ cifaddr(int u, u_int32_t o, u_int32_t h)
* sifdefaultroute - assign a default route through the address given.
*/
int
-sifdefaultroute(int u, u_int32_t l, u_int32_t g)
+sifdefaultroute(int u, u_int32_t l, u_int32_t g, bool replace)
{
struct rtentry rt;
+ if (replace) {
+ error("Replacing the default route is not implemented on Solaris yet");
+ return 0;
+ }
+
#if defined(__USLC__)
g = l; /* use the local address as gateway */
#endif