RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 803540 - DHCP server fails to start if the subnet is not the primary subnet for a device
Summary: DHCP server fails to start if the subnet is not the primary subnet for a device
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: dhcp
Version: 6.2
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Jiri Popelka
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On: 449946
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-14 23:53 UTC by joshua
Modified: 2013-02-21 08:23 UTC (History)
5 users (show)

Fixed In Version: dhcp-4.1.1-33.P1.el6
Doc Type: Bug Fix
Doc Text:
Cause Network interface of a server has 2 or more configured IP addresses and the DHCP server itself is configured to serve subnets to whose the second (or any next, not just the first) IP address belongs. Consequence DHCP server is able to discover only the first IP address of network interface and therefore is able to serve only subnets to which only the first address belongs. If the server is configured to serve only subnet to which the second or any next IP address of the network interface belong, it refuses to start with 'No subnet declaration for ...' message. Fix Network interface addresses discovery code was completely changed. Result DHCP server is now able to find all addresses of a network interface and therefore is able to serve subnets to which these adressess belong.
Clone Of:
Environment:
Last Closed: 2013-02-21 08:23:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Use getifaddrs() for interface discovery code on Linux (10.28 KB, patch)
2012-03-29 10:09 UTC, Jiri Popelka
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0504 0 normal SHIPPED_LIVE Low: dhcp security and bug fix update 2013-02-20 21:30:36 UTC

Description joshua 2012-03-14 23:53:51 UTC
Description of problem:

Same bug as http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=590641

We have a server with one NIC, on two logical networks, and DHCP won't work with the secondary (alias) interface and subnet.  Is there a fix for this?  This worked in DHCP v3, but not in v4.


Version-Release number of selected component (if applicable):

dhcp-4.1.1-25.P1.el6_2.1.x86_64

Comment 1 joshua 2012-03-14 23:59:38 UTC
Here is the exact error:

No subnet declaration for br0:1 (no IPv4 addresses).
** Ignoring requests on br0:1.  If this is not what you want, please write a subnet declaration in your dhcpd.conf file for the network segment to which interface br0:1 is attached. **

... except that I *do* have a subnet declared that is on (and only on) br0:1 !

Comment 3 Jiri Popelka 2012-03-15 11:55:11 UTC
Yes, this is a "common bug" in dhcp-4, see bug #449946 and
https://lists.isc.org/pipermail/dhcp-hackers/2011-June/001920.html

There is a patch, however it's quite invasive and I'd rather not diverge from upstream *so much* (I don't see it much likely that they ever merge it).

I'm sure this bug bothers you but I'd rather not use this patch in RHEL-6, because it could break a lot of other stuff.
What about this plan ? :
- I'll make a RHEL-6 scratch build (testing build that won't make it into official repositories) for you with this patch applied.
  I just need to know which architecture (x86_64/i686 etc.) do you use so I can send proper testing packages to you.
- If you confirm that it fixes the problem for you and you see no regressions I'll finally fix bug #449946 in Fedora so the patch gets some more testing in Fedora and will eventually make it into RHEL-7.

I'm closing (however we can still discuss it here) this ticket as NEXTRELEASE because it could eventually be fixed in RHEL-7.
But it won't be fixed in RHEL-6 from reasons stated earlier. Thank you for understanding.

Comment 4 joshua 2012-03-15 19:17:43 UTC
Awesome!  RHEL 6.2 x86_64 is what we are using.

I can test said scratch packages for you immediately

Comment 5 Jiri Popelka 2012-03-21 13:11:38 UTC
Try this:
http://jpopelka.fedorapeople.org/dhcp-netlink/

Comment 6 Jiri Popelka 2012-03-29 10:09:10 UTC
Created attachment 573612 [details]
Use getifaddrs() for interface discovery code on Linux

(In reply to comment #3)
> Yes, this is a "common bug" in dhcp-4, see bug #449946 and
> https://lists.isc.org/pipermail/dhcp-hackers/2011-June/001920.html
> 
> There is a patch, however it's quite invasive and I'd rather not diverge from
> upstream *so much* (I don't see it much likely that they ever merge it).

As I stated in bug #449946, comment #9 I had figured out another solution than the patch from dhcp-hackers mailing list. It's simple - it actually throws out all the interface discovery code (380 lines) for Linux and uses the same code as for *BSD/OSX, i.e. getifaddrs() function.
Therefore it shouldn't break anything and also could be acceptable for upstream.

> But it won't be fixed in RHEL-6 from reasons stated earlier.

I changed my mind. Reopenning for RHEL-6.

Comment 10 Jiri Popelka 2012-08-24 14:14:23 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause
Network interface of a server has 2 or more configured IP addresses and the DHCP server itself is configured to serve subnets to whose the second (or any next, not just the first) IP address belongs.

Consequence
DHCP server is able to discover only the first IP address of network interface and therefore is able to serve only subnets to which only the first address belongs. If the server is configured to serve only subnet to which the second or any next IP address of the network interface belong, it refuses to start with 'No subnet declaration for ...' message.

Fix
Network interface addresses discovery code was completely changed.

Result
DHCP server is now able to find all addresses of a network interface and therefore is able to serve subnets to which these adressess belong.

Comment 12 Ladislav Jozsa 2012-09-25 14:50:17 UTC
Verified on RHEL6, dhcp-4.1.1-34.P1.el6.x86_64. dhcpd is now able to start and provide service when configured to bind to secondary IP address only.

Comment 13 errata-xmlrpc 2013-02-21 08:23:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0504.html


Note You need to log in before you can comment on or make changes to this bug.