summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f1bfe40)
raw | patch | inline | side by side (parent: f1bfe40)
author | Holger Weiss <hweiss@users.sourceforge.net> | |
Sun, 6 Jul 2008 12:57:11 +0000 (12:57 +0000) | ||
committer | Holger Weiss <hweiss@users.sourceforge.net> | |
Sun, 6 Jul 2008 12:57:11 +0000 (12:57 +0000) |
(Also, removed the unused "DHCP_UNICAST_FLAG" macro.)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2018 f882894a-f735-0410-b71e-b25c423dba1c
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2018 f882894a-f735-0410-b71e-b25c423dba1c
plugins-root/check_dhcp.c | patch | blob | history |
index 241f13ed90f9daa6c2d7dd897dae9b8e5c0c7a5c..5781f758db2e2f5a3efbc6f2e0ab2c89b90b47a3 100644 (file)
#define DHCP_INFINITE_TIME 0xFFFFFFFF
#define DHCP_BROADCAST_FLAG 32768
-#define DHCP_UNICAST_FLAG 0
#define DHCP_SERVER_PORT 67
#define DHCP_CLIENT_PORT 68
}
/* set the broadcast option - we need this to listen to DHCP broadcast messages */
- if(setsockopt(sock,SOL_SOCKET,SO_BROADCAST,(char *)&flag,sizeof flag)<0){
+ if(!unicast && setsockopt(sock,SOL_SOCKET,SO_BROADCAST,(char *)&flag,sizeof flag)<0){
printf(_("Error: Could not set broadcast option on DHCP socket!\n"));
exit(STATE_UNKNOWN);
}