Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 238819 Details for
Bug 296267
net-dialup/ppp version update to 2.4.5 request
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
files/patch/defaultgateway.patch
defaultgateway.patch (text/plain), 2.71 KB, created by
Marshall McMullen
on 2010-07-15 04:49:23 UTC
(
hide
)
Description:
files/patch/defaultgateway.patch
Filename:
MIME Type:
Creator:
Marshall McMullen
Created:
2010-07-15 04:49:23 UTC
Size:
2.71 KB
patch
obsolete
>This patch reverses revision 1.114 of the pppd/sys-linux.c file. >The default gateway is needed by the openswan's %defaultroute. >diff -Nru ppp-2.4.4.orig/pppd/sys-linux.c ppp-2.4.4/pppd/sys-linux.c >--- ppp-2.4.4.orig/pppd/sys-linux.c 2006-10-05 09:58:39.000000000 +0300 >+++ ppp-2.4.4/pppd/sys-linux.c 2006-10-05 10:06:37.000000000 +0300 >@@ -209,7 +209,7 @@ > static unsigned char inbuf[512]; /* buffer for chars read from loopback */ > > static int if_is_up; /* Interface has been marked up */ >-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); >@@ -1615,17 +1615,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; > >@@ -1634,14 +1634,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; > } > >@@ -1654,7 +1656,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); >@@ -1665,7 +1667,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 ))
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 296267
:
238813
|
238815
|
238817
| 238819 |
238821
|
238823
|
238825
|
238827
|
238829
|
238831
|
238833