Matt Layher
411780cd8e
internal/dhcp4: fix error case
...
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2020-05-09 17:00:07 -04:00
Michael Stapelberg
c0067c5aa5
change diff order to -want +got
...
This is easier to read and consistent with how we do things at work.
2019-07-11 08:42:21 +02:00
Michael Stapelberg
3765287e97
dhcp4: use SetReadDeadline, not SetDeadline
...
fixes https://github.com/rtr7/router7/issues/25
related to https://github.com/mdlayher/raw/issues/42
2019-03-21 09:18:32 +01:00
Michael Stapelberg
3dad1e9a23
dhcp4: use the configured (not the current) MAC address
...
This fixes a race where dhcp4 started before netconfigd had a chance to change
the hardware address on the uplink0 interface.
fiber7’s port security feature may result in an about hour-long internet outage
without this commit.
2019-02-19 09:39:16 +01:00
Michael Stapelberg
ddcdd39737
dhcp4: drop last ack to restart with DISCOVER upon receiving NAK
...
fixes #13
2018-12-25 14:10:21 +01:00
Michael Stapelberg
df9a40557c
dhcp4: correctly check errors from c.once
2018-11-21 08:41:24 +01:00
Michael Stapelberg
bef7168112
dhcp4: resolve TODOs in comments
2018-11-21 08:41:07 +01:00
Michael Stapelberg
5b34daeb4e
no-op cleanup: switch to dhcp4.LeaseFromACK
2018-11-21 08:23:57 +01:00
Michael Stapelberg
8c55c5ba44
dhcp4: switch to github.com/rtr7/dhcp4
...
All existing DHCPv4 packages I looked at were unappealing for one reason or
another, so we’re now using a little helper to glue github.com/google/gopacket
and github.com/mdlayher/raw together, which suffices for our use-case and gives
us more control.
2018-11-21 08:18:58 +01:00
Michael Stapelberg
0bbc1d923d
refactor replayer code into pcapreplayer package
2018-10-22 21:04:35 +02:00
Philipp Hug
aa404c3c54
Request nameserver, router and netmask as it might not be automatically returned by dhcp server. ( #7 )
2018-09-05 10:06:31 -06:00
Michael Stapelberg
b05fd74006
dhcp4: increase timeout to 10s
2018-07-03 17:37:17 +02:00
Michael Stapelberg
ff7aa8f2cb
add copyright notices
2018-06-28 20:08:23 +02:00
Michael Stapelberg
8b85084429
dhcp4: persist DHCPACK to renew existing lease after reboot
2018-06-15 17:30:57 +02:00
Michael Stapelberg
d2ecb190ac
dhcp4: skip DHCPDISCOVER when renewing
2018-06-15 09:58:51 +02:00
Michael Stapelberg
19aa03bf58
dhcp4: specify previous IP address when renewing
2018-06-13 19:32:20 +02:00
Michael Stapelberg
c28d816805
update for dhcp4client changes
2018-06-02 10:15:50 +02:00
Michael Stapelberg
2079aea3a1
return better error message for -EAGAIN
2018-06-01 22:18:30 +02:00
Michael Stapelberg
c05bd22afe
make temporary errors temporary, not permanent
2018-06-01 22:18:15 +02:00
Michael Stapelberg
7f93ea6661
hook up SIGUSR2 to DHCPRELEASE
2018-06-01 22:18:04 +02:00
Michael Stapelberg
6b9ce5728a
Initial commit
2018-05-27 17:30:42 +02:00