mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-24 10:33:28 +08:00
juniper: don't do bounds checking for fields in the cookie.
l2info.cookie is not inside the packet - it's a copy of data from the packet, with the copy doing the necessary bounds checking - so we shouldn't use NT_TCHECK or GET macros on it.
This commit is contained in:
parent
57be4eb7ed
commit
707241029c
@ -495,13 +495,13 @@ juniper_ggsn_if_print(netdissect_options *ndo,
|
||||
p+=l2info.header_len;
|
||||
gh = (struct juniper_ggsn_header *)&l2info.cookie;
|
||||
|
||||
ND_TCHECK_SIZE(gh);
|
||||
proto = GET_U_1(gh->proto);
|
||||
/* use EXTRACT_, not GET_ (not packet buffer pointer) */
|
||||
proto = EXTRACT_U_1(gh->proto);
|
||||
if (ndo->ndo_eflag) {
|
||||
ND_PRINT("proto %s (%u), vlan %u: ",
|
||||
tok2str(juniper_protocol_values,"Unknown",proto),
|
||||
proto,
|
||||
GET_BE_U_2(gh->vlan_id));
|
||||
EXTRACT_BE_U_2(gh->vlan_id));
|
||||
}
|
||||
|
||||
switch (proto) {
|
||||
|
Loading…
Reference in New Issue
Block a user