History log of /freebsd-10.3-release/usr.sbin/ppp/ether.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 296373 04-Mar-2016 marius

- Copy stable/10@296371 to releng/10.3 in preparation for 10.3-RC1
builds.
- Update newvers.sh to reflect RC1.
- Update __FreeBSD_version to reflect 10.3.
- Update default pkg(8) configuration to use the quarterly branch.

Approved by: re (implicit)

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 196513 24-Aug-2009 brian

When realloc()ing device memory for transfer to another ppp process,
don't continue to use the realloc()d pointer - it might have changed!

Remove some stray diagnostics while I'm here.

MFC after: 3 days


# 134833 06-Sep-2004 marcel

Fix the build on 64-bit platforms.


# 134789 05-Sep-2004 brian

Make ppp WARNS=5 clean


# 132818 29-Jul-2004 glebius

Add configuration option "set pppoe [standard|3Com]" which allows
to configure mode for ng_pppoe(4) node under control.

Reviewed by: brian
Approved by: julian (mentor)


# 99086 29-Jun-2002 brian

When a netgraph message is read, look for another before returning.
This removes a bad latency problem during initial setup where we
end up waiting for too long before reading the connected message
and time the connection out.

Problem figured out by: Andre Albsmeier <andre@albsmeier.net>


# 98638 22-Jun-2002 brian

Don't expect NUL terminated data in all netgraph messages received.
Only display message hook values we understand.


# 96582 14-May-2002 brian

o Clean up some #includes
o Bump version number to 3.0.4
o When talking to a RADIUS server, provide a NAS-Port-Type.

When the NAS-Port-Type is Ethernet, provide a NAS-Port value equal
to the SESSIONID from the environment in direct mode or the
NGM_PPPOE_SESSIONID message in other modes. If no SESSIONID is found,
default to the interface index in client mode or zero in server mode.

When the NAS-Port-Type is ISDN, set the NAS-Port to the minor number
of the physical device (ie, the N in /dev/i4brbchN).

This makes it easier for the RADIUS server to identify the client
WRT accounting data etc.

Prompted by: lsz8425 <lsz8425@mail.cd.hn.cn>


# 93418 30-Mar-2002 brian

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.


# 90975 20-Feb-2002 brian

Handle NGM_PPPOE_ACNAME messages.

Submitted by: Andre Albsmeier <andre@albsmeier.net>
Approved by: julian


# 82277 24-Aug-2001 brian

Handle return values of 0 from NgRecvMsg() properly.


# 81634 14-Aug-2001 brian

