Commit Graph

1183 Commits

Author SHA1 Message Date
hosokawa
cce077344b Get tun P2P address from the local pool if RADIUS server returned
255.255.255.254 as client ipaddr.

Reviewed-By:	freebsd-net mailing list
2002-04-04 08:43:00 +00:00
brian
5e89c7151f Fix a typo 2002-03-31 01:57:06 +00:00
brian
ab4711b90a Add a missing ``#ifndef NONETGRAPH'' 2002-03-31 01:56:34 +00:00
brian
b222d9573a Remove some extraneous whitespace 2002-03-31 01:51:15 +00:00
brian
05e0b92acd Include arpa/inet.h 2002-03-31 01:36:08 +00:00
ru
ea17e5024d Fix CLEANFILES. 2002-03-30 17:57:51 +00:00
brian
631238220a Add a sprinkling of mp_Down() calls to ensure that we don't think that
the multi-link NCP is up when it isn't.
2002-03-30 12:52:55 +00:00
brian
4aad533fbf Don't use the RTF_GATEWAY flag and pass the RTA_GATEWAY address when updating
routes.
2002-03-30 12:50:49 +00:00
brian
1dda0c6402 Add a missing break 2002-03-30 12:47:29 +00:00
brian
ee9763124d Merge the NETGRAPH branch into HEAD. tty devices now use netgraph's line
discipline to do the async escaping, but no other benefits are available yet.

Change ``ifdef HAVE_DES'' to ``ifndef NODES'' for consistency.

Make the Makefile a little more sane WRT RELEASE_CRUNCH.
2002-03-30 12:30:09 +00:00
brian
a80a96a3d8 Fix a typo
Submitted by:	dirk
2002-03-25 14:14:31 +00:00
ru
fbd982bb93 mdoc(7) police: .Va -> .Ev. 2002-03-15 17:03:05 +00:00
brian
783a07fdf2 Use the return value from snprintf() to keep a track of the length of
the display string in MPPEDispOpts.

PR:		35836
MFC After:	2 weeks
2002-03-13 10:21:19 +00:00
brian
e3b5feb1f5 Handle B460800 and B921600 being defined in <termios.h> 2002-03-12 16:05:26 +00:00
brian
ca8983659d Don't drop the last character from ut_line in ID0logout().
PR:		35531
MFC after:	2 weeks
2002-03-05 13:03:11 +00:00
brian
e1efcab9b5 Don't blow away ``set escape'' settings when we've completed the
login phase.  Just initialise the correct parts.

Originially submitted by:	Vladimir B. Machulsky <bofhmail@yahoo.com>
2002-03-04 10:08:57 +00:00
brian
9e9f75c5de Document NGM_PPPOE_ACNAME handling. 2002-02-20 15:53:47 +00:00
brian
1af410bad4 Handle NGM_PPPOE_ACNAME messages.
Submitted by:	Andre Albsmeier <andre@albsmeier.net>
Approved by:	julian
2002-02-20 15:52:20 +00:00
mike
bcee06d42c o Move NTOHL() and associated macros into <sys/param.h>. These are
deprecated in favor of the POSIX-defined lowercase variants.
o Change all occurrences of NTOHL() and associated marcros in the
  source tree to use the lowercase function variants.
o Add missing license bits to sparc64's <machine/endian.h>.
  Approved by: jake
o Clean up <machine/endian.h> files.
o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>.
o Remove prototypes for non-existent bswapXX() functions.
o Include <machine/endian.h> in <arpa/inet.h> to define the
  POSIX-required ntohl() family of functions.
o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>,
  and <sys/param.h>.
o Prepend underscores to the ntohl() family to help deal with
  complexities associated with having MD (asm and inline) versions, and
  having to prevent exposure of these functions in other headers that
  happen to make use of endian-specific defines.
o Create weak aliases to the canonical function name to help deal with
  third-party software forgetting to include an appropriate header.
o Remove some now unneeded pollution from <sys/types.h>.
o Add missing <arpa/inet.h> includes in userland.

