1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-03 06:45:37 -08:00
Commit Graph

295 Commits

Author SHA1 Message Date
guenther
98c266579d Correct the spelling of "transferred" and "transferring"
from Tobias Ulmer (tobiasu at tmux.org); ok jmc@, krw@
2012-02-24 06:19:00 +00:00
yasuoka
18025b7e27 Add handling of `rx connect speed' avp to avoid the bug of xl2tpd.
Reported and tested by sebastia@
ok sthen sebastia giovanni
2012-01-23 03:41:21 +00:00
yasuoka
3b5b2d97c8 The ingress filter of pipex and npppd become configurable and disabled
by default.  After this change we need to add

  ppp.ingress_filter: true

to npppd.conf if it is needed.

ok sthen
2012-01-23 03:36:21 +00:00
yasuoka
9b9254fe80 npppdctl related files should be removed. Added a mention about that. 2012-01-18 03:21:28 +00:00
yasuoka
363e4d4b0d Replace npppdctl(8) by new npppctl(8). npppctl was written from
scratch, it uses parser.c derived from ikectl(8) to have OpenBSD's
fashion.  This includes related changes listed below:
- changed npppd control IPC heavyly.
- support IPv6 as tunnel source address.
- deleted support changing the configuration of npppd_ctl on running.
  Because it is not so needed but it requires privilege operations.
- refactors.

man page helps from jmc.  tested by sebastia.
ok deraadt sebastia sthen
2012-01-18 03:13:04 +00:00
yasuoka
c46ae40308 Fix compiler warnings and some styles.
ok sebastia sthen
2012-01-18 02:53:56 +00:00
sebastia
a581e4bf5e mkdir needs -m to set the mode
OK yasuoka@
2012-01-06 11:20:36 +00:00
jmc
71c4d082e6 formatting errors, found using freebsd's "igor"; 2011-12-24 08:46:48 +00:00
yasuoka
6cc855c5e3 use existing _ppp instead of _npppd as a user/group id for npppd.
ok deraadt@ henning@
2011-10-28 11:53:21 +00:00
yasuoka
e405d423d1 Added "provision for rewound PPP frames" that allows receiving
reorder packets to pass to the upper layer without reorder.  It
will improve performance (throughput or loss rate) for PPTP or
L2TP(/IPesc) on networks that latency is unstable such as mobile
network.

As our test environment (bandwidth: 6Mbps, latency: 50ms for 97% of
traffic and 52ms for rest of traffic), throughput has changed from
0.76MB to 2.17MB on file upload by PPTP connected Windows Vista
ftp.exe.

Developed by UMEZAWA Takeshi at IIJ.

ok jmatthew@
tested jmatthew@ and myself.
2011-10-15 03:24:11 +00:00
yasuoka
90b03482cb Include PIPEX in kernel by default. And add new sysctl variable
`net.pipex.enable' to enable PIPEX.   By default, pipex is disabled
and it will not process packets from wire.  Update man pages and
update HOWTO_PIPEX_NPPPD.txt for testers.

discussed with dlg@, ok deraadt@ mcbride@ claudio@
2011-07-08 18:30:16 +00:00
yasuoka
5fefcc09de Improved npppd privileged separations:
- Changed finalizing way to the privileged process.  In old way, the
  privileged process could not aware abnormal exit of the process in
  jail.  Then the processes in jail remained as zombies.  Created a
  pipe to monitor the privileged process, the privileged process can
  exit in peace by using the pipe.
- npppd will exit abnormally when the privileged process exits
  abnormally.
- PF_KEY socket requires privileges.
- Return correct "errno" to the jail in priv_open().
- Cleanup.

ok hsuenaga@
2011-07-08 06:14:54 +00:00
yasuoka
33a18954b1 I forgot to delete files on my previous commit. sorry. 2011-07-06 22:47:46 +00:00
yasuoka
8daf7599d7 Add RADIUS accounting support and some authentication related changes:
- Add functions to radius+.c that are required to implement RADIUS
  accounting.
- Send RADIUS Account-Start and Account-Stop messages with attributes that
  are defined by RFC 2866, 2868, 2869.
- If any authentication realm is deleted from the configuration, npppd may
  exit by segmentation fault.
- Delete radius_common.c, radius_common.h and eap.c because they are not
  used.
- Retransmission and failover are reimplemented.
- Cleanup
2011-07-06 20:52:28 +00:00
yasuoka
44a662e77f Fixed some bugs of priv_send(). The bugs caused sending routing messages
failures.  'errno' returned by the privileged process was not initialized.
'tolen' in priv_sendto() was garbage.

ok hsuenaga@
2011-07-05 01:33:40 +00:00
markus
fd218b0665 disable pipex for L2TP on disconnect, too; yasuoka@ agrees. 2011-05-15 15:47:52 +00:00
dlg
cd8e09b979 add support for pppx interfaces instead of tun interfaces.
pppx mode will create a pppx interface for each ppp session in the kernel,
and will rely on the kernel to handle the routing rather than doing it
itself. as a bonus it will configure the interfaces description with the
username of the person connecting (which makes systat if pretty).

