freebsd-dev/sbin/ifconfig/Makefile
Hiroki Sato dbe5926046 Fix and add a workaround on an issue of EtherIP packet with reversed
version field sent via gif(4)+if_bridge(4).  The EtherIP
implementation found on FreeBSD 6.1, 6.2, 6.3, 7.0, 7.1, and 7.2 had
an interoperability issue because it sent the incorrect EtherIP
packets and discarded the correct ones.

This change introduces the following two flags to gif(4):

 accept_rev_ethip_ver: accepts both correct EtherIP packets and ones
    with reversed version field, if enabled.  If disabled, the gif
    accepts the correct packets only.  This flag is enabled by
    default.

 send_rev_ethip_ver: sends EtherIP packets with reversed version field
    intentionally, if enabled.  If disabled, the gif sends the correct
    packets only.  This flag is disabled by default.

These flags are stored in struct gif_softc and can be set by
ifconfig(8) on per-interface basis.

Note that this is an incompatible change of EtherIP with the older
FreeBSD releases.  If you need to interoperate older FreeBSD boxes and
new versions after this commit, setting "send_rev_ethip_ver" is
needed.

Reviewed by:	thompsa and rwatson
Spotted by:	Shunsuke SHINOMIYA
PR:		kern/125003
MFC after:	2 weeks
2009-06-07 23:00:40 +00:00

52 lines
1.3 KiB
Makefile

# From: @(#)Makefile 8.1 (Berkeley) 6/5/93
# $FreeBSD$
.include <bsd.own.mk>
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
SRCS+= af_inet.c # IPv4 support
SRCS+= af_inet6.c # IPv6 support
SRCS+= af_atalk.c # AppleTalk support
SRCS+= ifclone.c # clone device support
SRCS+= ifmac.c # MAC support
SRCS+= ifmedia.c # SIOC[GS]IFMEDIA support
SRCS+= ifvlan.c # SIOC[GS]ETVLAN support
SRCS+= ifgre.c # GRE keys etc
SRCS+= ifgif.c # GIF reversed header workaround
SRCS+= ifieee80211.c regdomain.c # SIOC[GS]IEEE80211 support
DPADD+= ${LIBBSDXML} ${LIBSBUF}
LDADD+= -lbsdxml -lsbuf
SRCS+= ifcarp.c # SIOC[GS]VH support
SRCS+= ifgroup.c # ...
SRCS+= ifpfsync.c # pfsync(4) support
SRCS+= ifbridge.c # bridge support
SRCS+= iflagg.c # lagg support
.if ${MK_IPX_SUPPORT} != "no" && !defined(RELEASE_CRUNCH)
SRCS+= af_ipx.c # IPX support
DPADD+= ${LIBIPX}
LDADD+= -lipx
.endif
MAN= ifconfig.8
CFLAGS+= -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wnested-externs
WARNS?= 0
.include <bsd.prog.mk>