Hello,
small patch for packet-ipsec and util.c.
thanks.
K.Sugyo
*** packet-ipsec.c.orig Thu Aug 30 11:23:17 2001
--- packet-ipsec.c Tue Nov 6 11:03:03 2001
***************
*** 159,165 ****
ipprotostr(ah.ah_nxt), ah.ah_nxt);
proto_tree_add_text(ah_tree, tvb,
offsetof(struct newah, ah_len), 1,
! "Length: %u", ah.ah_len << 2);
proto_tree_add_uint(ah_tree, hf_ah_spi, tvb,
offsetof(struct newah, ah_spi), 4,
(guint32)ntohl(ah.ah_spi));
--- 159,165 ----
ipprotostr(ah.ah_nxt), ah.ah_nxt);
proto_tree_add_text(ah_tree, tvb,
offsetof(struct newah, ah_len), 1,
! "Length: %u", (ah.ah_len + 2) << 2);
proto_tree_add_uint(ah_tree, hf_ah_spi, tvb,
offsetof(struct newah, ah_spi), 4,
(guint32)ntohl(ah.ah_spi));
*** util.c.orig Sat Oct 27 03:28:17 2001
--- util.c Tue Nov 6 11:08:28 2001
***************
*** 491,497 ****
next:
#ifdef HAVE_SA_LEN
! ifr = (struct ifreq *) ((char *) ifr + ifr->ifr_addr.sa_len + IFNAMSIZ);
#else
ifr = (struct ifreq *) ((char *) ifr + sizeof(struct ifreq));
#endif
--- 491,500 ----
next:
#ifdef HAVE_SA_LEN
! ifr = (struct ifreq *) ((char *) ifr +
! (ifr->ifr_addr.sa_len > sizeof(ifr->ifr_addr) ?
! ifr->ifr_addr.sa_len : sizeof(ifr->ifr_addr)) +
! IFNAMSIZ);
#else
ifr = (struct ifreq *) ((char *) ifr + sizeof(struct ifreq));
#endif