[syslinux] Baking Cookies

Santillanes, Russel Russel.Santillanes at gs.com
Thu Nov 21 14:49:45 PST 2013

FYI -- Did some more digging. These two changes lets SENDCOOKIES behavior work as desired/intended.

--- syslinux-6.02/com32/include/syslinux/pxe_api.h      2013-10-13 13:59:03.000000000 -0400
+++ syslinux-6.02-changed/com32/include/syslinux/pxe_api.h      2013-11-21 17:00:57.379519000 -0500
@@ -589,7 +589,7 @@
 void __weak unload_pxe(uint16_t flags);
 uint32_t __weak dns_resolv(const char *);

-uint32_t __weak SendCookies;
+extern uint32_t SendCookies;
 void __weak http_bake_cookies(void);

 #endif /* _SYSLINUX_PXE_API_H */

--- syslinux-6.02/core/fs/pxe/http.c    2013-10-13 13:59:03.000000000 -0400
+++ syslinux-6.02-changed/core/fs/pxe/http.c    2013-11-21 17:18:40.026705000 -0500
@@ -121,7 +121,7 @@
     return n;

-void http_bake_cookies(void)
+__export void http_bake_cookies(void)
     if (cookie_buf)

-----Original Message-----
From: Syslinux [mailto:syslinux-bounces at zytor.com] On Behalf Of Santillanes, Russel [Tech]
Sent: Thursday, November 21, 2013 12:42 AM
To: 'For discussion of Syslinux and tftp-hpa'
Cc: 'H. Peter Anvin'
Subject: Re: [syslinux] Baking Cookies

Hmm... well adding the __export stopped the "undefined symbol" error from showing up when I add "SENDCOOKIES" in the config, however I'm still not seeing any cookies being sent to my webserver.

Any ideas on how to further debug? (if you want to send me the debug compile options privately that's okay too)

-----Original Message-----
From: H. Peter Anvin [mailto:hpa at zytor.com] 
Sent: Wednesday, November 20, 2013 5:55 PM
To: For discussion of Syslinux and tftp-hpa
Subject: Re: [syslinux] Baking Cookies

On 11/20/2013 01:11 PM, Santillanes, Russel wrote:
> I think my oven is broken, but maybe I have the recipe wrong.
> I've been trying to utilize the lwIP stack and dmi information to avoid iPXE use. I can do a SYSAPPEND 0x00080 and it shows up in /proc/cmdline after booting the kernel, but tcpdump is not revealing the cookies as described during HTTP calls in the documentation.
> Trying the magic "SENDCOOKIES" parameter outside of an inline SYSAPPEND  call just gives me an "Error: An undefined symbol was referenced"
> I'm using 6.02 and lpxelinux.0; Loading lpxelinux.0 over tftp, kernel/initrd over http (see below)

Hmm... I wonder if we are missing an __export in http.c:

__export void http_bake_cookies(void)

If you have the ability to rebuild Syslinux, could you try adding the
above and see if it helps?


Syslinux mailing list
Submissions to Syslinux at zytor.com
Unsubscribe or set options at:
Please do not send private replies to mailing list traffic.

More information about the Syslinux mailing list