[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-vlan
Subject:    [VLAN] Question on dev_add_pack (kernel 2.2.17)
From:       Ben Greear <greearb () candelatech ! com>
Date:       2000-10-26 4:31:15
[Download RAW message or body]

Strange things are happening in VLAN land for me at the moment, and
I think that this might be part of the problem.  VLAN code can now
mangle packets (the header only..but still..)

So, it seems that it should be at the end of the list of packet_types
in the hash.  However, the dev_add_pack always places it on the front.

So, how am I meant to place it on the back?  Add another method?  Add
a flag to this method to specify head/tail?

From dev.c:

/*
 *	Add a protocol ID to the list. Now that the input handler is
 *	smarter we can dispense with all the messy stuff that used to be
 *	here.
 *
 *	BEWARE!!! Protocol handlers, mangling input packets,
 *	MUST BE last in hash buckets and checking protocol handlers
 *	MUST start from promiscous ptype_all chain in net_bh.
 *	It is true now, do not change it.
 *	Explantion follows: if protocol handler, mangling packet, will
 *	be the first on list, it is not able to sense, that packet
 *	is cloned and should be copied-on-write, so that it will
 *	change it and subsequent readers will get broken packet.
 *							--ANK (980803)
 */
 void dev_add_pack(struct packet_type *pt)
{
...


Thanks,
Ben

-- 
Ben Greear (greearb@candelatech.com)  http://www.candelatech.com
Author of ScryMUD:  scry.wanfear.com 4444        (Released under GPL)
http://scry.wanfear.com               http://scry.wanfear.com/~greear

_______________________________________________
VLAN mailing list  -  VLAN@Scry.WANfear.com
http://www.WANfear.com/mailman/listinfo/vlan
VLAN Page:  http://scry.wanfear.com/~greear/vlan.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic