fix iteration over Babel Pad1 TLVs

The Pad1 TLV consists only of the Type field (RFC6126 Section 4.4.1),
thus the check for Pad1 type must be done before the Length field is
consumed, if ever. This change brings tcpdump decoder into line with the
spec and Babel implementation's own TLV iterator.
2 files changed
tree: e6dcd42dcbfba86545a0bee5d1b6bed999007f45
  1. lbl/
  2. missing/
  3. tests/
  4. win32/
  5. .cvsignore
  6. .gitattributes
  7. .gitignore
  8. .travis.yml
  9. aclocal.m4
  10. addrtoname.c
  11. addrtoname.h
  12. af.c
  13. af.h
  14. ah.h
  15. aodv.h
  16. appletalk.h
  17. arcnet.h
  18. atime.awk
  19. atm.h
  20. atmuni31.h
  21. bgp.h
  22. bootp.h
  23. bpf_dump.c
  24. CHANGES
  25. chdlc.h
  26. checksum.c
  27. config.guess
  28. config.h.in
  29. config.sub
  30. configure
  31. configure.in
  32. cpack.c
  33. cpack.h
  34. CREDITS
  35. dccp.h
  36. decnet.h
  37. decode_prefix.h
  38. enc.h
  39. esp.h
  40. ether.h
  41. ethertype.h
  42. extract.h
  43. fddi.h
  44. forces.h
  45. gmpls.c
  46. gmpls.h
  47. gmt2local.c
  48. gmt2local.h
  49. icmp6.h
  50. ieee802_11.h
  51. ieee802_11_radio.h
  52. igrp.h
  53. in_cksum.c
  54. install-sh
  55. INSTALL.txt
  56. interface.h
  57. ip.h
  58. ip6.h
  59. ipfc.h
  60. ipnet.h
  61. ipproto.c
  62. ipproto.h
  63. ipsec_doi.h
  64. ipx.h
  65. isakmp.h
  66. l2tp.h
  67. l2vpn.c
  68. l2vpn.h
  69. lane.h
  70. LICENSE
  71. llc.h
  72. machdep.c
  73. machdep.h
  74. Makefile-devel-adds
  75. Makefile.in
  76. makemib
  77. mib.h
  78. mkdep
  79. mpls.h
  80. mptcp.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-mptcp.c
  171. print-msdp.c
  172. print-msnlb.c
  173. print-netbios.c
  174. print-nfs.c
  175. print-ntp.c
  176. print-null.c
  177. print-olsr.c
  178. print-ospf.c
  179. print-ospf6.c
  180. print-otv.c
  181. print-pflog.c
  182. print-pgm.c
  183. print-pim.c
  184. print-ppi.c
  185. print-ppp.c
  186. print-pppoe.c
  187. print-pptp.c
  188. print-radius.c
  189. print-raw.c
  190. print-rip.c
  191. print-ripng.c
  192. print-rpki-rtr.c
  193. print-rrcp.c
  194. print-rsvp.c
  195. print-rt6.c
  196. print-rx.c
  197. print-sctp.c
  198. print-sflow.c
  199. print-sip.c
  200. print-sl.c
  201. print-sll.c
  202. print-slow.c
  203. print-smb.c
  204. print-snmp.c
  205. print-stp.c
  206. print-sunatm.c
  207. print-sunrpc.c
  208. print-symantec.c
  209. print-syslog.c
  210. print-tcp.c
  211. print-telnet.c
  212. print-tftp.c
  213. print-timed.c
  214. print-tipc.c
  215. print-token.c
  216. print-udld.c
  217. print-udp.c
  218. print-usb.c
  219. print-vjc.c
  220. print-vqp.c
  221. print-vrrp.c
  222. print-vtp.c
  223. print-vxlan.c
  224. print-wb.c
  225. print-zephyr.c
  226. print-zeromq.c
  227. README
  228. Readme.Win32
  229. route6d.h
  230. rpc_auth.h
  231. rpc_msg.h
  232. rx.h
  233. sctpConstants.h
  234. sctpHeader.h
  235. send-ack.awk
  236. setsignal.c
  237. setsignal.h
  238. signature.c
  239. signature.h
  240. slcompress.h
  241. slip.h
  242. sll.h
  243. smb.h
  244. smbutil.c
  245. stime.awk
  246. strcasecmp.c
  247. tcp.h
  248. tcpdump-stdinc.h
  249. tcpdump.1.in
  250. tcpdump.c
  251. telnet.h
  252. tftp.h
  253. timed.h
  254. TODO
  255. token.h
  256. udp.h
  257. util.c
  258. VERSION
  259. vfprintf.c