legal_server_ethersrc is ignored

Bug #1078757 reported by Harald Hannelius
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dhcp-probe (Ubuntu)
New
Undecided
Unassigned

Bug Description

I have the ethernet/mac-address of my DHCP-server registered in /etc/dhcp_probe.cf but it gets ignored. I get alarms about a non-rogue DHCP-server even though the docs suggest I shouldn't.

# /usr/sbin/dhcp_probe -T -p /var/run/dhcp-probe/dhcp_probe.pid.br1 br1 -c /etc/dhcp_probe.cf -d10 -f
note: starting, version 1.3.0
info: read_configfile: starting
debug: read_configfile: legal_server_ethersrc 0:xx:xx:6f:60:55
info: read_configfile: done
info: using interface br1, no 802.1Q (IP address 10.0.0.222, hardware address bc:xx:xx:xx:12:13)
info: socket receive timeout feature enabled
warn: received unexpected response on interface br1 from BootP/DHCP server with IP source xxx.xxx.32.254 (ether src 0:xx:xx:6f:60:55).
^Cinfo: received request to quit
info: received request to quit
note: exiting

I have edited the output to omit parts of IP-addresses and MAC-addresses. The mac-addresses do match though.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: dhcp-probe 1.3.0-8
ProcVersionSignature: Ubuntu 3.2.0-31.50-generic 3.2.28
Uname: Linux 3.2.0-31-generic x86_64
ApportVersion: 2.0.1-0ubuntu15
Architecture: amd64
Date: Wed Nov 14 17:10:51 2012
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
MarkForUpload: True
SourcePackage: dhcp-probe
UpgradeStatus: Upgraded to precise on 2012-06-25 (142 days ago)
mtime.conffile..etc.init.d.dhcp.probe: 2012-11-14T16:59:05.875295

Revision history for this message
Harald Hannelius (harald-arcada) wrote :
description: updated
Revision history for this message
liviu (cpliviu) wrote :

there is any update ?

Revision history for this message
liviu (cpliviu) wrote :

found sollution
i modify a file but i don't know how make a patch
+++ src/dhcp_probe.c 2013-05-23 12:01:00.927000081 +0300
@@ -708,6 +708,7 @@
        int isYiaddrInLeaseNetworksOfConcern = 0; /* boolean */
        char yiaddr_network_of_concern_addenda[STR_MAXLEN];
        int isLegalServer; /* boolean */
+ int isLegalServermac; /* boolean */

        /* fields parsed out from packet*/
        struct ether_addr ether_dhost, ether_shost;
@@ -836,6 +837,7 @@

        /* Determine if the response is from an expected server. */
        isLegalServer = 1; /* start by assuming it is expected. */
+ isLegalServermac = 1; /* start by assuming it is expected. */

        if (!isLegalServersMember(&ip_src)) {
                if (debug > 10)
@@ -846,10 +848,10 @@
        if (!isLegalServerEthersrcsMember(&ether_shost)) {
                if (debug > 10)
                        report(LOG_DEBUG, " ether_shost %s is not a legal server", ether_shost_str);
- isLegalServer = 0;
+ isLegalServermac = 0;
        }

- if (isLegalServer) {
+ if (isLegalServer || isLegalServermac) {
                if (debug > 10)
                        report(LOG_DEBUG, " this is a legal server, ignoring");
                return;

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.