freebsd-dev/sbin/ifconfig/Makefile
Bjoern A. Zeeb 201100c58b Initial implementation of draft-ietf-6man-ipv6only-flag.
This change defines the RA "6" (IPv6-Only) flag which routers
may advertise, kernel logic to check if all routers on a link
have the flag set and accordingly update a per-interface flag.

If all routers agree that it is an IPv6-only link, ether_output_frame(),
based on the interface flag, will filter out all ETHERTYPE_IP/ARP
frames, drop them, and return EAFNOSUPPORT to upper layers.

The change also updates ndp to show the "6" flag, ifconfig to
display the IPV6_ONLY nd6 flag if set, and rtadvd to allow
announcing the flag.

Further changes to tcpdump (contrib code) are availble and will
be upstreamed.

Tested the code (slightly earlier version) with 2 FreeBSD
IPv6 routers, a FreeBSD laptop on ethernet as well as wifi,
and with Win10 and OSX clients (which did not fall over with
the "6" flag set but not understood).

We may also want to (a) implement and RX filter, and (b) over
time enahnce user space to, say, stop dhclient from running
when the interface flag is set.  Also we might want to start
IPv6 before IPv4 in the future.

All the code is hidden under the EXPERIMENTAL option and not
compiled by default as the draft is a work-in-progress and
we cannot rely on the fact that IANA will assign the bits
as requested by the draft and hence they may change.

Dear 6man, you have running code.

Discussed with:	Bob Hinden, Brian E Carpenter
2018-10-30 20:08:48 +00:00

77 lines
1.8 KiB
Makefile

# From: @(#)Makefile 8.1 (Berkeley) 6/5/93
# $FreeBSD$
.include <src.opts.mk>
PACKAGE=runtime
PROG= ifconfig
SRCS= ifconfig.c # base support
#
# NB: The order here defines the order in which the constructors
# are called. This in turn defines the default order in which
# status is displayed. Probably should add a priority mechanism
# to the registration process so we don't depend on this aspect
# of the toolchain.
#
SRCS+= af_link.c # LLC support
.if ${MK_INET_SUPPORT} != "no"
SRCS+= af_inet.c # IPv4 support
.endif
.if ${MK_INET6_SUPPORT} != "no"
SRCS+= af_inet6.c # IPv6 support
.endif
.if ${MK_INET6_SUPPORT} != "no"
SRCS+= af_nd6.c # ND6 support
.endif
SRCS+= ifclone.c # clone device support
SRCS+= ifmac.c # MAC support
SRCS+= ifmedia.c # SIOC[GS]IFMEDIA support
SRCS+= iffib.c # non-default FIB support
SRCS+= ifvlan.c # SIOC[GS]ETVLAN support
SRCS+= ifvxlan.c # VXLAN support
SRCS+= ifgre.c # GRE keys etc
SRCS+= ifgif.c # GIF reversed header workaround
SRCS+= ifipsec.c # IPsec VTI
SRCS+= sfp.c # SFP/SFP+ information
LIBADD+= m
SRCS+= ifieee80211.c # SIOC[GS]IEEE80211 support
LIBADD+= 80211
SRCS+= carp.c # SIOC[GS]VH support
SRCS+= ifgroup.c # ...
.if ${MK_PF} != "no"
SRCS+= ifpfsync.c # pfsync(4) support
.endif
SRCS+= ifbridge.c # bridge support
SRCS+= iflagg.c # lagg support
.if ${MK_EXPERIMENTAL} != "no"
CFLAGS+= -DDRAFT_IETF_6MAN_IPV6ONLY_FLAG
.endif
.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+= -DINET6
.endif
.if ${MK_INET_SUPPORT} != "no"
CFLAGS+= -DINET
.endif
.if ${MK_JAIL} != "no" && !defined(RELEASE_CRUNCH) && !defined(RESCUE)
CFLAGS+= -DJAIL
LIBADD+= jail
.endif
MAN= ifconfig.8
CFLAGS+= -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wnested-externs
WARNS?= 2
HAS_TESTS=
SUBDIR.${MK_TESTS}+= tests
.include <bsd.prog.mk>