jmc
83f11cf357
replace examples of "Ic arg Ic arg" with "Ic arg arg" and stop the spread;
2020-04-23 21:10:53 +00:00
mpi
780112bc36
Put the interface down if the kernel fails to enable pipex.
...
This is necessary to not silently continue if pppx_ioctl() returns an
error.
Found out by and diff from Vitaliy Makkoveev.
ok yasuoka@
2020-04-01 08:33:52 +00:00
jmc
f01a6c72e5
do not Xr both pppx and pppac in SEE ALSO, since they are the same page;
2020-01-23 07:18:36 +00:00
dlg
35db17bc33
use pppac(4) instead of tun(4)
2020-01-23 03:01:22 +00:00
dlg
ecb0fe7be8
allow npppd to use pppac(4) (once i wire it up)
2020-01-23 00:17:27 +00:00
deraadt
647427d6f3
More correction of section 3 layout. directory->opendir, fts->fts_open,
...
getcap->cgetent. pwcache->user_from_uid. And then repair references.
ok jmc
2019-09-02 21:18:40 +00:00
guenther
cb21588b78
Delete superfluous #includes of <ifaddrs.h>, <net/if_dl.h>, and <net/if_enc.h>
...
ok krw@, jsg@
2019-05-10 01:29:31 +00:00
jmc
7f77a07da5
macro fix;
2019-04-08 18:02:48 +00:00
jmc
d55a83ee24
fix some cases of spaces before full stops, where none were neccessary;
2019-03-10 21:31:49 +00:00
denis
bcb159daba
remove unused includes
...
OK yasuoka@
2019-02-27 04:52:19 +00:00
jmc
76e6f9275a
errror -> error in log messages; from alessandro gallo
2019-02-22 07:04:20 +00:00
denis
bab15b3dc7
fix attribute name
2019-02-20 17:47:12 +00:00
deraadt
915c3f33d3
(unsigned) means (unsigned int) which on ptrdiff_t or size_t or other
...
larger types really is a range reduction...
Almost any cast to (unsigned) is a bug.
ok millert tb benno
2019-02-13 22:57:07 +00:00
krw
b47fcd70ae
PF_ROUTE -> AF_ROUTE in the scattered sock()/setsockopt() calls
...
where the "wrong" #define was used.
ok dlg@
2019-01-22 09:25:29 +00:00
guenther
ef80df5ce8
Delete unnecessary <libgen.h> #includes
...
ok deraadt@
2018-12-30 23:09:58 +00:00
sashan
a153335958
- odd condition/test in PF lexer
...
(and other lexers too)
This commit rectifies earlier change:
in the lex... even inside quotes, a \ followed by space or tab should
expand to space or tab, and a \ followed by newline should be ignored
(as a line continuation). compatible with the needs of hoststated
(which has the most strict quoted string requirements), and ifstated
(where one commonly does line continuations in strings).
OK deraadt@, OK millert@
2018-11-01 00:18:44 +00:00
yasuoka
baaa6b9ace
Fix the prefix length of the IP address in the error message which shows
...
failure of assigning requested IP address on IPCP, it was mistakenly "-1"
on little endians. Found by IIJ.
2018-07-25 02:18:36 +00:00
krw
6a3d55f939
No need to mention which memory allocation entry point failed (malloc,
...
calloc or strdup), we just need to log that we ran out of memory in a
particular function.
Recommended by florian@ and deraadt@
ok benno@ henning@ tb@
2018-07-09 12:05:10 +00:00
krw
3c12ada049
Be consistent in warn() and log_warn() usage when
...
running out of memory.
Next step, be correct *and* consistent.
ok dennis@ tb@ benno@ schwarze@
2018-07-08 17:15:07 +00:00
jmc
1caaaac72f
remove the SECTIONS header, since a one line DESCRIPTION is a bit silly;
...
use a more general text for the sections, and avoid the catchup issue
that was trying to document how many there were;
ok benno rob
2018-06-18 06:04:25 +00:00
mpi
44c85a19f1
Consistently spell "IPsec" in comments and debug outputs.
...
From Raf Czlonka, ok sthen@
2018-03-16 12:31:09 +00:00
mpi
ce704e6a58
Remove useless <sys/socketvar.h> includes.
...
ok kettenis@, visa@, claudio@, deraadt@
2018-01-05 08:13:31 +00:00
yasuoka
de543defde
The problem when npppd receives a zero length 1701/udp packet seemed to
...
be fixed at 1.16, but it wasn't fixed. Fix it again.
2017-10-06 07:46:44 +00:00
goda
2a5607d281
add a new option to set limits on max-sessions each IPCP.
...
It can set limits on different max-sessions if there're using several protocols
such as PPPoE and L2TP/IPsec.
ok yasuoka@
2017-08-12 11:20:34 +00:00
goda
d50b169a4f
add a new option to set limits on user-max-sessions each AUTHENTICATION.
...
It can set limits on different user-max-sessions if there're using several
protocols such as PPPoE and L2TP/IPsec.
ok yasuoka@
2017-08-11 16:41:47 +00:00
goda
e83549bea8
display MRU each sessions in npppctl session command
...
ok yasuoka@
2017-08-11 16:25:59 +00:00
jmc
17f5af5748
man pages with pseudo synopses which list filenames end up creating
...
very ugly output in man -k; after some discussion with ingo, we feel
the simplest fix is to remove such SYNOPSIS sections: the info is hardly
helpful at page top, is contained already in FILES, and there are
sufficiently few that just zapping them is simple;
ok schwarze, who also helpfully ran things through a build to check
output;
2017-07-13 19:16:33 +00:00
espie
186e29d5ec
no need to generate y.tab.h if nothing uses it, set YFLAGS to nothing
...
instead of CLEANFILES += y.tab.h
okay millert@
2017-07-03 22:21:47 +00:00
yasuoka
67bdad804c
Remove never used ifdefs, define FATAL macro properly and define function
...
parameters in modern way.
2017-05-30 17:52:05 +00:00
yasuoka
47e8130268
Stop using __P macro.
2017-05-30 17:22:00 +00:00
natano
7b08a90aae
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
2017-04-19 05:36:12 +00:00
yasuoka
4c9b8a4047
Warn if pipex(4) is disabled but the configuration uses it.
2017-04-18 03:28:04 +00:00
yasuoka
8488f59d3a
Delete #include lines which are unnecessary.
2017-04-18 03:25:22 +00:00
bluhm
9b2c156293
From a syslog perspective it does not make sense to log fatal and
...
warn with the same severity. Switch log_warn() to LOG_ERR and keep
fatal() at LOG_CRIT.
OK reyk@ florian@
2017-03-21 12:06:55 +00:00
patrick
05efcecbbe
The default for the strip-nt-domain attribute is "yes", so fix up
...
the manpage to not tell lies.
ok yasuoka@
2017-02-22 10:16:14 +00:00
yasuoka
a853590d64
Delete lines which are misleading and unneeded.
...
spotted patrick
2017-02-22 07:48:26 +00:00
yasuoka
48c80c0c84
Stop using "DEBUG" make variable for extra debugs.
2017-02-21 05:17:48 +00:00
krw
4ff7cad5c1
Replace hand-rolled for(;;) traversal of ctl_conns TAILQ with
...
TAILQ_FOREACH().
No intentional functional change.
ok reyk@
2017-01-09 14:04:31 +00:00
yasuoka
8fae2db6a7
Remove the use of cast. It is unnecessary and potentially problematic.
...
input semarie
ok deraadt
2016-09-21 04:45:23 +00:00
yasuoka
e766f3d8c3
Fix about the default value of pptp-hostname. It's an empty string.
...
Reported by Joe Holden.
2016-09-07 07:21:02 +00:00
natano
2abf9a0d86
Replace the /dev/bpf* open loop with a plain open("/dev/bpf0", ...).
...
ok deraadt jca
2016-05-28 07:00:18 +00:00
mikeb
b579850f21
Improve and clarify a few bits; with input from jmc@, ok yasuoka, jmc
2016-05-26 11:47:13 +00:00
krw
c8939cf402
Change last non-/gnu/ fcntl(x, F_GETFL, 0) strays to fcntl(x, F_GETFL).
...
No functional change.
ok millert@
2016-04-16 18:32:29 +00:00
krw
42596f130c
Move more fcntl(,F_GETFL,0) -> fcntl(,F_GETFL).
...
No functional change.
ok guenther@
2016-04-05 21:24:02 +00:00
yasuoka
70452a203e
Log the reply message from RADIUS server when the authenticaion fails.
...
Diff from Yuuichi Someya
2016-03-22 04:11:27 +00:00
yasuoka
9774ffa7c5
Cleanup control sockets in control_cleanup().
...
Diff from Yuuichi Someya.
2016-03-22 02:27:20 +00:00
krw
66d93f0fb9
Use SOCK_NONBLOCK in socket() and accept4() instead of a separate fcntl()
...
dance.
Inspired by guenther@
ok millert@ yasuoka@
2016-03-22 00:36:06 +00:00
guenther
5f13b87e98
Instead of creating a socket with socket() or accept() and then
...
setting the O_NONBLOCK flag on it with fcntl(F_SETFL) afterwards,
just pass SOCK_NONBLOCK to socket() or accept4() and get it right
to begin with.
ok millert@ krw@ beck@ deraadt@ jca@
2016-03-21 00:49:36 +00:00
krw
c9899b11e3
More "(<blah> *)0" -> NULL, avoiding any stdarg functions.
...
Feedback millert@ kettenis@
2016-03-16 15:41:10 +00:00
yasuoka
b8ff3d92a8
Fix a typo in comment. Diff from Yuuichi Someya.
2016-03-16 04:58:34 +00:00
yasuoka
6805751f43
Transition to "Req-Sent" had been missing when RTA in "Opened". This caused
...
a timer event leak. Diff from Yuuichi Someya.
2016-03-16 04:55:41 +00:00
yasuoka
5e4e58f11f
Fix: "authconf.users_file_path" is a char[] but is checked as a char*.
...
Diff from Mathieu Papineau (via Claer)
2016-03-08 02:05:00 +00:00
yasuoka
ff9f38b576
Remove __cplusplus include guard.
...
Diff from Tiago Silva
2016-03-08 01:38:04 +00:00
sthen
e962b3caab
Remove setproctitle() for the parent process. Because rc.d(8) uses process
...
titles (including flags) to distinguish between daemons, this makes it
possible to manage multiple copies of a daemon using the normal infrastructure
by symlinking rc.d scripts to a new name. ok jung@ ajacoutot@, smtpd ok gilles@
2016-02-02 17:51:11 +00:00
mmcc
3096681be7
s/failes/failed/g
2015-12-17 18:37:58 +00:00
tb
1475b7aad9
Replace 'arc4random() % (2^k - 1)' by 'arc4random() & (2^k - 1)' to
...
avoid modulo bias. Part of a diff by Matthew Martin, reviewed by
deraadt@ and me.
ok deraadt@
2015-12-17 08:09:20 +00:00
tb
ae505340fa
Add missing $OpenBSD$ tags.
2015-12-17 08:01:55 +00:00
tb
2632528fdd
Replace arc4random() % i by arc4random_uniform(i) to avoid modulo bias.
...
Part of a diff by Matthew Martin, reviewed by deraadt@ and me.
ok deraadt@
2015-12-17 07:56:01 +00:00
mmcc
900232727d
strings.h -> string.h to prevent an implicit declaration. Also remove a
...
bunch of NULL-checks before free().
2015-12-05 18:43:36 +00:00
yasuoka
41d69f6e70
Pass the pppx_hdr when sending packets through the pppx device and use the
...
ppp_id in the pppx_hdr to find the associated ppp when receiving the packets
from the device.
2015-12-05 16:10:31 +00:00
claudio
1f82c02d17
EAGAIN handling for imsg_read. OK henning@ benno@
2015-12-05 13:19:32 +00:00
yasuoka
268187f4a7
Fix typo in #include line.
2015-12-04 13:12:44 +00:00
yasuoka
00f24e10a7
Remove files which had been unused.
2015-12-04 12:15:57 +00:00
mmcc
822b50ff39
comment typo
2015-12-02 05:07:09 +00:00
yasuoka
0cd27c4a1b
Remove -h from the command line options.
...
diff from Benjamin Baier
2015-11-09 01:14:22 +00:00
guenther
116a5cae52
Simplify and lock down priv_open():
...
* kill the 'mode' argument
* fail if passed any flags other than O_ACCMODE OR O_NONBLOCK
* paranoia: mask O_CREAT when calling open() with only two arguments
* instead of using ioctl(FIONBIO) after the fact, pass O_NONBLOCK to
priv_open()
"good start" deraadt@
ok yasuoka@
2015-10-11 07:32:06 +00:00
guenther
847420c88c
YYSTYPE.number is int64_t, so format with <inttypes.h>'s PRId64
...
ok yasuoka@
2015-10-11 07:16:01 +00:00
sobrado
0600642d68
typo in documentation.
2015-09-21 10:40:16 +00:00
mpi
3ec8e064e9
Set the index of the interface in handroller link_addr(3) like code.
...
This is now necessary on OpenBSD because our routing interface no longer
use ifunit() to find the corresponding interface.
ok yasuoka@, dlg@
2015-09-13 08:22:10 +00:00
deraadt
74590bb3de
stdlib.h is in scope; do not cast malloc/calloc/realloc*
2015-08-20 22:46:32 +00:00
yasuoka
579578a4c1
Make npppd use libradius(3). Remove radius+ files.
2015-07-23 09:04:06 +00:00
yasuoka
7e8328a552
Add size and NULL checks in debugutil.c
...
Poined out by Yuuichi Someya at IIJ.
2015-07-20 19:26:41 +00:00
yasuoka
213076fa62
Pass the errcode when disconnecting L2TP call.
...
From Yuuichi Someya at IIJ.
2015-07-20 19:03:54 +00:00
yasuoka
c163cc1289
Remove old route to the tunnel interface when the interface's address is
...
changed.
From Yuuichi Someya at IIJ.
2015-07-20 18:58:30 +00:00
yasuoka
fcbb4b5d79
Add missing initializations in privsep.c
...
From Yuuichi Someya at IIJ.
2015-07-20 18:55:35 +00:00
yasuoka
d4a4e79b7a
Fixed a use-after-free. When handing the L2TP Proxy-LCP, a timer was used
...
to open LCP. If the PPP session is terminated before the timer fires, the
timer had been fired with the freed context. Stop using the timer to open
LCP.
2015-06-25 02:32:48 +00:00
yasuoka
6c0d88bb52
Reset the LCP option state for dialin-proxy only if re-negotiation is
...
enabled.
2015-06-25 02:25:33 +00:00
jmc
2182c25a3c
tweak previous;
2015-06-24 10:09:32 +00:00
yasuoka
4781c8ec05
Fix npppd to terminate all PPP sessions properly even in case the
...
sending window for L2TP control is full when the control is terminating
(by a L2TP keepalive failure or other reasons). In that case, if the
L2TP peer didn't respond at all, npppd had kept some PPP sessions
forever.
2015-06-24 05:20:16 +00:00
yasuoka
f65d56a491
Use the return value of event_loop() properly. Also abort(3) if
...
event_loop() returns abnormally which is unexpected.
diff from Yuuichi Someya
2015-06-24 04:57:55 +00:00
yasuoka
0607d03f79
Improve and fix typo in the comment.
2015-06-24 04:45:20 +00:00
yasuoka
5c938ccb58
Mention that pipex should be also configured by sysctl.
2015-06-24 04:34:31 +00:00
yasuoka
38377f60ae
Fix npppd to check the size of received GRE packets properly.
2015-06-23 07:07:33 +00:00
yasuoka
3a6fc3410e
Fix the problem when npppd receives a zero length 1701/udp packet. If
...
it receives such packets when the errno is not EAGAIN or EINTR, it had
closed all L2TP sessions and stoppped the L2TP server. Also fix the
receiving GRE packet since it potentially has the same problem.
2015-06-23 06:59:54 +00:00
miod
8fc45048f3
Typos: equalivant, fucntion, libary.
2015-06-10 20:50:05 +00:00
yasuoka
e402d49ce7
Fix an uninitialized variable access when pptp.hostname is configured.
2015-05-12 05:30:24 +00:00
jsg
b6330afd10
Move the logit() prototype so parse.y will see it.
...
ok yasuoka@
2015-05-12 03:23:15 +00:00
guenther
fd7ad13f9e
gcc 2.x is dead
...
ok millert@
2015-04-04 18:05:04 +00:00
miod
aaf20c4253
Fix garbage in error message; ok yasuoka@
2015-02-17 05:12:51 +00:00
krw
a3fdc2c87f
Replace some obvious '$OpenBSD' and '$OpenBSD:' typos with '$OpenBSD$'.
...
Pointed out by dickman@.
ok sthen@ phessler@
2015-01-22 14:33:01 +00:00
deraadt
dbad4650ad
move to <limits.h> universe
...
ok yasuoka
2015-01-19 01:48:57 +00:00
yasuoka
4080edd532
Count number of sessions correctly.
2015-01-08 07:34:05 +00:00
tobias
9f0a0f7ab7
Fix typos in comments.
...
ok jmc, yasuoka
2014-11-27 10:22:38 +00:00
krw
83f4f91447
Yet more #include de-duplication.
...
ok deraadt@ tedu@
2014-11-20 14:51:41 +00:00
jsg
41eef22fad
Don't allow embedded nul characters in strings.
...
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@
2014-11-20 05:51:20 +00:00
tedu
9ee3e565b3
remove nt and lanman functions which aren't used. ok reyk yasuoka
2014-11-20 03:48:12 +00:00
krw
5376bb5a55
Nuke more obvious #include duplications.
...
ok deraadt@ millert@ tedu@
2014-11-18 20:54:28 +00:00
bluhm
e78bcbdd2b
Convert the logic in yyerror(). Instead of creating a temporary
...
format string, create a temporary message.
OK doug@
2014-11-16 19:07:50 +00:00
doug
0f79392cb2
Add gcc printf format attributes to yyerror() in parse.y files.
...
No yyerror() calls needed to be changed.
ok bluhm@
2014-11-14 03:20:36 +00:00
yasuoka
00287df872
Fix a condition which selects log level for errors on routing socket,
...
since it was logically reverse.
2014-11-13 04:18:27 +00:00