Fix handling of V3 and V4 BPDUs.

Make the offsets and lengths 32-bit, so that they don't overflow.

Pull the handling of V4 fields into its own routine.  Call it only if
the packet's been identified as a V4 packet and the length is sane; call
the routine to handle V3 fields before we do any V4 work.
1 file changed
tree: 84620844d5f1102b333e9673e52b72d09109a4aa
  1. lbl/
  2. missing/
  3. tests/
  4. win32/
  5. .cvsignore
  6. .gitattributes
  7. .gitignore
  8. .travis.yml
  9. acconfig.h
  10. aclocal.m4
  11. addrtoname.c
  12. addrtoname.h
  13. af.c
  14. af.h
  15. ah.h
  16. aodv.h
  17. appletalk.h
  18. arcnet.h
  19. atime.awk
  20. atm.h
  21. atmuni31.h
  22. bgp.h
  23. bootp.h
  24. bpf_dump.c
  25. CHANGES
  26. chdlc.h
  27. checksum.c
  28. config.guess
  29. config.h.in
  30. config.sub
  31. configure
  32. configure.in
  33. cpack.c
  34. cpack.h
  35. CREDITS
  36. dccp.h
  37. decnet.h
  38. decode_prefix.h
  39. enc.h
  40. esp.h
  41. ether.h
  42. ethertype.h
  43. extract.h
  44. fddi.h
  45. forces.h
  46. gmpls.c
  47. gmpls.h
  48. gmt2local.c
  49. gmt2local.h
  50. icmp6.h
  51. ieee802_11.h
  52. ieee802_11_radio.h
  53. igrp.h
  54. in_cksum.c
  55. install-sh
  56. INSTALL.txt
  57. interface.h
  58. ip.h
  59. ip6.h
  60. ipfc.h
  61. ipnet.h
  62. ipproto.c
  63. ipproto.h
  64. ipsec_doi.h
  65. ipx.h
  66. isakmp.h
  67. l2tp.h
  68. l2vpn.c
  69. l2vpn.h
  70. lane.h
  71. LICENSE
  72. llc.h
  73. machdep.c
  74. machdep.h
  75. Makefile-devel-adds
  76. Makefile.in
  77. makemib
  78. mib.h
  79. mkdep
  80. mpls.h
  81. nameser.h
  82. netbios.h
  83. netdissect.h
  84. nfs.h
  85. nfsfh.h
  86. nlpid.c
  87. nlpid.h
  88. ntp.h
  89. oakley.h
  90. ospf.h
  91. ospf6.h
  92. oui.c
  93. oui.h
  94. packetdat.awk
  95. parsenfsfh.c
  96. pcap-missing.h
  97. pcap_dump_ftell.c
  98. PLATFORMS
  99. pmap_prot.h
  100. ppi.h
  101. ppp.h
  102. print-802_11.c
  103. print-802_15_4.c
  104. print-ah.c
  105. print-aodv.c
  106. print-ap1394.c
  107. print-arcnet.c
  108. print-arp.c
  109. print-ascii.c
  110. print-atalk.c
  111. print-atm.c
  112. print-babel.c
  113. print-beep.c
  114. print-bfd.c
  115. print-bgp.c
  116. print-bootp.c
  117. print-bt.c
  118. print-carp.c
  119. print-cdp.c
  120. print-cfm.c
  121. print-chdlc.c
  122. print-cip.c
  123. print-cnfp.c
  124. print-dccp.c
  125. print-decnet.c
  126. print-dhcp6.c
  127. print-domain.c
  128. print-dtp.c
  129. print-dvmrp.c
  130. print-eap.c
  131. print-egp.c
  132. print-eigrp.c
  133. print-enc.c
  134. print-esp.c
  135. print-ether.c
  136. print-fddi.c
  137. print-forces.c
  138. print-fr.c
  139. print-frag6.c
  140. print-gre.c
  141. print-hsrp.c
  142. print-icmp.c
  143. print-icmp6.c
  144. print-igmp.c
  145. print-igrp.c
  146. print-ip.c
  147. print-ip6.c
  148. print-ip6opts.c
  149. print-ipcomp.c
  150. print-ipfc.c
  151. print-ipnet.c
  152. print-ipx.c
  153. print-isakmp.c
  154. print-isoclns.c
  155. print-juniper.c
  156. print-krb.c
  157. print-l2tp.c
  158. print-lane.c
  159. print-ldp.c
  160. print-llc.c
  161. print-lldp.c
  162. print-lmp.c
  163. print-lspping.c
  164. print-lwapp.c
  165. print-lwres.c
  166. print-mobile.c
  167. print-mobility.c
  168. print-mpcp.c
  169. print-mpls.c
  170. print-msdp.c
  171. print-msnlb.c
  172. print-netbios.c
  173. print-nfs.c
  174. print-ntp.c
  175. print-null.c
  176. print-olsr.c
  177. print-ospf.c
  178. print-ospf6.c
  179. print-otv.c
  180. print-pflog.c
  181. print-pgm.c
  182. print-pim.c
  183. print-ppi.c
  184. print-ppp.c
  185. print-pppoe.c
  186. print-pptp.c
  187. print-radius.c
  188. print-raw.c
  189. print-rip.c
  190. print-ripng.c
  191. print-rpki-rtr.c
  192. print-rrcp.c
  193. print-rsvp.c
  194. print-rt6.c
  195. print-rx.c
  196. print-sctp.c
  197. print-sflow.c
  198. print-sip.c
  199. print-sl.c
  200. print-sll.c
  201. print-slow.c
  202. print-smb.c
  203. print-snmp.c
  204. print-stp.c
  205. print-sunatm.c
  206. print-sunrpc.c
  207. print-symantec.c
  208. print-syslog.c
  209. print-tcp.c
  210. print-telnet.c
  211. print-tftp.c
  212. print-timed.c
  213. print-tipc.c
  214. print-token.c
  215. print-udld.c
  216. print-udp.c
  217. print-usb.c
  218. print-vjc.c
  219. print-vqp.c
  220. print-vrrp.c
  221. print-vtp.c
  222. print-vxlan.c
  223. print-wb.c
  224. print-zephyr.c
  225. print-zeromq.c
  226. README
  227. Readme.Win32
  228. route6d.h
  229. rpc_auth.h
  230. rpc_msg.h
  231. rx.h
  232. sctpConstants.h
  233. sctpHeader.h
  234. send-ack.awk
  235. setsignal.c
  236. setsignal.h
  237. signature.c
  238. signature.h
  239. slcompress.h
  240. slip.h
  241. sll.h
  242. smb.h
  243. smbutil.c
  244. stime.awk
  245. strcasecmp.c
  246. tcp.h
  247. tcpdump-stdinc.h
  248. tcpdump.1.in
  249. tcpdump.c
  250. telnet.h
  251. tftp.h
  252. timed.h
  253. TODO
  254. token.h
  255. udp.h
  256. util.c
  257. VERSION
  258. vfprintf.c