Hi!
I had this problem before more than two years ago, but nobody repair bug
in source for new stable version of debian.
I am using this small patch:
--- bootp-2.4.3/bootpd.c 2005-10-25 21:49:09.521732016 +0200
+++ bootp-2.4.3-new/bootpd.c 2005-10-25 21:55:03.278952744 +0200
@@ -1140,8 +1140,18 @@
ifr = getif(s, &bp->bp_yiaddr);
if (ifr) {
struct sockaddr_in *bip;
- bip = (struct sockaddr_in *)&ifr->ifr_broadaddr;
+ struct ifreq myreq;
+ strcpy( myreq.ifr_name, ifr->ifr_name );
+ if ( ioctl( s, SIOCGIFBRDADDR, &myreq ) < 0 )
+ {
+ report(LOG_ERR, "ioctl SIOCGIFBRDADDR");
+ dst.s_addr = INADDR_BROADCAST;
+ }
+ else
+ {
+ bip = (struct sockaddr_in
*)&myreq.ifr_broadaddr;
dst = bip->sin_addr;
+ }
} else {
dst.s_addr = INADDR_BROADCAST;
}
ifr_broadaddr is union and contains if-address, not if-broadcast. Is
necessary to call ioctl again to get correct broadcast address for
interface. In other way reply is send to loopback only.
Petr
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]