View | Details | Raw Unified | Return to bug 62274
Collapse All | Expand All

(-)p0f.c (-3 / +8 lines)
Lines 161-167 Link Here
161
161
162
  switch(type) {
162
  switch(type) {
163
163
164
    case DLT_NULL:
164
    case DLT_NULL: header_len=4; break;
165
165
    case DLT_SLIP:
166
    case DLT_SLIP:
166
    case DLT_RAW:  break;
167
    case DLT_RAW:  break;
167
168
Lines 1199-1209 Link Here
1199
  /* Whoops, IP header ends past end_ptr */
1200
  /* Whoops, IP header ends past end_ptr */
1200
  if ((_u8*)(iph + 1) > end_ptr) return;
1201
  if ((_u8*)(iph + 1) > end_ptr) return;
1201
1202
1202
  if ( ((iph->ihl & 0x40) != 0x40) || iph->proto != IPPROTO_TCP) {
1203
  if ( iph->proto != IPPROTO_TCP) {
1203
    debug("[!] WARNING: Non-IP packet received. Bad header_len!\n");
1204
    debug("[!] WARNING: Non-IP packet received.\n");
1204
    return;
1205
    return;
1205
  }
1206
  }
1206
1207
1208
  if ( ((iph->ihl & 0x40) != 0x40) ) {
1209
    debug("[!] WARNING: Bad header_len!\n");
1210
    return;
1211
  }
1207
  /* If the declared length is shorter than the snapshot (etherleak
1212
  /* If the declared length is shorter than the snapshot (etherleak
1208
     or such), truncate this bad boy. */
1213
     or such), truncate this bad boy. */
1209
1214
(-)mtu.h (+1 lines)
Lines 58-63 Link Here
58
  {  4352, "FDDI" },
58
  {  4352, "FDDI" },
59
  {  4500, "token ring (2)" },
59
  {  4500, "token ring (2)" },
60
  {  9180, "FORE ATM" },
60
  {  9180, "FORE ATM" },
61
  { 16384, "loopback" },
61
  { 16436, "sometimes loopback" },
62
  { 16436, "sometimes loopback" },
62
  { 18000, "token ring x4" },
63
  { 18000, "token ring x4" },
63
};
64
};

Return to bug 62274