o Add ipv6 support, abstracting most NCP addresses into opaque
structures (well, they're treated as opaque).

It's now possible to manage IPv6 interface addresses and routing
table entries and to filter IPV6 traffic whether encapsulated or
not.

IPV6CP support is crude for now, and hasn't been tested against
any other implementations.

RADIUS and IPv6 are independent of eachother for now.

ppp.linkup/ppp.linkdown aren't currently used by IPV6CP

o Understand all protocols(5) in filter rules rather than only a select
few.

o Allow a mask specification for the ``delete'' command. It's now
possible to specifically delete one of two conflicting routes.

o When creating and deleting proxy arp entries, do it for all IPv4
interface addresses rather than doing it just for the ``current''
peer address.

o When iface-alias isn't in effect, don't blow away manually (via ``iface
add'') added interface addresses.

o When listening on a tcp server (diagnostic) socket, bind so that a
tcp46 socket is created -- allowing both IPv4 and IPv6 connections.

o When displaying ICMP traffic, don't display the icmp type twice.
When display traffic, display at least some information about unrecognised
traffic.

o Bump version

Inspired after filtering work by: Makoto MATSUSHITA <matusita@jp.FreeBSD.org>


# 79854 18-Jul-2001 brian

Bring the PPPoE Ethernet interface up *BEFORE* we send the node a
CONNECT message.

MFC after: 1 week


# 78410 18-Jun-2001 brian

Handle hardware-imposed MTU/MRU limitations. PPPoE will no longer
allow MRU/MTU negotiations to exceed 1492.

Add an optional ``max'' specifier to ``set m[rt]u'', ie.

set mtu max 1480

Bump the ppp version number.

Sponsored by: Monzoon Networks AG and FreeBSD Services Limited


# 75376 10-Apr-2001 brian

kldload ng_pppoe as necessary


# 75252 05-Apr-2001 brian

It's possible to kldload netgraph (as well as the other ng_* bits),
so do it if required.


# 74916 28-Mar-2001 brian

Bring the PPPoE interface UP if required

Suggested by: archie


# 71006 14-Jan-2001 brian

Use fstat to check if descriptor 0 is a socket.

Suggested by: julian


# 68846 16-Nov-2000 brian

Go back to populating data_len in struct ngpppoe_init_data.


# 68032 31-Oct-2000 brian

Use the new-style ngpppoe_init_data structure.

Approved by: archie


# 66898 09-Oct-2000 brian

Create fd_sets big enough to handle getdtablesize() descriptors.


# 62209 28-Jun-2000 brian

kldload ng_ether if we need to.


# 58028 14-Mar-2000 brian

To avoid namespace polution in NetBSD:

``struct descriptor'' -> ``struct fdescriptor''


# 53733 26-Nov-1999 brian

Change ``set cd'' so that its default value is device specific. The
default is still 1 second for ttys, but is now 6 seconds for i4b (ISDN)
devices and 5 seconds for ethernet (PPPoE) devices.


# 53684 25-Nov-1999 brian

Rewrite the link descriptor transfer code in MP mode.

Previously, ppp attempted to bind() to a local domain tcp socket
based on the peer authname & enddisc. If it succeeded, it listen()ed
and became MP server. If it failed, it connect()ed and became MP
client. The server then select()ed on the descriptor, accept()ed
it and wrote its pid to it then read the link data & link file descriptor,
and finally sent an ack (``!''). The client would read() the server
pid, transfer the link lock to that pid, send the link data & descriptor
and read the ack. It would then close the descriptor and clean up.

There was a race between the bind() and listen() where someone could
attempt to connect() and fail.

This change removes the race. Now ppp makes the RCVBUF big enough on a
socket descriptor and attempts to bind() to a local domain *udp* socket
(same name as before). If it succeeds, it becomes MP server. If it
fails, it sets the SNDBUF and connect()s, becoming MP client. The server
select()s on the descriptor and recvmsg()s the message, insisting on at
least two descriptors (plus the link data). It uses the second descriptor
to write() its pid then read()s an ack (``!''). The client creates a
socketpair() and sendmsg()s the link data, link descriptor and one of
the socketpair descriptors. It then read()s the server pid from the
other socketpair descriptor, transfers any locks and write()s an ack.

Now, there can be no race, and a connect() failure indicates a stale
socket file.

This also fixes MP ppp over ethernet, where the struct msghdr was being
misconstructed when transferring the control socket descriptor.

Also, if we fail to send the link, don't hang around in a ``session
owner'' state, just do the setsid() and fork() if it's required to
disown a tty.

UDP idea suggested by: Chris Bennet from Mindspring at FreeBSDCon


# 53535 21-Nov-1999 brian

Call MkSockNode() as uid 0

Forgotten by: julian


# 53242 16-Nov-1999 brian

Remove some extraneous ifdefs, and don't try to put the socket in
O_NONBLOCK. The select() is the best best as I don't want to muck
about with the send/receive thresholds.


# 53241 16-Nov-1999 brian

Use modfind() to check if a kld is already loaded.

Submitted mostly by: green


# 53071 09-Nov-1999 brian

If dev->connected is already set to CARRIER_OK in ether_AwaitCarrier,
don't go and set it to CARRIER_LOST !


# 53062 09-Nov-1999 brian

Be a bit smarter when identifying a netgraph node
(don't dereference NULL).


# 52963 07-Nov-1999 brian

Don't zero-pad netgraph node ids

Recommended by: julian


# 52942 06-Nov-1999 brian

Support PPPoE

Help (lots) from: julian, archie
Facilities from: ahebert@pubnix.net