freebsd-skq/sys/net
Bill Paul 79a5874541 Testing VLANs with the new 8139C+ chip (which does hardware tag
insertion and extraction) has revealed two bugs:

- In vlan_start(), we're supposed to check the underlying interface to
  see if it has the IFCAP_VLAN_HWTAGGING cabability set and, if so, set
  things up for the VLAN_OUTPUT_TAG() routine. However the code checks
  ifp->if_capabilities, which is the vlan pseudo-interface's capabilities
  when it should be checking p->if_capabilities, which relates to the
  underlying physical interface. Change ifp->if_capabilities to
  p->if_capabilities so this works.

- In vlan_input(), we have to extract the 16-bit tag value from the
  received frame and use it to figure out which vlan interface gets
  the frame. The code that we use to track down the desired vlan
  pseudo-interface is:

       for (ifv = LIST_FIRST(&ifv_list); ifv != NULL;
            ifv = LIST_NEXT(ifv, ifv_list))
                if (ifp == ifv->ifv_p && tag == ifv->ifv_tag)
                        break;

  The problem is that 'tag' is not computed consistently. In the case
  where the interface supports hardware VLAN tag extraction and calls
  VLAN_INPUT_TAG(), we do this:

                tag = *(u_int*)(mtag+1);

  But in the software emulation case, we do this

                tag = EVL_VLANOFTAG(ntohs(evl->evl_tag));

  The problem here is the EVL_VLANOFTAG() macro is only ever applied
  in this one case. It's never applied to ifv->ifv_tag or anwhere else.
  We must be consistent: either it's applied everywhere or nowhere.
  To see how this can be a problem, do something like
  ifconfig vlan0 vlan 12345 vlandev foo0 and observe the results.

  I'm not quite sure what the right thing is to do here. Neither the
  vlan(4) nor ifconfig(8) man pages suggest which way to go. For now,
  I've removed this use of EVL_VLANOFTAG() so that the tag will match
  correctly in all cases. I will not get upset if somebody makes a
  compelling argument for using EVL_VLANOFTAG() everywhere instead,
  as long as the use is consistent.
