Re: TKIP encryption should allocate enough tailroom

2007-01-19 Thread Pekka Pietikainen
On Thu, Jan 18, 2007 at 08:55:37AM -0500, Brandon Craig Rhodes wrote: to debugging messages! In some circumstances, debug messages are always produced; in several others, net_ratelimit() is called to decided whether to print an error (but why in these cases and not others?); and in many

Re: TKIP encryption should allocate enough tailroom

2007-01-18 Thread Pekka Pietikainen
On Wed, Jan 17, 2007 at 11:46:35AM -0500, Brandon Craig Rhodes wrote: Having further reviewed my code, I have changed my mind; the ieee80211_crypt_tkip routines are not designed to be responsible for creating enough headroom and tailroom. The hostap driver should be doing this. In fact, I

Re: TKIP encryption should allocate enough tailroom

2007-01-18 Thread Brandon Craig Rhodes
Pekka Pietikainen [EMAIL PROTECTED] writes: On Wed, Jan 17, 2007 at 11:46:35AM -0500, Brandon Craig Rhodes wrote: Having further reviewed my code, I have changed my mind; the ieee80211_crypt_tkip routines are not designed to be responsible for creating enough headroom and tailroom. Even

Re: TKIP encryption should allocate enough tailroom

2007-01-17 Thread Brandon Craig Rhodes
I wrote: After frustrating days of hung TCP connections, I have determined that the encryption routines in net/iee80211/ieee80211_crypt_tkip.c should be more aggressive in providing themselves with enough packet tailroom to perform their encryption. Having further reviewed my code, I have

Re: TKIP encryption should allocate enough tailroom

2007-01-17 Thread Larry Finger
Brandon Craig Rhodes wrote: Having further reviewed my code, I have changed my mind; the ieee80211_crypt_tkip routines are not designed to be responsible for creating enough headroom and tailroom. The hostap driver should be doing this. In fact, I now see that the hostap driver actually

Re: TKIP encryption should allocate enough tailroom

2007-01-17 Thread Brandon Craig Rhodes
Larry Finger [EMAIL PROTECTED] writes: Brandon Craig Rhodes wrote: Having further reviewed my code, I have changed my mind; the ieee80211_crypt_tkip routines are not designed to be responsible for creating enough headroom and tailroom. The hostap driver should be doing this. This makes

TKIP encryption should allocate enough tailroom

2007-01-16 Thread Brandon Craig Rhodes
After frustrating days of hung TCP connections, I have determined that the encryption routines in net/iee80211/ieee80211_crypt_tkip.c should be more aggressive in providing themselves with enough packet tailroom to perform their encryption. They presently will only perform encryption if the

Re: TKIP encryption should allocate enough tailroom

2007-01-16 Thread Brandon Craig Rhodes
Mitchell Blank Jr [EMAIL PROTECTED] writes: Brandon Craig Rhodes wrote: +if (unlikely(err || skb_tailroom(skb) 4)) { +printk(KERN_DEBUG Failed to increase tailroom +for TKIP encrypt); +return err || -1; The

Re: TKIP encryption should allocate enough tailroom

2007-01-16 Thread Michael Wu
On Tuesday 16 January 2007 21:31, Brandon Craig Rhodes wrote: The attached patch, if applied to kernel 2.6.18, solves both problems. I am not very familiar with the conventions of kernel networking code, so there may be better ways of fixing this; but the patch should illustrate the general

Re: TKIP encryption should allocate enough tailroom

2007-01-16 Thread Mitchell Blank Jr
Brandon Craig Rhodes wrote: + if (skb_tailroom(skb) 4) { + int err; + err = skb_padto(skb, skb-len + 4); + if (unlikely(err || skb_tailroom(skb) 4)) { + printk(KERN_DEBUG Failed to increase tailroom +

Re: TKIP encryption should allocate enough tailroom

2007-01-16 Thread Herbert Xu
Brandon Craig Rhodes [EMAIL PROTECTED] wrote: Egads! You are correct. My intention was to preserve the value of err if an unsuccessful value was returned by skb_padto(), and otherwise to return -1 which seemed the popular value used for errors elsewhere in the code. - Would the