eblot / pybootd

A minimalist bootp/dhcp/pxe and tftp server
Other
106 stars 31 forks source link

Maximum data size and string casting in python3 #14

Open lucabodd opened 5 years ago

lucabodd commented 5 years ago

As you can see on commits, I added in PXE casting from bytes to string that otherwise generates a TypeError on concatenating bytes (in python3 casting to string is not implicit). Fixing TFTP "wrap-around" on short ints, now TFTP can send files up to 16M (till 32 MB as defined by TFTP) but package now requires numpy

eblot commented 5 years ago

Hi Luca,

I did not merge the PR per se but i think I fixed both issues based on your patch files - I do not have a way to test PXE for now, so if you can git it a try.

Thanks.

lucabodd commented 5 years ago

I see..

About the bug on pxed, I don’t know, I was getting a TypeError concatenating string to bytes… About the tftp I also tried to set hH to buffer fmt but was not working … if you tested and it’s working it’s surely a better fix rather than import all numpy

Anyway, glad to have helped you… Thanks a lot

Luca

On 19 Sep 2019, at 10:17, Emmanuel Blot notifications@github.com wrote:

Hi Luca,

I did not merge the PR per se but i think I fixed both issues based on your patch files - I do not have a way to test PXE for now, so if you can git it a try.

Thanks.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/eblot/pybootd/pull/14?email_source=notifications&email_token=AFOGSIAB4LYL52HRBFNWW43QKMYSVA5CNFSM4IX5I462YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7CUJPQ#issuecomment-533021886, or mute the thread https://github.com/notifications/unsubscribe-auth/AFOGSIC647MHBXMJU46ELPTQKMYSVANCNFSM4IX5I46Q.

eblot commented 5 years ago

On 19 Sep 2019, at 11:41, Luca Bodini wrote:

I see..

About the bug on pxed, I don’t know, I was getting a TypeError concatenating string to bytes…

I think it was because of the first empty string (‘’ instead of b’’)

About the tftp I also tried to set hH to buffer fmt but was not working … if you tested and it’s working it’s surely a better fix rather than import all numpy

It is two fold:

Let me know if you can test all this.

Thanks Emmanuel.