Skip to content

Commit b38e765

Browse files
committed
From Francois-Xavier Le Bail: suport for the DHCP Classless Static Route
option (RFC 3442). Just modify the "len" variable as we parse an option - no need for a separate variable representing the amount of data left (I suspect that's why the wrong variable appears to have been used in the "trailing data length" message; I'd expect that message to indicate how much *extra* data there was in the option, not how much *total* data there was in the option). Add checks for too-short options in some cases where they were missing. In the check for the Client FQDN option, skip past what data there is in the option if it's too short, so it doesn't show up as extra data in the option. For the Agent Circuit option, for each suboption: check to make sure the suboption length doesn't go past what's left in the option; don't reject options with an option type or length of 0 (neither are forbidden by RFC 3046, and, in fact, RFC 3046 says "a sub-option length may be zero"); use fn_printn() to print the Agent Circuit ID suboption, rather than doing the equivalent ourselves with a safeputchar() loop.
1 parent 79c12ae commit b38e765

File tree

2 files changed

+162
-74
lines changed

2 files changed

+162
-74
lines changed

bootp.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* @(#) $Header: /tcpdump/master/tcpdump/bootp.h,v 1.15.4.1 2007-01-29 20:56:00 guy Exp $ (LBL) */
1+
/* @(#) $Header: /tcpdump/master/tcpdump/bootp.h,v 1.15.4.2 2007-07-24 17:29:43 guy Exp $ (LBL) */
22
/*
33
* Bootstrap Protocol (BOOTP). RFC951 and RFC1048.
44
*
@@ -161,6 +161,8 @@ struct bootp {
161161
#define TAG_NS_SEARCH ((u_int8_t) 117)
162162
/* RFC 3011 */
163163
#define TAG_IP4_SUBNET_SELECT ((u_int8_t) 118)
164+
/* RFC 3442 */
165+
#define TAG_CLASSLESS_STATIC_RT ((u_int8_t) 121)
164166
/* ftp://ftp.isi.edu/.../assignments/bootp-dhcp-extensions */
165167
#define TAG_USER_CLASS ((u_int8_t) 77)
166168
#define TAG_SLP_NAMING_AUTH ((u_int8_t) 80)

0 commit comments

Comments
 (0)