#
fba40a11 |
| 04-Apr-2023 |
bluhm <bluhm@openbsd.org> |
Remove stylistic differences between arp(8) and ndp(8) delete() function. This makes it easier to spot real changes in behavior. OK kn@
|
#
2dd50cff |
| 16-Sep-2019 |
kn <kn@openbsd.org> |
Zap unused h_errno
Revision 1.84 removed the last user; no object change.
|
#
6c9a643d |
| 16-Sep-2019 |
kn <kn@openbsd.org> |
Simplify function detection
To determine which "function" (get, set, ...) is requested, use getopt(3)'s result directly as ndp(8) does instead of translating everyting into internal F_* defines and
Simplify function detection
To determine which "function" (get, set, ...) is requested, use getopt(3)'s result directly as ndp(8) does instead of translating everyting into internal F_* defines and back again.
Avoids one level of indirection, chops 22 lines of code and brings both tools closer together.
OK bluhm
show more ...
|
#
fd4782b8 |
| 31-Aug-2019 |
bluhm <bluhm@openbsd.org> |
The algorithm creating the routing addresses in route(8) and arp(6) were still not correct. While the values written to the kernel are fine, the bytes for padding were taken from memory after the so
The algorithm creating the routing addresses in route(8) and arp(6) were still not correct. While the values written to the kernel are fine, the bytes for padding were taken from memory after the sockaddr structs. In route(8) the union of sockaddrs can be made larger, so that the padding is taken from there. In arp(8) the size of the struct is known. Copy only the struct and advance over the padding. The memory has been zeroed before. Merge all address size fixes from arp(8) into ndp(8). OK claudio@
show more ...
|
#
13c75337 |
| 29-Aug-2019 |
bluhm <bluhm@openbsd.org> |
The IFP address in arp(8) used some bytes from a location depending on sizeof(long) as sockaddr_dl. We were lucky and it worked. Use the correct size and the algorithm from route(8) for arp(8). OK
The IFP address in arp(8) used some bytes from a location depending on sizeof(long) as sockaddr_dl. We were lucky and it worked. Use the correct size and the algorithm from route(8) for arp(8). OK mpi@
show more ...
|
#
bf1f2a6a |
| 27-Aug-2019 |
kn <kn@openbsd.org> |
Honour -n when deleting entries, sync parse_host() from ndp(8)
arp(8) already has a common getinetaddr() but it ignores -n for delete() and uses gethostbyname(3), so simply replace it with parse_hos
Honour -n when deleting entries, sync parse_host() from ndp(8)
arp(8) already has a common getinetaddr() but it ignores -n for delete() and uses gethostbyname(3), so simply replace it with parse_host() from ndp.c instead of changing behaviour around the old API.
In set(), make host[] and eaddr[] const since all functions receiving those variables as parameters expect const anyway.
OK bluhm
show more ...
|
#
df69c215 |
| 28-Jun-2019 |
deraadt <deraadt@openbsd.org> |
When system calls indicate an error they return -1, not some arbitrary value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if
When system calls indicate an error they return -1, not some arbitrary value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
show more ...
|
#
b47fcd70 |
| 22-Jan-2019 |
krw <krw@openbsd.org> |
PF_ROUTE -> AF_ROUTE in the scattered sock()/setsockopt() calls where the "wrong" #define was used.
ok dlg@
|
#
f4147939 |
| 26-Apr-2018 |
guenther <guenther@openbsd.org> |
Use <fcntl.h> instead of <sys/file.h> for open() and friends. Delete a bunch of unnecessary #includes and sort to match style(9) while doing the above cleanup.
ok deraadt@ krw@
|
#
1dfeccb7 |
| 23-Dec-2017 |
cheloha <cheloha@openbsd.org> |
As we only use the .tv_sec field, simplify gettimeofday(2) -> time(3).
ok tb@ jca@
|
#
7b08a90a |
| 19-Apr-2017 |
natano <natano@openbsd.org> |
Switch base tools from /dev/bpf0 to /dev/bpf. Now that /dev/bpf has been around for two releases, it should be safe to do so.
ok bluhm deraadt sthen tb yasuoka
|
#
2f9be637 |
| 15-Apr-2017 |
bluhm <bluhm@openbsd.org> |
Name global variable for routing socket rtsock like in ndp(8). OK florian@
|
#
9dd4e201 |
| 29-Nov-2016 |
mpi <mpi@openbsd.org> |
Tweak output to keep it aligned when interfaces with big names, like vether0 are used.
ok jca@, deraadt@
|
#
4d836869 |
| 27-Aug-2016 |
guenther <guenther@openbsd.org> |
Pull in <sys/time.h> for gettimeofday()
ok deraadt@
|
#
2abf9a0d |
| 28-May-2016 |
natano <natano@openbsd.org> |
Replace the /dev/bpf* open loop with a plain open("/dev/bpf0", ...). ok deraadt jca
|
#
db690f90 |
| 23-Mar-2016 |
mpi <mpi@openbsd.org> |
Kill undocumented "pro" command. It's a no-op since the 90s!
|
#
cbf4cf1b |
| 23-Mar-2016 |
mpi <mpi@openbsd.org> |
Rename 'rtn' to 'error' for coherency.
|
#
78106870 |
| 23-Mar-2016 |
mpi <mpi@openbsd.org> |
Remove code to print the never set SIN_PROXY bit. This flag is only used to set the 33rd bit of a 32bit address in the routing table.
ok millert@
|
#
cac6055c |
| 26-Jan-2016 |
mmcc <mmcc@openbsd.org> |
Use an unsigned int rather than an int when iterating through all 32 bits in the form:
for (i = 1; i; i <<= 1)
This avoids undefined operations when shifting into and out of the highest-order bit.
Use an unsigned int rather than an int when iterating through all 32 bits in the form:
for (i = 1; i; i <<= 1)
This avoids undefined operations when shifting into and out of the highest-order bit.
ok millert@
show more ...
|
#
a03c2825 |
| 08-Dec-2015 |
tedu <tedu@openbsd.org> |
remove undocumented message about trailers
|
#
c465b001 |
| 14-Oct-2015 |
deraadt <deraadt@openbsd.org> |
I messed up reading the call graph. -d delete does use search, so a late pledge is not possible in this way.
|
#
0bd1216c |
| 09-Oct-2015 |
deraadt <deraadt@openbsd.org> |
Change all tame callers to namechange to pledge(2).
|
#
e5440999 |
| 07-Oct-2015 |
deraadt <deraadt@openbsd.org> |
use new tame "route" feature when possible
|
#
bb2b993a |
| 05-Oct-2015 |
semarie <semarie@openbsd.org> |
correct a rtget() error check this function could only return 0 or 1, and 1 on error.
avoid to deref an uninitialised variable if rtget() return an error.
ok millert@ benno@ deraadt@
|
#
4ff1a8e4 |
| 03-Oct-2015 |
deraadt <deraadt@openbsd.org> |
arp uses a non-privileged sockraw to look at the kernel arp tables. the function to do that is called a number of times, but as needed. hoist it upwards into initization, then tame "stdio dns inet" i
arp uses a non-privileged sockraw to look at the kernel arp tables. the function to do that is called a number of times, but as needed. hoist it upwards into initization, then tame "stdio dns inet" is possible in most code paths. (there may be further work to do here here) i believe florian helped me with this.
show more ...
|