aboutsummaryrefslogtreecommitdiff
path: root/net/bootp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bootp.c')
-rw-r--r--net/bootp.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/net/bootp.c b/net/bootp.c
index 9e324769d..b1b7b0c1e 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -68,8 +68,35 @@ static char *dhcpmsg2str(int type)
#if defined(CONFIG_BOOTP_VENDOREX)
extern u8 *dhcp_vendorex_prep (u8 *e); /*rtn new e after add own opts. */
extern u8 *dhcp_vendorex_proc (u8 *e); /*rtn next e if mine,else NULL */
-#endif
+u8 *__dhcp_vendorex_prep(u8 *e)
+{
+ char *ptr;
+
+ /* DHCP vendor-class-identifier = 60 */
+ if ((ptr = getenv("dhcp_vendor-class-identifier"))) {
+ *e++ = 60;
+ *e++ = strlen(ptr);
+ while (*ptr)
+ *e++ = *ptr++;
+ }
+ /* DHCP_CLIENT_IDENTIFIER = 61 */
+ if ((ptr = getenv("dhcp_client_id"))) {
+ *e++ = 61;
+ *e++ = strlen(ptr);
+ while (*ptr)
+ *e++ = *ptr++;
+ }
+ return e;
+}
+
+u8 *__dhcp_vendorex_proc(u8 *popt)
+{
+ return NULL;
+}
+u8 *dhcp_vendorex_prep(u8 *e) __attribute__((weak, alias("__dhcp_vendorex_prep")));
+u8 *dhcp_vendorex_proc(u8 *e) __attribute__((weak, alias("__dhcp_vendorex_proc")));
+#endif
#endif
static int BootpCheckPkt(uchar *pkt, unsigned dest, unsigned src, unsigned len)