summaryrefslogtreecommitdiff
path: root/sbin
AgeCommit message (Collapse)Author
2017-06-19Various KNF nits.Kenneth R Westerback
2017-06-19Erroneous host names in various options should be ignoredKenneth R Westerback
and not cause the lease to be declined. Restore inadvertantly changed behaviour. Tweak logic to also ignore invalid host names in domain-search. Reported by Christer Solskogen via misc@
2017-06-18Move the timeout information into struct interface_info withKenneth R Westerback
the rest of the dhcp state. One less struct (dhcp_timeout) to worry about, one less field (ifi) to keep track of.
2017-06-18Convert last set_timeout() use to set_timeout_interval() andKenneth R Westerback
then remove set_timeout() and rename set_timeout_interval() to set_timeout().
2017-06-18Drop (int) casts of (time_t - time_t) calculations thatKenneth R Westerback
are assigned to an int variable.
2017-06-18Nuke stray and misleading comment.Kenneth R Westerback
2017-06-18Make 'DEBUG' compile again.Kenneth R Westerback
2017-06-18Nuke unused pointer to non-existant struct.Kenneth R Westerback
2017-06-17Shuffle dhcp[offer|ack|nak]() functions together for easy reference.Kenneth R Westerback
2017-06-17Rename struct interface_info field 'new' to clearer 'offer'.Kenneth R Westerback
2017-06-17We accept either the first offer received, or an offer for theKenneth R Westerback
current address if one arrives inside select_timeout. So there is no need to keep a list of received offers. Just keep the best one and DECLINE the rest. Nuke now unused 'offered_leases' TAILQ. Also fixes the oddity that the *last* offer for the current address is taken rather than the *first*.
2017-06-17DECLINE offers as they are deemed invalid. Decline them at theKenneth R Westerback
first problem rather than continuing to look for other reasons to decline them. Nuke is_invalid field since it is now unused. More informative log message when a lease is determined to be unacceptable.
2017-06-16pfctl: merge identifical if conditions and void functions discarding ret valuesAdam Wolk
Transform the following functions (which never return anything other than 0, and whose return value is never used) to void: * pfctl_clear_stats, pfctl_clear_interface_flags, pfctl_clear_rules, pfctl_clear_src_nodes, pfctl_clear_states * pfctl_kill_src_nodes, pfctl_net_kill_states, pfctl_label_kill_states, pfctl_id_kill_states, pfctl_key_kill_states inside main: merge two identical if conditions next to each other into one. Submitted by rain1 (thanks!) with additional credit to: - mikeb@ for pointing out we can void all _clear_ functions - ghostyy for pointing out all _kill_ functions can be voided OK tb@, mikeb@
2017-06-16Nuke 'is_bootp' field and just use a #define to check if the leaseKenneth R Westerback
has DHO_DHCP_MESSAGE_TYPE info.
2017-06-16mark files as BUILDFIRST, or write explicit dependencies, so that mostMarc Espie
programs will build even without a make depend first. okay tb@ millert@
2017-06-16s/CPU_LIDSUSPEND/CPU_LIDACTION/Martin Natano
ok mlarkin
2017-06-15Nuke unused parameter 'client_addr' from the 'handlers', i.e.Kenneth R Westerback
dhcpoffer(), dhcpack(), dhcpnak().
2017-06-15Nuke unused parameter 'client_addr' from packet_to_lease().Kenneth R Westerback
2017-06-14No need to be coy - call a "struct interface_info *" aKenneth R Westerback
"struct interface_info *" and not a "void *". No intentional functional change.
2017-06-14Move active, new, offered_leases, leases fromKenneth R Westerback
client_state to interface_info. Nuke empty struct client_state. No intentional functional change.
2017-06-14Move state, destination, interval, requested_address fromKenneth R Westerback
client_state to interface_info. No intentional functional change.
2017-06-14Move xid, secs, first_sending, startup_time fields fromKenneth R Westerback
client_state to interface_info. No intentional functional change.
2017-06-14Start consolidating client_state into interface_info. FirstKenneth R Westerback
fields to move: recv_packet, sent_packet and sent_packet_length. No intentional functional change.
2017-06-14No need for two 'flags' fields. Consolidate into one, fixingKenneth R Westerback
value of IFI_HUP while passing.
2017-06-13Kill unused #define IFI_NOMEDIA.Kenneth R Westerback
2017-06-13Rename 'packet' field to 'recv_packet' and 'bootrequest_packet'Kenneth R Westerback
field to 'sent_packet'. Also 'bootrequest_packet_length' to 'sent_packet_length'. Adopt consistent idiom of a local variable 'packet' to point at packet being manipulated. No intentional functional change.
2017-06-12pledge(2) bpf has been in use for some time now on tcpdump(8), this will enableRicardo Mestre
it also for pflogd(8)'s priv proc. OK deraadt@
2017-06-12redundant, gets BINDIR from ../Makefile.incMarc Espie
2017-06-12destroy lint remnants.Marc Espie
okay millert@ deraadt@
2017-06-10Nuke unused field bootp_policy and associated enum{}.Kenneth R Westerback
2017-06-10Nuke unused global warnings_occurred.Kenneth R Westerback
2017-06-10missing space before trailing punctuation; found with mandoc -TlintIngo Schwarze
2017-06-09turns out the case of 802.1 suffixes is significant. fix up 802.1X and Q.David Gwynne
pointed out by jsg@
2017-06-08remove the timeslot code, it was only for now deleted T1 devices.Ted Unangst
ok sthen
2017-06-08consistently use lowercase suffixes for 802.1 things.David Gwynne
eg, 802.1x, 802.1q, and 802.1ad
2017-06-07use the same formatting for vlan as the rest of the page; ok dlgJason McIntyre
2017-06-07Fix clang warning about tautological compare: an unsigned long can'tChristian Weisgerber
be negative. ok deraadt@
2017-06-07update the VLAN doco.David Gwynne
the parameters are parent and vnetid, not vlandev and vlan. svlan(4) is also a thing. ok jmc@
2017-06-06We are going to start slaacd(8) much earlier, before /var is evenFlorian Obser
mounted. Move control socket to /dev for now. Input & OK deraadt@
2017-06-06make vnetid and parent commands available in SMALL ifconfigs.David Gwynne
the code behind the commands has been built on SMALL forever, this just moves it available in the cmd table. the binary doesnt change size.
2017-06-05remove vlan(4) specific output handlingDavid Gwynne
vlan(4) now understands the generic vnetid and ifparent ioctls, so this is redundant. ok henning@
2017-06-03Move slaacd to /sbinFlorian Obser
jca points out that all the other interface configuration tools live there (like ifconfig or dhclient). Furthermore it starts so early in the boot process that /usr might not be mounted yet if it's a nfs filesystem. sthen and deraadt agree
2017-06-01Expand $eapid in iked tags, allowing PF rules to be written based on EAPStuart Henderson
identity (username). OK mikeb@
2017-06-01Return time_uptime as value for when pf was enabled instead ofPatrick Wildt
time_second. Since time_second changes depending on the wall- clock time, time_second is not a reliable source for the status. We can even end up with a negative time delta. Thus, use the monotonically growing time_uptime and export it to userland. ok bluhm@ mikeb@
2017-05-31fold the vnetid and parent lines into a single encap line.David Gwynne
this is a modest attempt to shorten the ifconfig output. encap wont show up if neither vnetid or parent are supplied by an interface. whitespace tweaks from benno@ output tweaks from reyk@ ok deraadt@ henning@
2017-05-30Fix escaping: .Nm Op Fl "Dx" turning into "pflogd [-DragonFly]"Ingo Schwarze
is funny, but not useful, so say .Nm Op Fl \&Dx as required.
2017-05-30fix a commentHenning Brauer
2017-05-28Don't check np->port for NULL - it's an array, it's never NULL.Michal Mazurek
OK bluhm@
2017-05-28Elegant and reliable link status checking courtesy of mpi@.Kenneth R Westerback
Less of unreliable ioctl(SIOCGIFMEDIA), more getifaddrs(). ok mpi@
2017-05-28print_ioctl() is unused if not debugging. Found with clang, afterMichal Mazurek
marking the function "static". Use OSFP_DEBUG, in a similar fashion to OPT_DEBUG (pfctl_optimize.c). OK bluhm@