freebsd-dev/sys
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
..
alpha Background: pmap_object_init_pt() premaps the pages of a object in 2003-07-03 20:18:02 +00:00
amd64 Background: pmap_object_init_pt() premaps the pages of a object in 2003-07-03 20:18:02 +00:00
arm sys/sys/limits.h: 2003-05-19 20:29:07 +00:00
boot Revert non-style part of the recent two deltas that dealt with 2003-07-02 12:45:45 +00:00
cam Merge common XPT_CALC_GEOMETRY functions into a single convenience function. 2003-06-14 22:17:41 +00:00
coda Remove in toto coda_strategy which incorrectly implemented vop_panic(); 2003-06-15 18:45:15 +00:00
compat Don't map LINUX_POSIX_VDISABLE to _POSIX_VDISABLE and vice versa for 2003-06-28 19:32:07 +00:00
conf The .s files were repo-copied to .S files. 2003-07-02 12:57:07 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r116801, 2003-06-25 06:06:52 +00:00
crypto Use __FBSDID(). 2003-06-10 21:44:29 +00:00
ddb Rename P_THREADED to P_SA. P_SA means a process is using scheduler 2003-06-15 00:31:24 +00:00
dev * add support for amd-768 audio, as used on many dual athlon boards. only 2003-07-06 03:11:06 +00:00
fs If bread() returns a zero-length buffer, as can happen after a 2003-07-03 14:54:47 +00:00
geom Only dump 512 bytes of debugging. 2003-07-02 08:07:07 +00:00
gnu Add the same KASSERT to all VOP_STRATEGY and VOP_SPECSTRATEGY implementations 2003-06-15 18:53:00 +00:00
i4b Mega busdma API commit. 2003-07-01 15:52:06 +00:00
i386 Add vm object locking to pmap_prefault(). 2003-07-04 22:13:39 +00:00
ia64 Don't call malloc() and free() while in the debugger and unwinding 2003-07-05 23:21:58 +00:00
isa - Use the new resource_disabled() helper function to see if devices are 2003-07-02 16:09:02 +00:00
isofs/cd9660 change dev_t to struct cdev * to match ufs. This fixes fstat for cd9660 2003-06-24 22:11:20 +00:00
kern Make the conditional, which decides what siglist to put a signal on, 2003-07-05 08:37:40 +00:00
libkern Use __FBSDID(). 2003-06-11 05:37:42 +00:00
modules add the mbr_enc file so that we can load the module on sparc64. 2003-07-05 08:11:43 +00:00
net Testing VLANs with the new 8139C+ chip (which does hardware tag 2003-07-06 03:24:25 +00:00
net80211 insure ic_bss always has a "valid" channel; avoids problems where users could 2003-06-29 20:13:38 +00:00
netatalk - Use if_broadcastaddr from struct ifnet rather than relying on 2003-03-21 17:53:16 +00:00
netatm Use __FBSDID(). 2003-06-11 07:22:30 +00:00
netgraph Allow the caller to get an erro direclty if we sent the packet immediatly. 2003-07-03 22:09:47 +00:00
netinet Implement the 'ipsec' option to match packets coming out of an ipsec tunnel. 2003-07-04 21:42:32 +00:00
netinet6 Do not attempt to access to inp_socket fields if the socket is in the TIME_WAIT 2003-06-17 00:31:30 +00:00
netipsec consolidate callback optimization check in one location by adding a flag 2003-06-30 05:09:32 +00:00
netipx Use __FBSDID(). 2003-06-11 05:37:42 +00:00
netkey Use __FBSDID(). 2003-06-11 05:37:42 +00:00
netnatm Use __FBSDID(). 2003-06-11 05:37:42 +00:00
netncp Use __FBSDID(). 2003-06-11 05:37:42 +00:00
netsmb Add a f_vnode field to struct file. 2003-06-22 08:41:43 +00:00
nfs Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
nfsclient Change idle sleep indentifier to "-" for nfsiod 2003-07-02 08:09:20 +00:00
nfsserver Change idle state sleep identifier to "-" for nfsd. 2003-07-02 08:08:32 +00:00
opencrypto consolidate callback optimization check in one location by adding a flag 2003-06-30 05:09:32 +00:00
pc98 - Use the new resource_disabled() helper function to see if devices are 2003-07-02 16:09:02 +00:00
pccard OLDCARD is OBSOLETE_IN_6. Tag it as such. 2003-06-12 04:46:43 +00:00
pci - Ensure that the busdma API won't do deferred loads by using the 2003-07-04 11:46:23 +00:00
posix4 Use __FBSDID(). 2003-06-11 06:34:30 +00:00
powerpc Background: pmap_object_init_pt() premaps the pages of a object in 2003-07-03 20:18:02 +00:00
rpc
security Remove trailing whitespace. 2003-07-05 01:24:36 +00:00
sparc64 Background: pmap_object_init_pt() premaps the pages of a object in 2003-07-03 20:18:02 +00:00
sys Signals sent specifically to a particular thread must 2003-07-03 19:09:59 +00:00
tools Don't check the state of the vnode interlock if the specification says 2003-06-22 21:20:06 +00:00
ufs We just cached the inode pointer, no need to call VTOI() again. 2003-07-04 12:16:33 +00:00
vm Lock a vm object when freeing a page from it. 2003-07-05 20:51:22 +00:00
Makefile Revert exclusion for amd64 that stopped boot/ being built. 2003-06-26 03:52:48 +00:00