2003-07-06 03:24:25 +00:00
..
bpf_compat.h Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
bpf_filter.c Turn on BPF_ALIGN for all non-i386 platforms, instead of having an 2002-07-05 00:06:08 +00:00
bpf.c Assignment could be NULL, check. 2003-03-21 15:13:29 +00:00
bpf.h o add BIOCGDLTLIST and BIOCSDLT ioctls to get the data link type list 2003-01-20 19:08:46 +00:00
bpfdesc.h o add support for multiple link types per interface (e.g. 802.11 and Ethernet) 2002-11-14 23:24:13 +00:00
bridge.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
bridge.h network interface and link layer changes: 2002-11-15 00:00:15 +00:00
bsd_comp.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
ethernet.h general cleanups mostly aimed at improving portability of drivers 2002-11-14 23:28:47 +00:00
fddi.h network interface and link layer changes: 2002-11-15 00:00:15 +00:00
if_arc.h - add support for IPX (tested with mount -t nwfs and mars_nwe), 2003-01-24 01:32:20 +00:00
if_arcsubr.c Update netisr handling; Each SWI now registers its queue, and all queue 2003-03-04 23:19:55 +00:00
if_arp.h - Use if_broadcastaddr from struct ifnet rather than relying on 2003-03-21 17:53:16 +00:00
if_atm.h Now that most of this file is new, stylify the rest and correct the 2003-06-18 10:53:49 +00:00
if_atmsubr.c Add the hooks for netgraph and HARP to the NATM code. This allows us 2003-06-23 16:53:28 +00:00
if_disc.c Introduce an M_ASSERTPKTHDR() macro which performs the very common task 2003-04-08 14:25:47 +00:00
if_dl.h Move ISO88025 source routing information into sockaddr_dl's sdl_data 2002-05-07 22:14:06 +00:00
if_ef.c Remove break after return. 2003-05-31 20:06:27 +00:00
if_ethersubr.c Back out rev 1.146 -- it broke the LINT build. 2003-05-05 09:15:50 +00:00
if_faith.c Introduce an M_ASSERTPKTHDR() macro which performs the very common task 2003-04-08 14:25:47 +00:00
if_fddisubr.c - Use IFP2AC(). 2003-03-16 00:17:44 +00:00
if_gif.c Update netisr handling; Each SWI now registers its queue, and all queue 2003-03-04 23:19:55 +00:00
if_gif.h - after gif_set_tunnel(), psrc/pdst may be null. set IFF_RUNNING accordingly. 2002-10-16 19:49:37 +00:00
if_gre.c Finish driving a stake through the heart of netns and the associated 2003-03-05 19:24:24 +00:00
if_gre.h MFS: recognize gre packets used in the WCCP protocol. 2002-12-07 14:22:05 +00:00
if_iso88025subr.c - Use IFP2AC(). 2003-03-16 00:17:44 +00:00
if_llc.h s/__attribute__((__packed__))/__packed/g 2002-09-23 06:25:08 +00:00
if_loop.c Replace a handrolled defrag function with m_defrag. The handrolled 2003-05-28 02:04:33 +00:00
if_media.c Add media types and options for ATM. While on most ATM cards media cannot 2003-04-29 17:23:23 +00:00
if_media.h add "autoselect" mode and "auto" alias: these let you reset the 2003-06-25 15:03:05 +00:00
if_mib.c
if_mib.h
if_ppp.c o netisr_queue() returns 1 on success and 0 on failure, 2003-03-27 12:52:57 +00:00
if_ppp.h
if_pppvar.h Make ppp(4) devices clonable and unloadable. 2002-08-09 15:30:48 +00:00
if_sl.c Update netisr handling; Each SWI now registers its queue, and all queue 2003-03-04 23:19:55 +00:00
if_slvar.h
if_sppp.h
if_spppsubr.c Finish driving a stake through the heart of netns and the associated 2003-03-05 19:24:24 +00:00
if_stf.c Update netisr handling; Each SWI now registers its queue, and all queue 2003-03-04 23:19:55 +00:00
if_stf.h just merged cosmetic changes from KAME to ease sync between KAME and FreeBSD. 2002-04-19 04:46:24 +00:00
if_tap.c Gigacommit to improve device-driver source compatibility between 2003-03-03 12:15:54 +00:00
if_tap.h
if_tapvar.h
if_tun.c Revert last change and insure the driver can support other address families. 2003-03-08 17:32:21 +00:00
if_tun.h
if_tunvar.h
if_types.h
if_var.h Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup, 2003-01-01 18:49:04 +00:00
if_vlan_var.h Pass the correct malloc flags to m_tag_alloc(). 2003-03-13 00:30:31 +00:00
if_vlan.c Testing VLANs with the new 8139C+ chip (which does hardware tag 2003-07-06 03:24:25 +00:00
if.c Fix some easy, global, lint warnings. In most cases, this means 2003-04-30 12:57:40 +00:00
if.h o add IF_*bps macros for netbsd compatibility 2002-11-14 23:16:18 +00:00
iso88025.h Fix whitespace issues. 2003-03-15 23:55:33 +00:00
net_osdep.c just merged cosmetic changes from KAME to ease sync between KAME and FreeBSD. 2002-04-19 04:46:24 +00:00
net_osdep.h Lock up ifaddr reference counts. 2002-12-18 11:46:59 +00:00
netisr.c Discard the packet if the netisr queue is null instead of panicing, for 2003-03-08 22:12:32 +00:00
netisr.h Finish driving a stake through the heart of netns and the associated 2003-03-05 19:24:24 +00:00
pfil.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
pfil.h Fixed some style bugs in the removal of __P(()). The main ones were 2002-03-24 09:34:04 +00:00
pfkeyv2.h add definitions for RIPEMD-160 HMAC and Skipjack encryption algorithms, 2002-10-16 02:18:56 +00:00
ppp_comp.h Fixed some style bugs in the removal of __P(()). The main ones were 2002-03-24 09:34:04 +00:00
ppp_deflate.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
ppp_defs.h
ppp_tty.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
radix.c Make the radix tree code compilable in userland. Requested by ru. 2003-02-08 01:44:09 +00:00
radix.h Make the radix tree code compilable in userland. Requested by ru. 2003-02-08 01:44:09 +00:00
raw_cb.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
raw_cb.h Remove __P. 2002-03-19 21:54:18 +00:00
raw_usrreq.c Remove useless local variable from raw_input(). 2002-12-28 02:29:19 +00:00
route.c No need to unlock if error detected before locking. 2003-04-13 06:21:02 +00:00
route.h Finish driving a stake through the heart of netns and the associated 2003-03-05 19:24:24 +00:00
rtsock.c Finish driving a stake through the heart of netns and the associated 2003-03-05 19:24:24 +00:00
slcompress.c Don't use ovbcopy(); use void * instead of char *. 2003-04-04 12:11:46 +00:00
slcompress.h Remove __P. 2002-03-19 21:54:18 +00:00
slip.h
zlib.c chase more of the MIN/MAX mess. *sigh* 2003-02-02 13:52:25 +00:00
zlib.h Add one copy of crc32() and crc32_tab[] in libkern, and remove it two other 2002-05-29 20:24:09 +00:00