1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00
freebsd/sys/net
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
..
bpf_buffer.c
bpf_buffer.h
bpf_filter.c
bpf_jitter.c
bpf_jitter.h
bpf_zerocopy.c Clarify some comments, fix some types, and rename ZBUF_FLAG_IMMUTABLE to 2009-03-07 10:21:37 +00:00
bpf_zerocopy.h
bpf.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
bpf.h Sync DLTs with latest libpcap version. 2009-04-02 13:02:12 +00:00
bpfdesc.h
bridgestp.c replace IFQ_ENQUEUE + if_start with if_transmit 2009-04-27 22:46:26 +00:00
bridgestp.h
ethernet.h Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
fddi.h
firewire.h
flowtable.c remove gratuitous memory barrier, a remnant of unified L2 / L3 2009-04-27 22:45:19 +00:00
flowtable.h - Import infrastructure for caching flows as a means of accelerating L3 and L2 lookups 2009-04-19 00:16:04 +00:00
ieee8023ad_lacp.c Use the flowid if its available for selecting the tx port. 2009-04-30 14:25:44 +00:00
ieee8023ad_lacp.h
if_arc.h Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_arcsubr.c remove call to IFQ_HANDOFF is it called by if_transmit in the default case 2009-04-27 22:44:26 +00:00
if_arp.h
if_atm.h Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_atmsubr.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
if_bridge.c More cleanup in preparation of ipfw relocation (no actual code change): 2009-06-05 13:44:30 +00:00
if_bridgevar.h
if_clone.c V_irtualize the if_clone framework, thus allowing for clonable ifnets 2009-05-23 21:43:44 +00:00
if_clone.h
if_dead.c During if_detach(), invoke if_dead() to set the ifnet's function 2009-04-23 11:51:53 +00:00
if_disc.c Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_dl.h
if_edsc.c
if_ef.c replace IFQ_HANDOFF with if_transmit 2009-04-27 22:45:56 +00:00
if_enc.c Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_enc.h
if_ethersubr.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
if_faith.c Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_fddisubr.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
if_fwsubr.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
if_gif.c Fix and add a workaround on an issue of EtherIP packet with reversed 2009-06-07 23:00:40 +00:00
if_gif.h Fix and add a workaround on an issue of EtherIP packet with reversed 2009-06-07 23:00:40 +00:00
if_gre.c Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_gre.h
if_iso88025subr.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
if_lagg.c Use the flowid if its available for selecting the tx port. 2009-04-30 14:25:44 +00:00
if_lagg.h Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_llatbl.c When an interface address is removed and the last prefix 2009-05-20 21:07:15 +00:00
if_llatbl.h When an interface address is removed and the last prefix 2009-05-20 21:07:15 +00:00
if_llc.h
if_loop.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
if_media.c
if_media.h
if_mib.c Permit buiding kernels with options VIMAGE, restricted to only a single 2009-04-30 13:36:26 +00:00
if_mib.h
if_sppp.h
if_spppfr.c
if_spppsubr.c Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_stf.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
if_stf.h
if_tap.c Remove the splimp()/splx() calls around the setting of the MTU. They are 2009-03-17 02:32:36 +00:00
if_tap.h
if_tapvar.h
if_tun.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
if_tun.h
if_types.h
if_var.h When user_frac in the polling subsystem is low it is going to busy the 2009-05-30 15:14:44 +00:00
if_vlan_var.h
if_vlan.c The vlan code has not required the miibus code since 6.0 when 2009-04-17 17:40:47 +00:00
if.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
if.h When user_frac in the polling subsystem is low it is going to busy the 2009-05-30 15:14:44 +00:00
iso88025.h Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
netisr.c Revert a recent netisr2 change: when billing packets to the current 2009-06-01 18:38:36 +00:00
netisr.h Garbage collect NETISR_POLL and NETISR_POLLMORE, which are no longer 2009-06-01 15:03:58 +00:00
pfil.c
pfil.h Make the rmlock(9) interface a bit more like the rwlock(9) interface: 2009-05-29 10:52:37 +00:00
pfkeyv2.h
ppp_defs.h
radix_mpath.c Extend route command: 2009-04-14 23:05:36 +00:00
radix_mpath.h
radix.c
radix.h
raw_cb.c
raw_cb.h
raw_usrreq.c
route.c Convert the two dimensional array to be malloced and introduce 2009-06-01 15:49:42 +00:00
route.h Convert the two dimensional array to be malloced and introduce 2009-06-01 15:49:42 +00:00
rtsock.c Convert the two dimensional array to be malloced and introduce 2009-06-01 15:49:42 +00:00
slcompress.c
slcompress.h
vnet.h Convert the two dimensional array to be malloced and introduce 2009-06-01 15:49:42 +00:00
zlib.c
zlib.h