Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Use pw->pw_dir when chroot'ing, not _PATH_VAREMPTY. | krw | 2019-08-06 | 1 | -2/+2 |
| | | | | | | | Brings various dhcp related daemons into line with the common idiom. ok florian@ | ||||
* | Consistently spell "IPsec" in comments and debug outputs. | mpi | 2018-03-16 | 1 | -2/+2 |
| | | | | From Raf Czlonka, ok sthen@ | ||||
* | Don't stop logging to stderr when running in foreground with -d. | reyk | 2017-07-05 | 1 | -4/+3 |
| | | | | Pointed out by Kapetanakis Giannis | ||||
* | constify pc_remote and pc_circuit | reyk | 2017-04-04 | 1 | -3/+3 |
| | | | | OK rzalamena@ | ||||
* | Move the server struct to header file and make it compatible with IPv6. | rzalamena | 2017-03-16 | 1 | -16/+12 |
| | | | | ok reyk@ | ||||
* | Improve the interface and addresses discovery code and prepare to | rzalamena | 2017-03-15 | 1 | -4/+10 |
| | | | | | | receive IPv6 support. ok reyk@ | ||||
* | Remove some global variables that are not being used. | rzalamena | 2017-03-14 | 1 | -17/+7 |
| | | | | ok gsoares@, jca@ | ||||
* | Eliminate pointless'%m' (a.k.a. hand rolled strerror()) by using fatal() and | krw | 2017-02-13 | 1 | -18/+17 |
| | | | | log_warn(). Zap a couple of explicit 'syslog()' calls. | ||||
* | Adjust some long lines. | krw | 2017-02-13 | 1 | -3/+4 |
| | |||||
* | Switch from old errwarn.c logging to shiny new log.[ch]. | krw | 2017-02-13 | 1 | -52/+53 |
| | | | | ok benno@ | ||||
* | Add dhcrelay(8) command-line option for replacing Relay Agent Information | rzalamena | 2016-12-16 | 1 | -5/+13 |
| | | | | | | | on the incoming packets. Man page tweaks from jmc@ ok reyk@ | ||||
* | Unbreak the dhcrelay(8) support to run on enc(4) interfaces. | rzalamena | 2016-12-13 | 1 | -2/+3 |
| | | | | ok reyk@ | ||||
* | Unbreak the insertion of Relay Agent Information on layer 3 mode when | rzalamena | 2016-12-13 | 1 | -9/+16 |
| | | | | | | using the default values: use the right address for remote-id. ok reyk@ | ||||
* | Filter DHCP reply messages that were not meant for us by looking at the | rzalamena | 2016-12-13 | 1 | -1/+6 |
| | | | | | | gateway set. This happens mostly because we are watching a BPF socket. Suggested by and ok jca@ | ||||
* | simplify previous; ok reyk | jmc | 2016-12-13 | 1 | -2/+2 |
| | |||||
* | Implement support for layer 2 relaying and add further Relay Agent | rzalamena | 2016-12-12 | 1 | -84/+396 |
| | | | | | | | Information (RFC 3046) options. While at there change the naming of the remote destination parameters: instead of "server" call it "destination". ok reyk@ | ||||
* | Clean up function prototypes: use a single struct to hold all address | rzalamena | 2016-12-08 | 1 | -20/+26 |
| | | | | | | | | information instead of passing multiple different parameters. This also prepares the dhcrelay code to receive new features, like: IPv6, layer 2 relaying. ok jca@ | ||||
* | Simplify get_interfaces function, make it return NULL if we didn't find | rzalamena | 2016-12-08 | 1 | -1/+6 |
| | | | | | | | the interface and abort dhcrelay with a more friendly message when we don't have an address configured in the interface. ok jca@ | ||||
* | DHCP requests can be relayed through multiple relays. Currently we | patrick | 2016-12-07 | 1 | -11/+14 |
| | | | | | | | | | | | | | drop requests that have already been relayed. To allow usage in the middle of a chain, remove this check and only set giaddr if it has not been set yet. This giaddr will be used by the DHCP server to identify which subnet the client is connected to. RFC 1542 specifies that we should increase the hop counter every time we relay a request. If we receive a request whose hop counter exceeds the value of 16 we must silently drop it. ok jca@ | ||||
* | If the BROADCAST flag is set on a BOOTREPLY, the RFC specifies that | patrick | 2016-12-07 | 1 | -7/+15 |
| | | | | | | | | we SHOULD forward the packet not only as L3 broadcast, but also as L2 broadcast. Apparently that helps on older machines that can't handle L2 unicast replies. ok jca@ | ||||
* | pledge(2) dhcrelay with "stdio route". route is needed for interface ioctls. | reyk | 2016-12-07 | 1 | -1/+4 |
| | | | | OK rzalamena@ | ||||
* | Rename function discover_interfaces into get_interface and change its | rzalamena | 2016-12-07 | 1 | -9/+4 |
| | | | | | | prototype to be more useful. ok reyk@ | ||||
* | Exit early from rdaemon() is the passed fd is invalid. | jca | 2016-09-26 | 1 | -1/+7 |
| | | | | fd == -1 check suggested by deraadt@, ok florian@ | ||||
* | Go in the background later, using rdaemon(). | jca | 2016-09-15 | 1 | -6/+40 |
| | | | | | | | | | | | | rdaemon() works like daemon(3) but requires its caller to pre-open /dev/null. This makes it possible to go in the background after a chroot(2), allowing for more error checking. The pattern is basically - open /dev/null - chroot - privdrop - rdaemon "design" initialy discussed with semarie@ a while ago, ok dlg@ | ||||
* | Avoid double negations in tests. | jca | 2016-09-04 | 1 | -5/+7 |
| | | | | ok krw@ | ||||
* | Pull in <time.h> for one or more of gmtime, strftime, strptime, time, | guenther | 2016-08-27 | 1 | -1/+2 |
| | | | | | | timegm, and tzset ok deraadt@ | ||||
* | Eliminate #include inside *.h files and include only needed headers in | krw | 2016-02-07 | 1 | -2/+20 |
| | | | | | | | each *.c file. Inspired by mention of header silliness by Edgar Pettijohn and mmcc@ on tech@. | ||||
* | typo in comment | benno | 2013-03-04 | 1 | -2/+2 |
| | | | | ok deraadt | ||||
* | VMware PXE "ROMs" confuse the DHCP gateway address with the IP | dlg | 2013-01-15 | 1 | -1/+12 |
| | | | | | | | | | | | | gateway address. This is a problem if your DHCP relay is running on something that's not your network gateway. It is purely informational from the relay to the client so we can safely clear it. stupid vmware. ok krw@ beck@ | ||||
* | 'ingnoring' -> 'ignoring' in a couple of note()'s. | krw | 2012-06-22 | 1 | -3/+3 |
| | |||||
* | Convert SO_RTABLE's protocol level to the SOL_SOCKET; ok claudio | mikeb | 2011-06-21 | 1 | -3/+3 |
| | |||||
* | Fix the naming of interfaces and variables for rdomains and rtables | guenther | 2010-07-03 | 1 | -4/+4 |
| | | | | | | | | | | | | and make it possible to bind sockets (including listening sockets!) to rtables and not just rdomains. This changes the name of the system calls, socket option, and ioctl. After building with this you should remove the files /usr/share/man/cat2/[gs]etrdomain.0. Since this removes the existing [gs]etrdomain() system calls, the libc major is bumped. Written by claudio@, criticized^Wcritiqued by me | ||||
* | Pick up the rdomain from the specified interface and use that rdomain for | claudio | 2009-11-03 | 1 | -3/+31 |
| | | | | | | relaying the packets to the server. If you need to use cross-domain forwarding us pf to bounce the packets back and forth. sure deraadt@ | ||||
* | Add support for "DHCP-over-IPsec" by implementing RFC 3046 (DHCP Relay | reyk | 2009-09-03 | 1 | -4/+143 |
| | | | | | | | | | | Agent Information Option) and RFC 3456 (DHCP Configuration of IPsec Tunnel Mode). This allows to configure various IPsec clients dynamically via DHCP; dhcrelay needs to listen on enc0 and forward requests to a DHCP server that supports RFC 3046, like I recently did for dhcpd(8). ok krw@ | ||||
* | missing new-line character. | sobrado | 2008-07-09 | 1 | -2/+2 |
| | |||||
* | documentation tweaks. | sobrado | 2008-07-09 | 1 | -3/+3 |
| | |||||
* | return on ECONNREFUSED so we don't fall through to 'result < | stevesk | 2007-02-09 | 1 | -1/+4 |
| | | | | | | BOOTP_MIN_LEN' and display discarding message. ok henning@ claudio@ | ||||
* | warn() -> warning() to not overload with libc function; this has | stevesk | 2006-12-18 | 1 | -3/+3 |
| | | | | previously been done to dhclient and dhcpd | ||||
* | no "\n" needed here; ok henning@ | stevesk | 2006-11-21 | 1 | -2/+2 |
| | |||||
* | pretty up print_hw_addr(), and even fix a teeny buffer overflow; ok otto | deraadt | 2005-11-13 | 1 | -24/+19 |
| | |||||
* | -endpwent | henning | 2005-05-23 | 1 | -2/+1 |
| | |||||
* | more setres[ug]id; ok deraadt@ | djm | 2005-05-02 | 1 | -3/+3 |
| | |||||
* | Fixed a typo. | norby | 2005-01-25 | 1 | -2/+2 |
| | | | | ok henning@ claudio@ | ||||
* | Use a udp socket to communicate with the dhcp servers. The bpf interface | claudio | 2004-10-12 | 1 | -5/+73 |
| | | | | | | can't be used to forward the packets. Bpf would relay the packets to wrong interface. Reports and tests by Hans Kremers and Colin Harford OK henning@ | ||||
* | -p and -q are no more | jaredy | 2004-08-15 | 1 | -2/+2 |
| | | | | ok deraadt | ||||
* | tzset | henning | 2004-05-12 | 1 | -1/+3 |
| | |||||
* | remove unused stuff; henning ok | deraadt | 2004-05-04 | 1 | -3/+1 |
| | |||||
* | fix _dhcp use nonexistant error message here too | henning | 2004-04-21 | 1 | -2/+2 |
| | |||||
* | get rid of the -p switch, use fixed values for server and client ports, | canacar | 2004-04-20 | 1 | -21/+10 |
| | | | | | rename port variables for clarity. ok henning@ | ||||
* | more shrinking; ok henning | deraadt | 2004-04-20 | 1 | -3/+3 |
| |