Tested on:	alpha, i386
Reviewed by:	bde, jake, tmm
2002-02-18 20:35:27 +00:00
brian
2cd83c2da4 Detect if a udp socket on STDIN_FILENO is connected by calling
getpeername() and don't set PASSIVE mode if it's is.
2002-01-23 23:36:35 +00:00
brian
153455a7d2 Cross reference the NETWORK ADDRESS TRANSLATION section when describing
the -nat flag.

Requested by:	eivind
2002-01-23 21:11:33 +00:00
brian
c6d68beab8 socket()s first argument should be a protocol family rather than an
address family.
2002-01-16 14:03:52 +00:00
brian
414245183e socket's first argument is an address family, not a protocol family. 2002-01-16 13:15:47 +00:00
brian
94cf97175f When authenticating a name containing a ``\'', attempt to autenticate
using the part after the ``\'' if the original name is not found.

This allows M$ clients to use domain\user as their authname.

Reviewed by: Ian West <ian@niw.com.au>
2002-01-08 11:24:39 +00:00
brian
2d4ab797ed Consider PROTO_IPV6 as compressible by CCP.
Spotted by: Nick Sayer <nsayer@quack.kfu.com>
2001-12-09 01:29:12 +00:00
brian
bf75c90bd9 Pay attention to failures to SIOCAIFADDR and SIOCDIFFADDR. 2001-11-30 14:01:21 +00:00
brian
6423ccba92 Don't provide an RTA_GATEWAY sockaddr when we write RTM_CHANGE messages
to the routing socket.

The local address on a point-to-point interface is not actually a
gateway address - despite it appearing in the second column of
netstat -r's output.  Providing a gateway to an RTM_CHANGE will
currently change the route's interface so that it's using the
specified gateway - not what we want.

Patiently explained to me by:	ru
2001-11-30 14:01:20 +00:00
brian
496e7d9901 Add some DEBUG logging to tell us when interface addresses are being
added and removed
2001-11-30 14:01:18 +00:00
brian
244dad812b Remove the hack that ensures that rt_Update() works on FreeBSD. Now
that the ncpaddr code doesn't create default routes with non-zero
masks, everything works as it should.
2001-11-23 19:20:45 +00:00
brian
d8f0ad876a When writing messages to the routing socket, round sockaddr sizes
up in the same way that we expect them to be when we read them.

This is a no-op on i386 and probably on alphas, as we currently
only support AF_INET and AF_INET6.
2001-11-23 17:19:36 +00:00
brian
e37212b653 Be paranoid about non-zero netmasks being associated with INET addresses
of 0.0.0.0.

The OpenBSD PF_ROUTE/NET_RT_DUMP sysctl is sending back routes with
RTAX_NETMASK set, but the corresponding sockaddr being 4 zero bytes
(with an address family of zero).  ppp was getting confused by this
and ending up interpreting it as a 0.0.0.0/32 routing table
destination and subsequently failing to do anything with the route.

Specifically, after this fix, ppp under OpenBSD can successfully
change and delete the default route again !
2001-11-23 17:19:27 +00:00
brian
5f83a6b610 Remove an unused variable (oops) 2001-11-23 15:47:04 +00:00
brian
274cbc8854 Don't adjust_linklocal() when pulling a sockaddr out of an ncpaddr or
ncprange structure.

Don't write() the netmask for IPv6 sockaddrs to the routing socket if
the prefixlen is 128.

It seems that messages written to the routing socket with the scopeid
set for link local addresses are not understood.  Instead, we have to
put the scopeid in the 5th and 6th bytes of the address (see
adjust_linklocal() in ncpaddr.c).  I think this may be a bug in the
KAME implementation - it should really understand both forms.
2001-11-23 12:39:20 +00:00
brian
ffae273af1 Remove a bogus log_Id() decl 2001-11-23 11:15:35 +00:00
brian
c382139ffc Fix usage for the log command 2001-11-23 11:07:43 +00:00
brian
798ae959dd Whitespace tweak 2001-11-23 10:46:28 +00:00
brian
3d0a99567d Expand the first argument of the ``log'' command if it's a variable. 2001-11-22 04:23:49 +00:00
brian
b75f43a062 Document that an UPTIME variable is now available 2001-11-22 01:44:23 +00:00
brian
8b244d6bae Remove unused variables 2001-11-04 16:19:05 +00:00
brian
6a1de171ac Add a ``log'' command for logging specific information.
Add an ``UPTIME'' variable to indicate the bundle uptime.

