2012-01-03 15:53:20 +01:00
|
|
|
Index: icmp6.h
|
|
|
|
===================================================================
|
|
|
|
--- icmp6.h.orig
|
2007-01-04 17:28:36 +01:00
|
|
|
+++ icmp6.h
|
2012-01-03 15:53:20 +01:00
|
|
|
@@ -404,7 +404,11 @@ struct icmp6_router_renum { /* router re
|
2007-01-04 17:28:36 +01:00
|
|
|
u_int8_t rr_segnum;
|
|
|
|
u_int8_t rr_flags;
|
|
|
|
u_int16_t rr_maxdelay;
|
|
|
|
+ union {
|
|
|
|
+ u_int8_t rr_reserved8[4];
|
|
|
|
+ u_int16_t rr_reserved16[2];
|
2012-01-03 15:53:20 +01:00
|
|
|
u_int32_t rr_reserved;
|
2007-01-04 17:28:36 +01:00
|
|
|
+ };
|
|
|
|
};
|
|
|
|
#define ICMP6_RR_FLAGS_TEST 0x80
|
|
|
|
#define ICMP6_RR_FLAGS_REQRESULT 0x40
|
2012-01-03 15:53:20 +01:00
|
|
|
Index: print-icmp.c
|
|
|
|
===================================================================
|
|
|
|
--- print-icmp.c.orig
|
2007-01-04 17:28:36 +01:00
|
|
|
+++ print-icmp.c
|
2012-01-03 15:53:20 +01:00
|
|
|
@@ -47,6 +47,12 @@ static const char rcsid[] _U_ =
|
2007-01-04 17:28:36 +01:00
|
|
|
* Per RFC 792, September 1981.
|
|
|
|
*/
|
|
|
|
|
|
|
|
+/* rfc1191 */
|
|
|
|
+struct mtu_discovery {
|
|
|
|
+ u_int16_t unused;
|
|
|
|
+ u_int16_t nexthopmtu;
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
/*
|
|
|
|
* Structure of an icmp header.
|
|
|
|
*/
|
2012-01-03 15:53:20 +01:00
|
|
|
@@ -61,8 +67,12 @@ struct icmp {
|
2007-01-04 17:28:36 +01:00
|
|
|
u_int16_t icd_id;
|
|
|
|
u_int16_t icd_seq;
|
|
|
|
} ih_idseq;
|
|
|
|
+ union {
|
2012-01-03 15:53:20 +01:00
|
|
|
u_int32_t ih_void;
|
2007-01-04 17:28:36 +01:00
|
|
|
+ struct mtu_discovery ih_mtu_discovery;
|
|
|
|
+ };
|
2007-07-27 02:12:04 +02:00
|
|
|
} icmp_hun;
|
|
|
|
+#define icmp_mtu_discovery icmp_hun.ih_mtu_discovery
|
|
|
|
#define icmp_pptr icmp_hun.ih_pptr
|
|
|
|
#define icmp_gwaddr icmp_hun.ih_gwaddr
|
2007-01-04 17:28:36 +01:00
|
|
|
#define icmp_id icmp_hun.ih_idseq.icd_id
|
2012-01-03 15:53:20 +01:00
|
|
|
@@ -243,12 +253,6 @@ static struct tok type2str[] = {
|
2007-01-04 17:28:36 +01:00
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
-/* rfc1191 */
|
|
|
|
-struct mtu_discovery {
|
|
|
|
- u_int16_t unused;
|
|
|
|
- u_int16_t nexthopmtu;
|
|
|
|
-};
|
|
|
|
-
|
|
|
|
/* rfc1256 */
|
|
|
|
struct ih_rdiscovery {
|
|
|
|
u_int8_t ird_addrnum;
|
2012-01-03 15:53:20 +01:00
|
|
|
@@ -413,7 +417,7 @@ icmp_print(const u_char *bp, u_int plen,
|
2007-01-04 17:28:36 +01:00
|
|
|
case ICMP_UNREACH_NEEDFRAG:
|
|
|
|
{
|
|
|
|
register const struct mtu_discovery *mp;
|
2009-01-19 02:20:11 +01:00
|
|
|
- mp = (struct mtu_discovery *)(u_char *)&dp->icmp_void;
|
2007-01-04 17:28:36 +01:00
|
|
|
+ mp = &dp->icmp_mtu_discovery;
|
|
|
|
mtu = EXTRACT_16BITS(&mp->nexthopmtu);
|
|
|
|
if (mtu) {
|
|
|
|
(void)snprintf(buf, sizeof(buf),
|
2012-01-03 15:53:20 +01:00
|
|
|
Index: print-icmp6.c
|
|
|
|
===================================================================
|
|
|
|
--- print-icmp6.c.orig
|
2007-01-04 17:28:36 +01:00
|
|
|
+++ print-icmp6.c
|
2012-01-03 15:53:20 +01:00
|
|
|
@@ -1279,7 +1279,7 @@ icmp6_rrenum_print(const u_char *bp, con
|
2007-01-04 17:28:36 +01:00
|
|
|
printf("seg=%u,", rr6->rr_segnum);
|
2009-01-19 02:20:11 +01:00
|
|
|
printf("maxdelay=%u", EXTRACT_16BITS(&rr6->rr_maxdelay));
|
2007-01-04 17:28:36 +01:00
|
|
|
if (rr6->rr_reserved)
|
2009-01-19 02:20:11 +01:00
|
|
|
- printf("rsvd=0x%x", EXTRACT_32BITS(&rr6->rr_reserved));
|
2007-01-04 17:28:36 +01:00
|
|
|
+ printf("rsvd=0x%x", EXTRACT_16BITS(&rr6->rr_reserved16[0]));
|
|
|
|
/*[*/
|
|
|
|
printf("]");
|
|
|
|
#undef F
|
2012-01-03 15:53:20 +01:00
|
|
|
Index: print-timed.c
|
|
|
|
===================================================================
|
|
|
|
--- print-timed.c.orig
|
2007-01-04 17:28:36 +01:00
|
|
|
+++ print-timed.c
|
2012-01-03 15:53:20 +01:00
|
|
|
@@ -86,8 +86,8 @@ timed_print(register const u_char *bp)
|
2007-01-04 17:28:36 +01:00
|
|
|
fputs(" [|timed]", stdout);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
- sec = EXTRACT_32BITS(&tsp->tsp_time.tv_sec);
|
|
|
|
- usec = EXTRACT_32BITS(&tsp->tsp_time.tv_usec);
|
|
|
|
+ sec = EXTRACT_32BITS(&tsp->tsp_time.tv_sec32[0]);
|
|
|
|
+ usec = EXTRACT_32BITS(&tsp->tsp_time.tv_usec32[0]);
|
|
|
|
if (usec < 0)
|
|
|
|
/* corrupt, skip the rest of the packet */
|
|
|
|
return;
|
2012-01-03 15:53:20 +01:00
|
|
|
Index: timed.h
|
|
|
|
===================================================================
|
|
|
|
--- timed.h.orig
|
2007-01-04 17:28:36 +01:00
|
|
|
+++ timed.h
|
2012-01-03 15:53:20 +01:00
|
|
|
@@ -54,7 +54,16 @@ struct tsp {
|
2007-01-04 17:28:36 +01:00
|
|
|
u_int8_t tsp_vers;
|
|
|
|
u_int16_t tsp_seq;
|
|
|
|
union {
|
2009-01-19 02:20:11 +01:00
|
|
|
- struct tsp_timeval tspu_time;
|
2007-01-04 17:28:36 +01:00
|
|
|
+ struct {
|
|
|
|
+ union {
|
|
|
|
+ int tv_sec32[2];
|
|
|
|
+ long tv_sec;
|
|
|
|
+ };
|
|
|
|
+ union {
|
|
|
|
+ int tv_usec32[2];
|
|
|
|
+ long tv_usec;
|
2009-01-19 02:20:11 +01:00
|
|
|
+ };
|
2007-01-04 17:28:36 +01:00
|
|
|
+ } tspu_time;
|
|
|
|
int8_t tspu_hopcnt;
|
|
|
|
} tsp_u;
|
|
|
|
int8_t tsp_name[256];
|