Age | Commit message (Collapse) | Author |
|
This finally allows to use source-hash for dynamic loadbalancing, eg.
"rdr-to <hosts> source-hash", instead of just round-robin and least-states.
An older pre-siphash version of this diff was tested by many people.
OK tedu@ benno@
|
|
|
|
|
|
limit and the requested value.
OK henning@
|
|
be clever, but it is definitely confusing. Use a flag IFI_VALID_LLADDR
to indicate that the ifi->hw_address field is valid, rather than
assuming ifi->linkstat does that. Add startup_time to record client
startup rather than using first_sending and hoping nobody else needs
it until link is complete.
|
|
latest information. So back off to using interface_status() to
directly query the interface when link status is in question. Partly
from Nathanael Rensen's original diff.
Also, while waiting for initial link, keep checking every second
rather than backing off to checking every (default) 60 seconds after
(default) 10 seconds.
|
|
the routing socket initialization. Otherwise certain combinations
of UP/RUNNING/active will generate the deadly RTM_IFINFO with RTF_UP
== 0 and kill the client. Add comment to nail this section in place.
|
|
link comes up and nothing has yet been displayed.
|
|
has expired. In S_REBOOT state_reboot() assumes link is present and
starts sending REQUEST/DISCOVER packets and doing the backoff dance
after retry_interval expires. Stay in S_PREBOOT until link appears.
Pointed out by and initial diff from Nathanael Rensen.
|
|
noted as being up. Thus avoiding a premature exit if extra RTM_IFINFO
messages arrive before state_reboot() gets a chance to run.
|
|
some interfaces (e.g. em(4) in qemu) do not have this flag set in
the RTM_IFINFO message dhclient gets.
Problem found & fix tested by Nathanael Rensen. Thanks!
|
|
OK millert@
|
|
state S_PREBOOT and associated state_preboot() function.
This results in routing socket messages being processed even while
the link is being waited for. Thus the RTM_IFINFO message announcing
the link is ready can be reacted to immediately, rather than waiting
for the sleep(1)'ing process to wake up and look at the link state.
Some interfaces seem to lose the first packet sent when the RTM_IFINFO
message is reacted to so quickly, so temporarily leave in place an
explicit delay before sending the first packet.
|
|
sure the negative error gets treated correctly and doesn't get
accidentally promoted to a huge unsigned value.
From Pedro Martelletto, thanks! OK reyk
|
|
Crash reported and fix tested by Vincent Gross <dermiste at kilob ! yt>;
patch from Pedro Martelletto, thanks!
|
|
ok matthew
|
|
itk florian
|
|
input jmc@
|
|
OK deraadt@
|
|
OK deraadt@
|
|
if_register_receive.
|
|
|
|
construction of default client identifier until link is up (i.e.
do it in state_reboot()).
|
|
relying on S_REBOOTING being 0.
|
|
the validity of the interface name as soon the actual name is known.
i.e. right after 'egress' is expanded. One less thing for
get_hw_address() to do.
|
|
incrementing sporadic errors until the limit is exceeded. i.e. only
exit dhclient when enough consecutive errors occur. Tweak error
messages.
Don't bother checking interface_status() when receive_packet()
fails. Let other status checks function on their own.
|
|
|
|
exits, so there is no need to constantly check if 'ifi' is NULL.
Similarly 'ifi->bfdesc' is successfully opened during initialization
or dhclient exits, so there is no point in constantly checking if
it has regressed to -1. Finally, no need to check 'ifi->linkstat'
before trying to read a packet. If there is a packet it should just
as well be read immediately rather than waiting for the link to
reappear and confuse things.
No intentional functional change.
|
|
|
|
info provided in RTM_IFINFO messages. But it didn't replicate the
checks for IFI_NOMEDIA and (IFF_UP | IFF_RUNNING) used in
interface_status() to set ifi->linkstat. So the test (LINK_STATE_IS_UP()
!= ifi->linkstat) was comparing kiwi fruit and hairballs.
Do the additional checks using info present in the RTM_IFINFO
message. As a result interface_status() need not be called to
update ifi->linkstat. Thus avoiding opening/closing a socket and
some ioctls to re-obtain the info already provided in the RTM_IFINFO
message.
Using RTM_IFINFO data ok mpi@
|
|
Hoist one-time initialization of client identifier out of
get_hw_address() to the one-time initialization code in main().
No intentional functional change.
|
|
the two copies of the bpf socket descriptor (rfdesc, wfdesc) with
just one (bfdesc). No need to keep a struct ifreq (ifp) since it's
only used once and can be constructed there and discarded. Nuke
unused 'primary_address' member.
No intentional functional change.
|
|
before filling it in with read_client_conf(). Fixes seg fault when
lease {} statement is used.
Problem reported by Alessandro de Laurenzis via misc@. Thanks!
|
|
ok deraadt guenther
|
|
ok deraadt@ tedu@
|
|
Fixes a pfctl crash with an anchor name containing
an embedded nul found with the afl fuzzer.
pfctl parse.y patch from and ok deraadt@
|
|
|
|
kernel struct vnode defintion, and the only consumer (pstat) still needs
kvm to read much of the required information. no great loss to always use
kvm until there's a better replacement interface.
ok deraadt millert uebayasi
|
|
ok deraadt@
|
|
ok espie@ deraadt@ millert@ tedu@
|
|
the priv child but before getting hardware link. Reducing further the
possibly inappropriate information the priv child could read.
|
|
after forking the privileged process, which should not be reading
those bits. No intentional functional change.
|
|
error print statement.
|
|
From bytevolcano at safe-mail dot net
|
|
troff displays these as typographic quotes, but nroff implementations
almost always print them literally, which rarely has the intended effect
with modern fonts, even in stock xterm.
These uses of `` '' can be replaced either with more semantic alternatives
or with Dq, which prints typographic quotes in a UTF-8 locale (but will
automatically fall back to `` '' in an ASCII locale).
improvements and ok schwarze@
|
|
|
|
|
|
RAMDISKs. grows ifconfig on SMALL media slightly, verified to still fit on
amd64 i386 sparc64 alpha hppa macppc by me. ok krw reyk
|
|
yywarn() definition.
ok bluhm@
|
|
ok mikeb
|