2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-31 06:15:55 +00:00

Initial merge of Poger dhclient and linux hacks

This commit is contained in:
Ted Lemon
1997-01-02 12:00:19 +00:00
parent b289b0107c
commit 469cf3a4b5
20 changed files with 2206 additions and 372 deletions

View File

@@ -42,7 +42,7 @@
#ifndef lint
static char copyright[] =
"$Id: nit.c,v 1.9 1996/09/05 23:56:52 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n";
"$Id: nit.c,v 1.10 1997/01/02 12:00:17 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -329,3 +329,21 @@ size_t receive_packet (interface, buf, len, from, hfrom)
return length;
}
#endif
#if defined (USE_NIT_SEND)
void if_enable (interface)
struct interface_info *interface;
{
struct ifreq ifr;
/* Bring the interface down and then up again to clear
* all its routes. */
strncpy(ifr.ifr_name, interface -> name, IFNAMSIZ);
if (ioctl(interface -> rfdesc, SIOCGIFFLAGS, &ifr) < 0)
error ("SIOCGIFFLAGS %s: %m", interface -> name);
ifr.ifr_flags |= (IFF_UP|IFF_RUNNING);
if (ioctl(interface -> rfdesc, SIOCSIFFLAGS, &ifr) == -1)
error ("SIOCSIFFLAGS %s: %m", interface -> name);
}
#endif