Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 175911 - dhcpcd-3.0.16-r1 problem with wpa_supplicant and hostap driver
Summary: dhcpcd-3.0.16-r1 problem with wpa_supplicant and hostap driver
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Mobile Herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-24 21:11 UTC by BertrandB
Modified: 2007-05-05 18:43 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Pad before end (dhcpcd-3.0.17-hostap.patch,738 bytes, patch)
2007-04-26 18:37 UTC, Roy Marples (RETIRED)
Details | Diff
Pad before end (dhcpcd-3.0.17-hostap.patch,604 bytes, patch)
2007-04-26 19:36 UTC, Roy Marples (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description BertrandB 2007-04-24 21:11:03 UTC
When i use the dhcpcd 3.0.16-r1 on my wifi link (wpa_suplicant wpa-psk tkip) i got  on syslog "wifi0: TX -encryption failed" and dhcpd timeout.

Back to dhcpcd.3.0.16 al is ok

Reproducible: Always

Steps to Reproduce:
1.emerge =dhcpcd.3.0.16-r1
2./etc/init.d/net.wlan0 restart
3.you lose your link and never got it




may be a similar problem bug 159029
Comment 1 Roy Marples (RETIRED) gentoo-dev 2007-04-25 13:13:03 UTC
Does dhcpcd-3.0.17 work for you?
Comment 2 BertrandB 2007-04-25 18:27:03 UTC
(In reply to comment #1)
> Does dhcpcd-3.0.17 work for you?
> 

just tested ... same problem with dhcpcd-3.0.17.
Comment 3 Roy Marples (RETIRED) gentoo-dev 2007-04-26 14:05:49 UTC
Well, this has to be some kind of driver bug I'd say. The only difference beween 3.0.16 and 3.0.16-r1 is a patch to enforce a minimum message size of 300 bytes.

Could you report this bug upstream please?
Comment 4 BertrandB 2007-04-26 18:08:26 UTC
(In reply to comment #3)

> Could you report this bug upstream please?
> 
I don't understand what do you want me to do ?

don't you think that the way the patch work for short paquets is erroneous ? something wrong in the way to complete short paquet ?
Comment 5 Roy Marples (RETIRED) gentoo-dev 2007-04-26 18:20:09 UTC
(In reply to comment #4)
> I don't understand what do you want me to do ?

Well, report the issue to the hostap mailing list and see what they say
http://lists.shmoo.com/mailman/listinfo/hostap

> 
> don't you think that the way the patch work for short paquets is erroneous ?
> something wrong in the way to complete short paquet ?
> 

No I don't. It just pads the message with NULL's so it's 300 bytes long.
Some buggy routers require a minimum message size of 300 bytes (an old BOOTP requirement).

The fact that a dhcp client can cause invalid wireless traffic does sound very much like a driver bug.
Comment 6 Roy Marples (RETIRED) gentoo-dev 2007-04-26 18:37:45 UTC
Created attachment 117326 [details, diff]
Pad before end

Although I suppose we could pad before the end of message marker. This shouldn't make any difference in the real world though. A dhcp client should not be able to affect the wireless operation though.
Comment 7 Roy Marples (RETIRED) gentoo-dev 2007-04-26 19:36:29 UTC
Created attachment 117336 [details, diff]
Pad before end

Of course, we don't need to print the message length :)
Comment 8 Roy Marples (RETIRED) gentoo-dev 2007-05-04 23:53:20 UTC
Anyone care to comment on this patch?
Comment 9 BertrandB 2007-05-05 06:05:54 UTC
(In reply to comment #8)
> Anyone care to comment on this patch?
> 

Please say me how i cant test the patch i'm a gentoo newbie.
Comment 10 Roy Marples (RETIRED) gentoo-dev 2007-05-05 10:59:36 UTC
Download the patch somewhere
Edit /usr/portage/net-misc/dhcpcd/dhcpcd-3.0.17.ebuild
Add this line at the end of the src_unpack function, just before the }

epatch /where/you/put/the/patch

So it looks like this

src_unpack() {
    unpack ${A}
    cd "${S}"

    epatch /where/you/put/the/patch

    # Redefine the location of ntp.drift
    sed -i -e 's,#define NTPDRIFTFILE\t.*,#define NTPDRIFTFILE\t\t\"/var/lib/ntp/ntp.drift\",' \
        pathnames.h || die "sed failed"
}

Then emerge dhcpcd and try again.
Comment 11 BertrandB 2007-05-05 12:38:01 UTC
(In reply to comment #10)
I did :
edit the dhcpd-3.0.17.ebuild as you said
 ebuild /usr/portage/net-misc/dhcpcd/dhcpcd-3.0.17.ebuild digest
 ebuild /usr/portage/net-misc/dhcpcd/dhcpcd-3.0.17.ebuild digest
restart the wifi with /etc/init.d/net.wlan0 restart

and got the same problem
I turn back in dhcpcd-3.0.16 and then it works fine.
Comment 12 Roy Marples (RETIRED) gentoo-dev 2007-05-05 12:43:47 UTC
(In reply to comment #11)
> (In reply to comment #10)
> I did :
> edit the dhcpd-3.0.17.ebuild as you said
>  ebuild /usr/portage/net-misc/dhcpcd/dhcpcd-3.0.17.ebuild digest
>  ebuild /usr/portage/net-misc/dhcpcd/dhcpcd-3.0.17.ebuild digest
> restart the wifi with /etc/init.d/net.wlan0 restart
> 
> and got the same problem
> I turn back in dhcpcd-3.0.16 and then it works fine.

Did you re-emerge it?
Comment 13 BertrandB 2007-05-05 12:52:59 UTC
(In reply to comment #12)
sorry
> >  ebuild /usr/portage/net-misc/dhcpcd/dhcpcd-3.0.17.ebuild merge
> > restart the wifi with /etc/init.d/net.wlan0 restart

> Did you re-emerge it?
> 
I use ebuild merge because emerge made me crasy with KEYWORDS (i'm not at all the king of emerge)
i'd upstream the bug to hostap still
Comment 14 BertrandB 2007-05-05 17:11:09 UTC
 (In reply to comment #10)

I made another test i'd break the emerge of dhcpcd-3.0.17 and suppress the line :
#define BOOTP_MESSAGE_LENTH_MIN = 300 from dhcp.h
make 

and obtained a new dhcpd image. This one work fine. The problem is realy in pading the packet. I didn't try a shorter packet.
Comment 15 BertrandB 2007-05-05 17:27:57 UTC
(In reply to comment #14)
Last test
BOOTP_MESSAGE_LENTH_MIN = 295 -> work fine
BOOTP_MESSAGE_LENTH_MIN = 500 -> work fine
BOOTP_MESSAGE_LENTH_MIN = 299 -> The problem reappear
BOOTP_MESSAGE_LENTH_MIN = 305 work fine

so a wpa_supplicant problem with ~300 bytes packet size ?
Comment 16 Roy Marples (RETIRED) gentoo-dev 2007-05-05 18:43:00 UTC
(In reply to comment #15)
> (In reply to comment #14)
> Last test
> BOOTP_MESSAGE_LENTH_MIN = 295 -> work fine
> BOOTP_MESSAGE_LENTH_MIN = 500 -> work fine
> BOOTP_MESSAGE_LENTH_MIN = 299 -> The problem reappear
> BOOTP_MESSAGE_LENTH_MIN = 305 work fine
> 
> so a wpa_supplicant problem with ~300 bytes packet size ?

Looks like it.

I would take this issue to the upstream mailing lists at http://lists.shmoo.com/mailman/listinfo/hostap

Reference this bug in your email and state the exact problem and that different dhcp message sizes work. It's also very important that you include the fact that you get the "wifi0: TX -encryption failed" message in your report.

I subscribe to that list myself, and it's low volume so don't panic if you don't get an immediate reply.

Re-open this bug if upstream thinks it's a dhcpcd problem.

Thanks