It's now possible to put something like this in ppp.linkdown
for a server setup:

  MYADDR:
    log Session closing: User USER, address HISADDR, up UPTIME

Fixed some memory leakage with commands that expand words.
Made some functions static.
Fixed a diagnostic bug (iface add .... SIOCDIFADDR)
2001-11-03 21:45:32 +00:00
brian
0c094f30d4 Call CCP protocol -1 ``none'' 2001-11-03 19:29:30 +00:00
brian
c6127e6abf cmott@scientech.com -> cm@linktel.net
Requested by: Charless Mott <cmott@scientech.com>
2001-11-03 11:36:17 +00:00
brian
5106c4a534 Don't avoid setting a 0 second timer in datalink_StartDialTimer() by
not setting any timer.  Instead, set a 1 millisecond timer.

This ensures that ppp will come out of it's select() call after
losing carrier in -ddial mode with a reconnect period of 0 and
going to ST_OPENING, rather than waiting indefinitely for some
other event to wake ppp up.

Bump the ppp version number to indicate the event.

MFC after: 3 days
2001-10-23 13:52:19 +00:00
peter
2e67ce5d64 ia64 support. Due to the bogus placement of some i4b includes, it is
i386-only, even though it would work on all the isa-capable platforms.
Change the NOI4B so that instead of excluding alpha, it only includes i386.
2001-10-23 10:20:24 +00:00
brian
4a51aeed51 Include the right i4b files for NetBSD 2001-10-19 15:56:56 +00:00
brian
381bbd2320 Fix AUTH callback negotiations.
MFC after: 1 week
2001-10-18 08:48:04 +00:00
brian
f9a9a183bf When the peer fails to specify an MRU and a 1500 byte MRU is not
allowed either because of the transport or configuration, send a
MRU NAK only once, then allow the negotiations to proceed.

rfc1661 says that 1500 should always be allowed and rfc2516 says
that 1492 is the maximum for PPPoE.  This changes ppp so that it
only weakly suggests 1492, then goes with the default (leaving
the problem in the hands of the peer WRT how they set their MTU).

MFC after: 1 week
2001-10-18 08:47:56 +00:00
dwmalone
86cf053ae0 Hopefully improve control message passing over Unix domain sockets.
1) Allow the sending of more than one control message at a time
over a unix domain socket. This should cover the PR 29499.

2) This requires that unp_{ex,in}ternalize and unp_scan understand
mbufs with more than one control message at a time.

3) Internalize and externalize used to work on the mbuf in-place.
This made life quite complicated and the code for sizeof(int) <
sizeof(file *) could end up doing the wrong thing. The patch always
create a new mbuf/cluster now. This resulted in the change of the
prototype for the domain externalise function.

4) You can now send SCM_TIMESTAMP messages.

5) Always use CMSG_DATA(cm) to determine the start where the data
in unp_{ex,in}ternalize. It was using ((struct cmsghdr *)cm + 1)
in some places, which gives the wrong alignment on the alpha.
(NetBSD made this fix some time ago).

This results in an ABI change for discriptor passing and creds
passing on the alpha. (Probably on the IA64 and Spare ports too).

6) Fix userland programs to use CMSG_* macros too.

7) Be more careful about freeing mbufs containing (file *)s.
This is made possible by the prototype change of externalise.

PR:		29499
MFC after:	6 weeks
2001-10-04 13:11:48 +00:00
ru
1020d31fd1 Keep up with sys/net/rtsock.c,v 1.58.
Prodded by:	brian
2001-09-21 16:14:53 +00:00
brian
5903e1d51b sigpause() -> sigsuspend()
sigblock() -> sigprocmask()
2001-09-13 10:03:30 +00:00