summaryrefslogtreecommitdiff
path: root/user/ppp/10_all_defaultgateway.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-02-26 04:04:05 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-02-26 04:04:05 +0000
commit74e1ebacbf29188a4d41381d83b2bb47e593b241 (patch)
tree508a04ffd433fb8c98a78b7c42aca7390835ef3b /user/ppp/10_all_defaultgateway.patch
parentce0afc1e48e10bf96d9de42a005669db6d41ed16 (diff)
downloadpackages-74e1ebacbf29188a4d41381d83b2bb47e593b241.tar.gz
packages-74e1ebacbf29188a4d41381d83b2bb47e593b241.tar.bz2
packages-74e1ebacbf29188a4d41381d83b2bb47e593b241.tar.xz
packages-74e1ebacbf29188a4d41381d83b2bb47e593b241.zip
user/ppp: [CVE!] Bump to 2.4.8
Diffstat (limited to 'user/ppp/10_all_defaultgateway.patch')
-rw-r--r--user/ppp/10_all_defaultgateway.patch90
1 files changed, 0 insertions, 90 deletions
diff --git a/user/ppp/10_all_defaultgateway.patch b/user/ppp/10_all_defaultgateway.patch
deleted file mode 100644
index 1b7ae6396..000000000
--- a/user/ppp/10_all_defaultgateway.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-This patch reverses revision 1.114 of the pppd/sys-linux.c file.
-The default gateway is needed by the openswan's %defaultroute.
-
---- ppp-2.4.7/pppd/sys-linux.c
-+++ ppp-2.4.7/pppd/sys-linux.c
-@@ -206,7 +206,7 @@
-
- static int if_is_up; /* Interface has been marked up */
- static int if6_is_up; /* Interface has been marked up for IPv6, to help differentiate */
--static int have_default_route; /* Gateway for default route added */
-+static u_int32_t default_route_gateway; /* Gateway for default route added */
- static u_int32_t proxy_arp_addr; /* Addr for proxy arp entry added */
- static char proxy_arp_dev[16]; /* Device for proxy arp entry */
- static u_int32_t our_old_addr; /* for detecting address changes */
-@@ -346,8 +346,8 @@
- /*
- * Delete any routes through the device.
- */
-- if (have_default_route)
-- cifdefaultroute(0, 0, 0);
-+ if (default_route_gateway != 0)
-+ cifdefaultroute(0, 0, default_route_gateway);
-
- if (has_proxy_arp)
- cifproxyarp(0, proxy_arp_addr);
-@@ -1621,17 +1621,17 @@
- struct rtentry rt;
-
- if (defaultroute_exists(&rt) && strcmp(rt.rt_dev, ifname) != 0) {
-- if (rt.rt_flags & RTF_GATEWAY)
-- error("not replacing existing default route via %I",
-- SIN_ADDR(rt.rt_gateway));
-- else
-- error("not replacing existing default route through %s",
-- rt.rt_dev);
-+ u_int32_t old_gateway = SIN_ADDR(rt.rt_gateway);
-+
-+ if (old_gateway != gateway)
-+ error("not replacing existing default route to %s [%I]",
-+ rt.rt_dev, old_gateway);
- return 0;
- }
-
-- memset (&rt, 0, sizeof (rt));
-- SET_SA_FAMILY (rt.rt_dst, AF_INET);
-+ memset (&rt, '\0', sizeof (rt));
-+ SET_SA_FAMILY (rt.rt_dst, AF_INET);
-+ SET_SA_FAMILY (rt.rt_gateway, AF_INET);
-
- rt.rt_dev = ifname;
-
-@@ -1640,14 +1640,16 @@
- SIN_ADDR(rt.rt_genmask) = 0L;
- }
-
-- rt.rt_flags = RTF_UP;
-+ SIN_ADDR(rt.rt_gateway) = gateway;
-+
-+ rt.rt_flags = RTF_UP | RTF_GATEWAY;
- if (ioctl(sock_fd, SIOCADDRT, &rt) < 0) {
- if ( ! ok_error ( errno ))
- error("default route ioctl(SIOCADDRT): %m");
- return 0;
- }
-
-- have_default_route = 1;
-+ default_route_gateway = gateway;
- return 1;
- }
-
-@@ -1660,7 +1662,7 @@
- {
- struct rtentry rt;
-
-- have_default_route = 0;
-+ default_route_gateway = 0;
-
- memset (&rt, '\0', sizeof (rt));
- SET_SA_FAMILY (rt.rt_dst, AF_INET);
-@@ -1673,7 +1675,9 @@
- SIN_ADDR(rt.rt_genmask) = 0L;
- }
-
-- rt.rt_flags = RTF_UP;
-+ SIN_ADDR(rt.rt_gateway) = gateway;
-+
-+ rt.rt_flags = RTF_UP | RTF_GATEWAY;
- if (ioctl(sock_fd, SIOCDELRT, &rt) < 0 && errno != ESRCH) {
- if (still_ppp()) {
- if ( ! ok_error ( errno ))