History log of /freebsd-current/usr.sbin/ppp/ncpaddr.c
Revision Date Author Comments
# b3e76948 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# 6cd3353b 10-Feb-2018 Eugene Grosbein <eugen@FreeBSD.org>

ppp(8): fix code producing debugging logs

Fix several cases when long buffer is copied to shorter one
using snprintf that results in contents truncation and
clobbering unsaved errno value and creation of misleading logs.

PR: 218517
Approved by: avg (mentor)
MFC after: 1 month


# 1de7b4b8 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

various: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 4f101318 13-May-2005 Hajimu UMEMOTO <ume@FreeBSD.org>

NI_WITHSCOPEID cleanup. Neither RFC 2553 nor RFC 3493 defines
NI_WITHSCOPEID, and our getaddrinfo(3) does nothing special
for it, now.


# 057f1760 04-Sep-2004 Brian Somers <brian@FreeBSD.org>

Make ppp WARNS=5 clean


# 392460d7 21-Jun-2003 Hajimu UMEMOTO <ume@FreeBSD.org>

Though manpage says that 0.0.0.0 can be used as HISADDR for gw
in Framed-Route, it didn't work. Since ncprange_aton() treats
0.0.0.0 and :: as prefixlen=0, we need to care the case.

MFC after: 1 week


# 7dd68385 25-May-2003 Peter Wemm <peter@FreeBSD.org>

Add a pretty cheesy hack to avoid a gcc-3.2.2 ICE (internal compiler
error) on amd64 when doing pointer subtraction. This bug is already
fixed in gcc-3.3 (waiting for after the branch), and the hack will be
backed out at the first opportunity. This is in the ipv6 code path.

Approved by: re (scottl)


# b706c03d 05-Apr-2003 Hajimu UMEMOTO <ume@FreeBSD.org>

When session is over, IPv6 default route to tun should be
removed, too.

MFC after: 1 week


# 34894c56 25-Mar-2003 Hajimu UMEMOTO <ume@FreeBSD.org>

Don't install wrong IPv6 route by add command.


# a3c48b40 28-Aug-2002 Brian Somers <brian@FreeBSD.org>

- made ppp compliant to RFC 2472 (based on a patch from another
contributor)
- support ipv6cpretry and ipv6cpretries, which are IPv6 versions
of ipcpretry and ipcpretries.
- improve handling of IPv6 link-local addresses

Submitted by: JINMEI Tatuya <jinmei@isl.rdc.toshiba.co.jp>


# 10be78d3 15-Jun-2002 Brian Somers <brian@FreeBSD.org>

Remove whitespace at the end of lines.


# 52c55590 16-May-2002 Brian Somers <brian@FreeBSD.org>

Add some OpenBSD includes


# de59e178 13-May-2002 Brian Somers <brian@FreeBSD.org>

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>


# a3d71c3d 23-Nov-2001 Brian Somers <brian@FreeBSD.org>

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 !


# 26dceef0 22-Nov-2001 Brian Somers <brian@FreeBSD.org>

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.


# 260799af 19-Aug-2001 Brian Somers <brian@FreeBSD.org>

Add some casts.

Not spotted by: FreeBSD's gcc version 2.95.3 20010315 (release)
Spotted by: OpenBSD's gcc version 2.95.3 20010125 (prerelease)


# 5ae08329 15-Aug-2001 Brian Somers <brian@FreeBSD.org>

Specify the gateway address when updating the MTU and send/recv pipe
sizes on a route.

IMHO this shouldn't be necessary (the destination & mask/prefixlen
should be enough), but without it, the default route update under
OpenBSD will fail.

Thanks to: Russell T Hunt <alaric@MIT.EDU>


# 2f4da197 14-Aug-2001 Brian Somers <brian@FreeBSD.org>

Avoid calling bits2mask4() when bits is -1.


# 30949fd4 14-Aug-2001 Brian Somers <brian@FreeBSD.org>

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>