Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions print-mobility.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,18 @@ mobility_print(netdissect_options *ndo,
const struct ip6_mobility *mh;
const u_char *ep;
unsigned mhlen, hlen;
uint8_t type;
uint8_t pproto, type;

ndo->ndo_protocol = "mobility";
nd_print_protocol(ndo);
ND_PRINT(": ");
mh = (const struct ip6_mobility *)bp;

pproto = GET_U_1(mh->ip6m_pproto);
if (pproto != IPPROTO_NONE)
ND_PRINT("(payload protocol %u should be %u) ", pproto,
IPPROTO_NONE);

/* 'ep' points to the end of available data. */
ep = ndo->ndo_snapend;

Expand Down Expand Up @@ -326,7 +331,7 @@ mobility_print(netdissect_options *ndo,

return(mhlen);

trunc:
trunc:
nd_print_trunc(ndo);
return(-1);
}
4 changes: 2 additions & 2 deletions tests/cve2015-0261-ipv6.out
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1 2002-12-31 13:55:31.300000 IP6 [header+payload length 26510 > length 185] (invalid) (class 0x76, flowlabel 0x76767, hlim 103, next-header Mobility (135), payload length 26470) 6767:6767:6767:6767:6767:6767:6767:6767 > 6767:6767:6767:6767:6767:6767:6767:6705: mobility: BU seq#=26471 HL lifetime=105884(type-0x67: len=103) [|mobility]
2 2003-03-06 15:21:11.300000 IP6 [header+payload length 26510 > length 185] (invalid) (class 0x76, flowlabel 0x76767, hlim 103, next-header Mobility (135), payload length 26470) 6767:6767:6767:6767:6767:6767:6767:6767 > 6767:6767:4f67:6767:6767:6767:6767:6767: mobility: (header length 8 is too small for type 6) [|mobility]
1 2002-12-31 13:55:31.300000 IP6 [header+payload length 26510 > length 185] (invalid) (class 0x76, flowlabel 0x76767, hlim 103, next-header Mobility (135), payload length 26470) 6767:6767:6767:6767:6767:6767:6767:6767 > 6767:6767:6767:6767:6767:6767:6767:6705: mobility: (payload protocol 255 should be 59) BU seq#=26471 HL lifetime=105884(type-0x67: len=103) [|mobility]
2 2003-03-06 15:21:11.300000 IP6 [header+payload length 26510 > length 185] (invalid) (class 0x76, flowlabel 0x76767, hlim 103, next-header Mobility (135), payload length 26470) 6767:6767:6767:6767:6767:6767:6767:6767 > 6767:6767:4f67:6767:6767:6767:6767:6767: mobility: (payload protocol 0 should be 59) (header length 8 is too small for type 6) [|mobility]
2 changes: 1 addition & 1 deletion tests/ipv6-mobility-header-oobr.out
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1 1995-08-15 05:27:12.999999 IP6 3030:3030:3030:3030:3030:3030:3030:3030 > 3030:3030:3030:3030:3030:3030:3030:3030: mobility: BA status=48 [|mobility]
1 1995-08-15 05:27:12.999999 IP6 3030:3030:3030:3030:3030:3030:3030:3030 > 3030:3030:3030:3030:3030:3030:3030:3030: mobility: (payload protocol 48 should be 59) BA status=48 [|mobility]
4 changes: 2 additions & 2 deletions tests/mobility_opt_asan.out
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1 1975-04-27 07:53:17.131862 IP6 (class 0x50, flowlabel 0x00004, hlim 0, next-header Mobile IP (old) (62), payload length 7168) d400:7fa1:0:400::6238:2949 > 9675:86dd:7300:2c:1c7f:ffff:ffc3:b2a1: mobility: BU seq#=116 A lifetime=15872(pad1) [|mobility]
2 2017-12-27 14:32:13.999999 IP6 (class 0x50, flowlabel 0x00004, hlim 0, next-header Mobile IP (old) (62), payload length 7168) d4c3:b2a1:200:400::6238:2949 > 9675:86dd:73f0:2c:1c7f:ffff:ebc3:b291: mobility: BU seq#=116 A lifetime=15360 [|mobility]
1 1975-04-27 07:53:17.131862 IP6 (class 0x50, flowlabel 0x00004, hlim 0, next-header Mobile IP (old) (62), payload length 7168) d400:7fa1:0:400::6238:2949 > 9675:86dd:7300:2c:1c7f:ffff:ffc3:b2a1: mobility: (payload protocol 2 should be 59) BU seq#=116 A lifetime=15872(pad1) [|mobility]
2 2017-12-27 14:32:13.999999 IP6 (class 0x50, flowlabel 0x00004, hlim 0, next-header Mobile IP (old) (62), payload length 7168) d4c3:b2a1:200:400::6238:2949 > 9675:86dd:73f0:2c:1c7f:ffff:ebc3:b291: mobility: (payload protocol 2 should be 59) BU seq#=116 A lifetime=15360 [|mobility]
2 changes: 1 addition & 1 deletion tests/mobility_opt_asan_2.out
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1 1975-06-23 00:41:36.999999 IP6 (class 0x50, flowlabel 0x0002c, hlim 0, next-header Mobile IP (old) (62), payload length 7168) ff:7f0f:40:0:ee00:0:b658:5203 > 205:20:1:b00:0:2200:af01:e000: mobility: BRR(type-0x06: len=0) [|mobility]
1 1975-06-23 00:41:36.999999 IP6 (class 0x50, flowlabel 0x0002c, hlim 0, next-header Mobile IP (old) (62), payload length 7168) ff:7f0f:40:0:ee00:0:b658:5203 > 205:20:1:b00:0:2200:af01:e000: mobility: (payload protocol 6 should be 59) BRR(type-0x06: len=0) [|mobility]
4 changes: 2 additions & 2 deletions tests/mobility_opt_asan_3.out
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1 1975-04-27 07:53:17.131862 IP6 (class 0x50, flowlabel 0x00004, hlim 0, next-header Mobile IP (old) (62), payload length 7168) d400:7fa1:200:400::6238:2949 > 9675:86dd:7300:2c:1c7f:ffff:ffc3:b2a1: mobility: CoT nonce id=0x74 Care-of Init Cookie=80570f80:00000004 [|mobility]
2 2017-12-27 14:32:13.999999 IP6 (class 0x50, flowlabel 0x00004, hlim 0, next-header Mobile IP (old) (62), payload length 7168) ffc3:b2a1:200:400::6238:2949 > 9675:86dd:73f0:2c:1c7f:ffff:ebc3:b2a1: mobility: BU seq#=39837 lifetime=261452 [|mobility]
1 1975-04-27 07:53:17.131862 IP6 (class 0x50, flowlabel 0x00004, hlim 0, next-header Mobile IP (old) (62), payload length 7168) d400:7fa1:200:400::6238:2949 > 9675:86dd:7300:2c:1c7f:ffff:ffc3:b2a1: mobility: (payload protocol 2 should be 59) CoT nonce id=0x74 Care-of Init Cookie=80570f80:00000004 [|mobility]
2 2017-12-27 14:32:13.999999 IP6 (class 0x50, flowlabel 0x00004, hlim 0, next-header Mobile IP (old) (62), payload length 7168) ffc3:b2a1:200:400::6238:2949 > 9675:86dd:73f0:2c:1c7f:ffff:ebc3:b2a1: mobility: (payload protocol 2 should be 59) BU seq#=39837 lifetime=261452 [|mobility]
2 changes: 1 addition & 1 deletion tests/mobility_opt_asan_4.out
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1 2018-01-12 12:49:44.999999 IP6 (class 0x50, flowlabel 0x00004, hlim 237, next-header Mobile IP (old) (62), payload length 7168) d3c3:b2a9:200:400::6238:2949 > 9675:86dd:7300:2c:1c7f:ffff:ffc3:b2a1: mobility: BU seq#=116 A lifetime=15360(pad1)(pad1)(type-0x3c: len=19)(ni: ho=0x0400 co=0x0012) [|mobility]
1 2018-01-12 12:49:44.999999 IP6 (class 0x50, flowlabel 0x00004, hlim 237, next-header Mobile IP (old) (62), payload length 7168) d3c3:b2a9:200:400::6238:2949 > 9675:86dd:7300:2c:1c7f:ffff:ffc3:b2a1: mobility: (payload protocol 2 should be 59) BU seq#=116 A lifetime=15360(pad1)(pad1)(type-0x3c: len=19)(ni: ho=0x0400 co=0x0012) [|mobility]
2 changes: 1 addition & 1 deletion tests/mobility_opt_asan_5.out
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1 1975-06-23 00:41:36.999999 IP6 (class 0x50, flowlabel 0x0002c, hlim 0, next-header Mobile IP (old) (62), payload length 7168) ff:7f0f:40:0:ee00:0:b658:5203 > 205:20:1:b00:0:2200:af01:e000: mobility: BRR(type-0x06: len=0) [|mobility]
1 1975-06-23 00:41:36.999999 IP6 (class 0x50, flowlabel 0x0002c, hlim 0, next-header Mobile IP (old) (62), payload length 7168) ff:7f0f:40:0:ee00:0:b658:5203 > 205:20:1:b00:0:2200:af01:e000: mobility: (payload protocol 6 should be 59) BRR(type-0x06: len=0) [|mobility]
4 changes: 2 additions & 2 deletions tests/mobility_opt_asan_6.out
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1 1975-04-27 07:53:17.131862 IP6 (class 0x50, flowlabel 0x00004, hlim 0, next-header Mobile IP (old) (62), payload length 7168) d400:7fa1:0:400::6238:2949 > 9675:86dd:7300:2c:1c7f:ffff:ffc3:b2a1: mobility: BU seq#=116 A lifetime=15872(pad1) [|mobility]
2 2017-12-27 14:32:13.999999 IP6 (class 0x50, flowlabel 0x00004, hlim 0, next-header Mobile IP (old) (62), payload length 7168) d4c3:b2a1:200:400::6238:2949 > 9675:86dd:73f0:2c:1c7f:ffff:ebc3:b291: mobility: BU seq#=116 A lifetime=15360 [|mobility]
1 1975-04-27 07:53:17.131862 IP6 (class 0x50, flowlabel 0x00004, hlim 0, next-header Mobile IP (old) (62), payload length 7168) d400:7fa1:0:400::6238:2949 > 9675:86dd:7300:2c:1c7f:ffff:ffc3:b2a1: mobility: (payload protocol 2 should be 59) BU seq#=116 A lifetime=15872(pad1) [|mobility]
2 2017-12-27 14:32:13.999999 IP6 (class 0x50, flowlabel 0x00004, hlim 0, next-header Mobile IP (old) (62), payload length 7168) d4c3:b2a1:200:400::6238:2949 > 9675:86dd:73f0:2c:1c7f:ffff:ebc3:b291: mobility: (payload protocol 2 should be 59) BU seq#=116 A lifetime=15360 [|mobility]
4 changes: 2 additions & 2 deletions tests/mobility_opt_asan_7.out
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1 1975-04-27 07:53:17.131862 IP6 (class 0x50, flowlabel 0x00004, hlim 0, next-header Mobile IP (old) (62), payload length 7168) d400:7fa1:200:400::6238:2949 > 9675:86dd:7300:2c:1c7f:ffff:ffc3:b2a1: mobility: CoT nonce id=0x74 Care-of Init Cookie=80570f80:00000004 [|mobility]
2 2017-12-27 14:32:13.999999 IP6 (class 0x50, flowlabel 0x00004, hlim 0, next-header Mobile IP (old) (62), payload length 7168) ffc3:b2a1:200:400::6238:2949 > 9675:86dd:73f0:2c:1c7f:ffff:ebc3:b2a1: mobility: BU seq#=39837 lifetime=261452 [|mobility]
1 1975-04-27 07:53:17.131862 IP6 (class 0x50, flowlabel 0x00004, hlim 0, next-header Mobile IP (old) (62), payload length 7168) d400:7fa1:200:400::6238:2949 > 9675:86dd:7300:2c:1c7f:ffff:ffc3:b2a1: mobility: (payload protocol 2 should be 59) CoT nonce id=0x74 Care-of Init Cookie=80570f80:00000004 [|mobility]
2 2017-12-27 14:32:13.999999 IP6 (class 0x50, flowlabel 0x00004, hlim 0, next-header Mobile IP (old) (62), payload length 7168) ffc3:b2a1:200:400::6238:2949 > 9675:86dd:73f0:2c:1c7f:ffff:ebc3:b2a1: mobility: (payload protocol 2 should be 59) BU seq#=39837 lifetime=261452 [|mobility]
2 changes: 1 addition & 1 deletion tests/mobility_opt_asan_8.out
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1 2018-01-12 12:49:44.999999 IP6 (class 0x50, flowlabel 0x00004, hlim 237, next-header Mobile IP (old) (62), payload length 7168) d3c3:b2a9:200:400::6238:2949 > 9675:86dd:7300:2c:1c7f:ffff:ffc3:b2a1: mobility: BU seq#=116 A lifetime=15360(pad1)(pad1)(type-0x3c: len=19)(ni: ho=0x0400 co=0x0012) [|mobility]
1 2018-01-12 12:49:44.999999 IP6 (class 0x50, flowlabel 0x00004, hlim 237, next-header Mobile IP (old) (62), payload length 7168) d3c3:b2a9:200:400::6238:2949 > 9675:86dd:7300:2c:1c7f:ffff:ffc3:b2a1: mobility: (payload protocol 2 should be 59) BU seq#=116 A lifetime=15360(pad1)(pad1)(type-0x3c: len=19)(ni: ho=0x0400 co=0x0012) [|mobility]