3431d451a5
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
35 lines
1.1 KiB
Makefile
35 lines
1.1 KiB
Makefile
# Copyright (c) 1996 WIDE Project. All rights reserved.
|
|
#
|
|
# Redistribution and use in source and binary forms, with or without
|
|
# modifications, are permitted provided that the above copyright notice
|
|
# and this paragraph are duplicated in all such forms and that any
|
|
# documentation, advertising materials, and other materials related to
|
|
# such distribution and use acknowledge that the software was developed
|
|
# by the WIDE Project, Japan. The name of the Project may not be used to
|
|
# endorse or promote products derived from this software without
|
|
# specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS''
|
|
# AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
|
|
# LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
# A PARTICULAR PURPOSE.
|
|
# $FreeBSD$
|
|
|
|
.include <src.opts.mk>
|
|
|
|
.PATH: ${SRCTOP}/contrib/tcpdump
|
|
|
|
PROG= ndp
|
|
MAN= ndp.8
|
|
SRCS= ndp.c gmt2local.c
|
|
|
|
CFLAGS+= -I. -I${.CURDIR} -I${SRCTOP}/contrib/tcpdump
|
|
CFLAGS+= -D_U_=""
|
|
|
|
.if ${MK_EXPERIMENTAL} != "no"
|
|
CFLAGS+= -DEXPERIMENTAL
|
|
CFLAGS+= -DDRAFT_IETF_6MAN_IPV6ONLY_FLAG
|
|
.endif
|
|
|
|
WARNS?= 3
|
|
|
|
.include <bsd.prog.mk>
|