ok claudio@ yasuoka@ as part of a larger diff
from jonathan matthew
weve been running all this in production for a month now..
2011-04-02 12:04:44 +00:00
okan
c8c4dd3640 spelling.
ok yasuoka@
2011-03-16 09:49:11 +00:00
okan
adafb74903 use timerclear macro. while here, fix spelling.
ok yasuoka@
2011-03-16 09:48:45 +00:00
dlg
3ff20fd767 fix a buffer overflow in the pppoe receive packet handling.
diff from yasuoka@
ok deraadt@
2011-02-28 02:31:55 +00:00
jasper
421b67a148 - tyop, recieve -> receive
ok sthen@
2011-01-20 23:12:33 +00:00
yasuoka
2ada098c90 IP_PIPEX mistakenly was applied to the 1723/tcp socket. Apply the option
to the gre socket.
2010-09-27 00:12:16 +00:00
yasuoka
71fd4094a4 correct the path of npppd, and use modp1024 on the sample ipsec.conf
because iPhone doesn't support modp2048.
2010-09-26 06:54:44 +00:00
yasuoka
886d2b78c3 Add support pipex for L2TP call and L2TP on IPv6.
- pipex requires unique session-id in protocol, so session-id
  generation algorithm has been changed.
- change to fit the new PIPEX ioctl.
ok dlg@
2010-09-24 14:50:30 +00:00
yasuoka
0383c4d690 npppd didn't setup a PIPEX session if MPPE is not required by config and
CCP is failed to be opened because the peer doesn't support MPPE.  Fixed to
setup a PIPEX on such case.
2010-09-24 02:57:43 +00:00
jsg
4dc6ca78e4 Add the same license text to these files as the rest of npppd.
ok yasuoka@
2010-09-23 04:47:40 +00:00
jsg
bcd917bcd8 remove support for talking to the zebra routing socket which
was not enabled, we use a kernel routing socket for such things.

ok yasuoka@ claudio@
2010-09-23 01:45:10 +00:00
yasuoka
664c6b8562 unify MS-CHAP implementation to sbin/iked/chap_ms.[ch].
copy sbin/iked/chap_ms.[ch] and fixed chap.c and eap.c to compile with it.
2010-09-22 11:48:38 +00:00
jsg
a33c347575 make the arguments match the format string in usage
ok yasuoka@
2010-09-22 00:32:48 +00:00
yasuoka
82d1e7ece7 Update instructions for testing npppd and pipex. The instructions was
out-of-date-ed after my privilege separation work at n2k10.
2010-09-20 03:51:31 +00:00
jsg
e74809e1c3 Fix use of logical and where binary and was intended.
Spotted by Mike Belopuhov, ok yasuoka@
2010-08-02 09:29:53 +00:00
yasuoka
01c14b6187 delete IIJ local functionalities. 2010-07-31 09:33:09 +00:00
miod
a34540b369 opration -> operation 2010-07-20 20:47:13 +00:00
yasuoka
e109dc1850 add $OpenBSD$ and remove trailing space. no functional change. 2010-07-02 21:20:57 +00:00
yasuoka
b939729674 fix mistakes that have been created by my porting to OpenBSD.
- delete a change only for debug
 - add missing 'else'
2010-07-02 19:05:20 +00:00
yasuoka
ef1c7bdec0 add man page of npppdctl.
(this should be included in my previous commit)
2010-07-01 03:55:23 +00:00
yasuoka
f0a4e295ec Translate Japanese comments or labels into English. Translation was
done by IIJ people (MATSUI Yoshihiro, SAITOH Masanobu, Tomoyuki Sahara),
yuo@ and myself.

This diff also includes
 - delete part of useless comments, correct spelling.
 - add man page of npppdctl.

There is no functional change.
2010-07-01 03:38:17 +00:00
claudio
4cb5359546 Remove the tiny bit of C++ that is not realy needed so that we get a pure
C application.
OK yasuoka@, reyk@
2010-05-12 08:12:11 +00:00
yasuoka
b3491dc1d8 add HOWTO_PIPEX_NPPPD.txt for people who try to use pipex and npppd before
everything is done.
2010-01-31 13:27:36 +00:00
yasuoka
4a78f66b30 privilege separation of npppd.
- Drop privilege after daemon initializing.
- Some system calls that requires root privileges were replaced to
  wrapper functions that communicate with a separated privileged
  process via IPC.  And the privileged process checks whether the
  operations are acceptable.
2010-01-31 05:49:50 +00:00
yasuoka
00ed837c7a Fixed 2 off-by-one problems.
(found by parfait, reported by jsg@)
2010-01-27 07:27:02 +00:00
yasuoka
4326fc6541 Address family for UNIX domain socket was mistakenly specified as
AF_INET.  It should be AF_UNIX.
2010-01-15 03:29:11 +00:00
yasuoka
386447d660 fix to compile with gcc4. (from jsg@) 2010-01-14 23:35:39 +00:00
yasuoka
53f89ef851 cleanup npppd code. delete IIJ local ifdef switches and fix warnings.
ok @dlg
2010-01-13 07:49:44 +00:00
yasuoka
0fbf353719 Initial import npppd(8). npppd is a new PPP daemon that handles many
ppp sessions as a server.  It supports L2TP, PPTP and PPPoE as
tunneling.

ok mcbride@ dlg@ deraadt@ reyk@.
2010-01-11 04:20:56 +00:00