0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-08 12:18:42 +00:00

Small bug in ipv4_skip_header.

This commit is contained in:
Ondrej Filip 1999-05-24 17:37:45 +00:00
parent b9f8590025
commit daeb60393d

View File

@ -104,7 +104,7 @@ ipv4_skip_header(byte *pkt, int *len)
if (l < 20 || (*pkt & 0xf0) != 0x40) if (l < 20 || (*pkt & 0xf0) != 0x40)
return NULL; return NULL;
q = (*pkt & 0x0f) * 4; q = (*pkt & 0x0f) * 4;
if (q < l) if (q > l)
return NULL; return NULL;
*len -= q; *len -= q;
return pkt + q; return pkt + q;