Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 847935 Details for
Bug 983325
NetworkManager does not add route for dhcp server
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Latest upstream patch with better logging and device route if no gateway
rh983325-dhcp4-server-route.patch (text/plain), 2.93 KB, created by
Scott Shambarger
on 2014-01-09 23:14:34 UTC
(
hide
)
Description:
Latest upstream patch with better logging and device route if no gateway
Filename:
MIME Type:
Creator:
Scott Shambarger
Created:
2014-01-09 23:14:34 UTC
Size:
2.93 KB
patch
obsolete
>From 7cbc8929f1c4a296c98648700ce2e04f90252109 Mon Sep 17 00:00:00 2001 >From: Scott Shambarger <devel@shambarger.net> >Date: Thu, 9 Jan 2014 14:26:53 -0800 >Subject: [PATCH 1/1] core: Add host route for DHCP4 server if outside assigned > subnet (bgo #721767) > >Some ISP's provide leases from central servers that are on different >subnets that the address offered. If the host does not configure the >interface as the default route, the dhcp server may not be reachable >via unicast, and a host specific route is needed. > >https://bugzilla.gnome.org/show_bug.cgi?id=721767 >https://bugzilla.redhat.com/show_bug.cgi?id=983325 >--- > src/dhcp-manager/nm-dhcp-client.c | 39 +++++++++++++++++++++++++++++++++++++-- > 1 file changed, 37 insertions(+), 2 deletions(-) > >diff --git a/src/dhcp-manager/nm-dhcp-client.c b/src/dhcp-manager/nm-dhcp-client.c >index 4bbcdeb..ef9db1f 100644 >--- a/src/dhcp-manager/nm-dhcp-client.c >+++ b/src/dhcp-manager/nm-dhcp-client.c >@@ -1191,8 +1191,8 @@ ip4_options_to_config (NMDHCPClient *self) > > for (s = routers; *s; s++) { > /* FIXME: how to handle multiple routers? */ >- if (inet_pton (AF_INET, *s, &tmp_addr) > 0) { >- nm_ip4_config_set_gateway (ip4_config, tmp_addr); >+ if (inet_pton (AF_INET, *s, &gwaddr) > 0) { >+ nm_ip4_config_set_gateway (ip4_config, gwaddr); > nm_log_info (LOGD_DHCP4, " gateway %s", *s); > break; > } else >@@ -1202,6 +1202,41 @@ ip4_options_to_config (NMDHCPClient *self) > } > } > >+ /* >+ * RFC 2132, section 9.7 >+ * DHCP clients use the contents of the 'server identifier' field >+ * as the destination address for any DHCP messages unicast to >+ * the DHCP server. >+ * >+ * Some ISP's provide leases from central servers that are on >+ * different subnets that the address offered. If the host >+ * does not configure the interface as the default route, the >+ * dhcp server may not be reachable via unicast, and a host >+ * specific route is needed. >+ **/ >+ str = g_hash_table_lookup (priv->options, "new_dhcp_server_identifier"); >+ if (str) { >+ if (inet_pton (AF_INET, str, &tmp_addr) > 0) { >+ NMPlatformIP4Route route; >+ guint32 mask = nm_utils_ip4_prefix_to_netmask(address.plen); >+ >+ nm_log_info (LOGD_DHCP4, " dhcp_server_identifier %s", str); >+ if ((tmp_addr & mask) != (address.address & mask)) { >+ /* DHCP server not on assigned subnet, route needed */ >+ memset (&route, 0, sizeof (route)); >+ route.network = tmp_addr; >+ route.plen = 32; >+ /* this will be a device route if gwaddr is 0 */ >+ route.gateway = gwaddr; >+ nm_ip4_config_add_route (ip4_config, &route); >+ nm_log_info (LOGD_IP, "adding route for dhcp_server_identifier: %s", >+ nm_platform_ip4_route_to_string (&route)); >+ } >+ } >+ else >+ nm_log_warn (LOGD_DHCP4, "ignoring invalid dhcp_server_identifier '%s'", str); >+ } >+ > str = g_hash_table_lookup (priv->options, "new_dhcp_lease_time"); > if (str) { > address.lifetime = address.preferred = strtoul (str, NULL, 10); >-- >1.8.4.2 >
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 983325
:
846878
|
847421
| 847935